[open-ils-commits] r15134 - in trunk/Open-ILS: web/opac/locale/en-US xul/staff_client/server/locale/en-US xul/staff_client/server/patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Dec 10 12:50:39 EST 2009
Author: phasefx
Date: 2009-12-10 12:50:36 -0500 (Thu, 10 Dec 2009)
New Revision: 15134
Modified:
trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js
trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul
Log:
date filters for default bill history interface; corrected date filters for payment history interface; extra columns (title, etc.) for payment history interface
Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-12-10 17:10:11 UTC (rev 15133)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd 2009-12-10 17:50:36 UTC (rev 15134)
@@ -2542,6 +2542,12 @@
<!ENTITY staff.patron.bill_history.payments.end_date.accesskey "">
<!ENTITY staff.patron.bill_history.payments.retrieve.label "Retrieve Payments">
<!ENTITY staff.patron.bill_history.payments.retrieve.accesskey "R">
+<!ENTITY staff.patron.bill_history.bills.start_date.label "Start Date">
+<!ENTITY staff.patron.bill_history.bills.start_date.accesskey "S">
+<!ENTITY staff.patron.bill_history.bills.end_date.label "End Date">
+<!ENTITY staff.patron.bill_history.bills.end_date.accesskey "">
+<!ENTITY staff.patron.bill_history.bills.retrieve.label "Retrieve Transactions">
+<!ENTITY staff.patron.bill_history.bills.retrieve.accesskey "R">
<!ENTITY staff.patron.bill_interface.total_owed "Total Owed:">
<!ENTITY staff.patron.bill_interface.total_checked "Total Checked:">
Modified: trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-12-10 17:10:11 UTC (rev 15133)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2009-12-10 17:50:36 UTC (rev 15134)
@@ -43,6 +43,10 @@
staff.patron.bill_history.handle_void.btn_no=No
staff.patron.bill_history.handle_void.confirm_message=Check here to confirm this message
staff.patron.bill_history.print_bills.print_error=printing bills
+staff.patron.bill_history.column.xact_type.label=Transaction Type
+staff.patron.bill_history.column.last_billing_type.label=Last Billing Type
+staff.patron.bill_history.column.title.label=Last Billing Type
+
staff.patron.bills.init_controller.money_summary_label=Money Summary
staff.patron.bills.bill_payment_amount.credit_amount=Patron only has %1$s in credit.
staff.patron.bills.bill_change_amount.greedy=Someone wanted more money than they deserved
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 17:10:11 UTC (rev 15133)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_history.js 2009-12-10 17:50:36 UTC (rev 15134)
@@ -30,7 +30,18 @@
//var method = 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_CHARGE';
var method = 'FM_MBTS_IDS_RETRIEVE_FOR_HISTORY.authoritative';
if (xul_param('current')) method = 'FM_MBTS_IDS_RETRIEVE_ALL_HAVING_BALANCE.authoritative';
- g.mbts_ids = g.network.simple_request(method,[ses(),g.patron_id]);
+ var date2 = $('bills_date2').dateValue;
+ date2.setHours(23); date2.setMinutes(59); date2.setSeconds(59);
+ 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}')
+ ]
+ }
+ }
+ g.mbts_ids = g.network.simple_request(method,[ses(),g.patron_id, null, filter]);
if (g.mbts_ids.ilsevent) {
switch(Number(g.mbts_ids.ilsevent)) {
case -1: g.error.standard_network_error_alert($("patronStrings").getString('staff.patron.bill_history.retrieve_mbts_for_list.close_win_try_again')); break;
@@ -67,10 +78,12 @@
}
}
+ g.bill_list.clear(); $('bills_meter').hidden = false;
for (var i = 0; i < g.mbts_ids.length; i++) {
dump('i = ' + i + ' g.mbts_ids[i] = ' + g.mbts_ids[i] + '\n');
g.funcs.push( gen_func(g.mbts_ids[i]) );
}
+ g.funcs.push( function() { $('bills_meter').hidden = true; } );
}
}
@@ -142,7 +155,23 @@
g.payments_list = new util.list('payments_tree');
g.payments_list.init( {
- 'columns' : g.payments_list.fm_columns('mp'),
+ 'columns' : g.payments_list.fm_columns('mp').concat( [
+ {
+ 'id' : 'payments_blob_xact_type', 'flex' : 0,
+ 'label' : $('patronStrings').getString('staff.patron.bill_history.column.xact_type.label'),
+ 'render' : function(my) { return my.xact_type; }
+ },
+ {
+ 'id' : 'payments_blob_last_billing_type', 'flex' : 0,
+ 'label' : $('patronStrings').getString('staff.patron.bill_history.column.last_billing_type.label'),
+ 'render' : function(my) { return my.last_billing_type; }
+ },
+ {
+ 'id' : 'payments_blob_title', 'flex' : 1,
+ 'label' : $('patronStrings').getString('staff.patron.bill_history.column.title.label'),
+ 'render' : function(my) { return my.title; }
+ }
+ ] ),
'on_select' : function(ev) {
JSAN.use('util.functional');
g.payments_list_selection = util.functional.map_list(
@@ -196,6 +225,8 @@
init_lists();
+ $('bills_date1').year = $('bills_date1').year - 1;
+
retrieve_mbts_for_list();
$('details').addEventListener(
@@ -316,12 +347,15 @@
$('payments_meter').hidden = false;
+ var date2 = $('payments_date2').dateValue;
+ date2.setHours(23); date2.setMinutes(59); date2.setSeconds(59);
var filters = {
'where' : {
'payment_ts' : {
'between' : [
$('payments_date1').value,
- $('payments_date2').value == util.date.formatted_date(new Date(),'%F') ? 'now' : $('payments_date2').value
+ $('payments_date2').value == util.date.formatted_date(new Date(),'%F') ?
+ 'now' : util.date.formatted_date( date2 ,'%{iso8601}')
]
}
}
@@ -338,10 +372,13 @@
if (result && typeof result.ilsevent == 'undefined') {
g.payments_list.append(
{
- 'retrieve_id' : js2JSON( { 'id' : result.id(), 'xact' : result.xact() } ),
+ 'retrieve_id' : js2JSON( { 'id' : result.mp.id(), 'xact' : result.mp.xact() } ),
'row' : {
'my' : {
- 'mp' : result
+ 'mp' : result.mp,
+ 'xact_type' : result.xact_type,
+ 'last_billing_type' : result.last_billing_type,
+ 'title' : result.title
}
}
}
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul 2009-12-10 17:10:11 UTC (rev 15133)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill_history.xul 2009-12-10 17:50:36 UTC (rev 15134)
@@ -46,10 +46,41 @@
<tabpanels flex="1">
<tabpanel orient="vertical">
<hbox>
- <label value='&staff.patron.bill_history.selected_billed.label;' style='font-weight: bold;'/>
- <label id="billed_tally" />
- <label value='&staff.patron.bill_history.selected_paid.label;' style='font-weight: bold;'/>
- <label id="paid_tally" />
+ <toolbox flex="1">
+ <toolbar>
+ <toolbaritem pack="center">
+ <hbox>
+ <label value='&staff.patron.bill_history.selected_billed.label;' style='font-weight: bold;'/>
+ <label id="billed_tally" />
+ <label value='&staff.patron.bill_history.selected_paid.label;' style='font-weight: bold;'/>
+ <label id="paid_tally" />
+ </hbox>
+ </toolbaritem>
+ <toolbarspring/>
+ <toolbaritem>
+ <progressmeter id="bills_meter" flex="1" hidden="true" mode="undetermined"/>
+ </toolbaritem>
+ <toolbaritem>
+ <vbox pack="center">
+ <label control="bills_date1"
+ value="&staff.patron.bill_history.bills.start_date.label;"
+ accesskey="&staff.patron.bill_history.bills.start_date.accesskey;" />
+ </vbox>
+ <datepicker id="bills_date1" type="popup" />
+ <vbox pack="center">
+ <label control="bills_date2"
+ value="&staff.patron.bill_history.bills.end_date.label;"
+ accesskey="&staff.patron.bill_history.bills.end_date.accesskey;" />
+ </vbox>
+ <datepicker id="bills_date2" type="popup" />
+ </toolbaritem>
+ <toolbarbutton id="bills_retrieve_btn"
+ label="&staff.patron.bill_history.bills.retrieve.label;"
+ accesskey="&staff.patron.bill_history.bills.retrieve.accesskey;"
+ oncommand="retrieve_mbts_for_list();"
+ style="-moz-user-focus: normal" />
+ </toolbar>
+ </toolbox>
</hbox>
<tree id="bill_tree" flex="1" enableColumnDrag="true" seltype="multiple"/>
<hbox>
More information about the open-ils-commits
mailing list