[open-ils-commits] r15136 - trunk/Open-ILS/xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 10 15:59:01 EST 2009
Author: phasefx
Date: 2009-12-10 15:58:56 -0500 (Thu, 10 Dec 2009)
New Revision: 15136
Modified:
trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js
trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
Log:
saner date handling for start date/end date filters
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js 2009-12-10 20:17:44 UTC (rev 15135)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js 2009-12-10 20:58:56 UTC (rev 15136)
@@ -31,13 +31,13 @@
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 @@
$('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')
]
}
}
Modified: trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js 2009-12-10 20:17:44 UTC (rev 15135)
+++ trunk/Open-ILS/xul/staff_client/server/patron/standing_penalties.js 2009-12-10 20:58:56 UTC (rev 15136)
@@ -396,7 +396,7 @@
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 @@
'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')
]
}
},
More information about the open-ils-commits
mailing list