saner date handling for start date/end date filters
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Dec 2009 20:58:56 +0000 (20:58 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 10 Dec 2009 20:58:56 +0000 (20:58 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@15136 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/bill_history.js
Open-ILS/xul/staff_client/server/patron/standing_penalties.js

index 039a590..97bc2d6 100644 (file)
@@ -31,13 +31,13 @@ function retrieve_mbts_for_list() {
     var method = 'FM_MBTS_IDS_RETRIEVE_FOR_HISTORY.authoritative';
     if (xul_param('current')) method = 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE.authoritative';
     var date2 = $('bills_date2').dateValue;
-    date2.setHours(23); date2.setMinutes(59); date2.setSeconds(59);
+    date2.setDate( date2.getDate() + 1 ); // Javascript will wrap into subsequent months
     var filter = {
         'xact_start' : {
             'between' : [
                 $('bills_date1').value,
                 $('bills_date2').value == util.date.formatted_date(new Date(),'%F') ?
-                    'now' : util.date.formatted_date( date2 ,'%{iso8601}')
+                    'now' : util.date.formatted_date( date2 ,'%F')
             ]
         }
     }
@@ -348,14 +348,14 @@ function retrieve_payments() {
         $('payments_meter').hidden = false;
 
         var date2 = $('payments_date2').dateValue;
-        date2.setHours(23); date2.setMinutes(59); date2.setSeconds(59);
+        date2.setDate( date2.getDate() + 1 ); // Javascript will wrap into subsequent months
         var filters = {
             'where' : {
                 'payment_ts' : {
                     'between' : [
                         $('payments_date1').value,
                         $('payments_date2').value == util.date.formatted_date(new Date(),'%F') ? 
-                            'now' : util.date.formatted_date( date2 ,'%{iso8601}')
+                            'now' : util.date.formatted_date( date2 ,'%F')
                     ]
                 }
             }
index b8d3520..75df88a 100644 (file)
@@ -396,7 +396,7 @@ function handle_retrieve_archived_penalties() {
         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);
+        date2.setDate( date2.getDate() + 1 ); // Javascript will wrap into subsequent months
         pcrud.search(
             'ausp',
             {
@@ -405,7 +405,7 @@ function handle_retrieve_archived_penalties() {
                     'between' : [ 
                         document.getElementById('date1').value, 
                         document.getElementById('date2').value == util.date.formatted_date(new Date(),'%F') ? 
-                            'now' :util.date.formatted_date( date2 ,'%{iso8601}')
+                            'now' : util.date.formatted_date( date2 ,'%F')
                     ]
                 }
             },