From e25b2c66ad71a9732390913a3ba072c4cd3cf8c5 Mon Sep 17 00:00:00 2001
From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Thu, 10 Dec 2009 20:17:44 +0000
Subject: [PATCH] pass a timestamp with 23:59:59 as the end date for the
 BETWEEN filter

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15135 dcc99617-32d9-48b4-a31d-7c20da2025e4
---
 Open-ILS/xul/staff_client/server/patron/standing_penalties.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Open-ILS/xul/staff_client/server/patron/standing_penalties.js b/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
index 9534a1091f..b8d3520945 100644
--- a/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
+++ b/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
@@ -395,6 +395,8 @@ function handle_retrieve_archived_penalties() {
         JSAN.use('util.date');
         dojo.require('openils.PermaCrud');
         var pcrud = new openils.PermaCrud( { authtoken :ses() });
+        var date2 = document.getElementById('date2').dateValue;
+        date2.setHours(23); date2.setMinutes(59); date2.setSeconds(59);
         pcrud.search(
             'ausp',
             {
@@ -402,7 +404,8 @@ function handle_retrieve_archived_penalties() {
                 stop_date : {
                     'between' : [ 
                         document.getElementById('date1').value, 
-                        document.getElementById('date2').value == util.date.formatted_date(new Date(),'%F') ? 'now' : document.getElementById('date2').value
+                        document.getElementById('date2').value == util.date.formatted_date(new Date(),'%F') ? 
+                            'now' :util.date.formatted_date( date2 ,'%{iso8601}')
                     ]
                 }
             },
-- 
2.11.0