From: phasefx Date: Thu, 10 Dec 2009 20:58:56 +0000 (+0000) Subject: saner date handling for start date/end date filters X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=af2a326a934727d3a5b9687e22e89a740f381ad5;p=evergreen%2Fpines.git saner date handling for start date/end date filters git-svn-id: svn://svn.open-ils.org/ILS/trunk@15136 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/patron/bill_history.js b/Open-ILS/xul/staff_client/server/patron/bill_history.js index 039a5908b6..97bc2d6b84 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill_history.js +++ b/Open-ILS/xul/staff_client/server/patron/bill_history.js @@ -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') ] } } 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 b8d3520945..75df88af34 100644 --- a/Open-ILS/xul/staff_client/server/patron/standing_penalties.js +++ b/Open-ILS/xul/staff_client/server/patron/standing_penalties.js @@ -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') ] } },