[open-ils-commits] r17592 - in trunk/Open-ILS/xul/staff_client/server: locale/en-US patron (phasefx)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Sep 10 16:12:54 EDT 2010
Author: phasefx
Date: 2010-09-10 16:12:49 -0400 (Fri, 10 Sep 2010)
New Revision: 17592
Modified:
trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
Log:
enable the Refund action in the new billing interface
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 2010-09-10 20:12:47 UTC (rev 17591)
+++ trunk/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties 2010-09-10 20:12:49 UTC (rev 17592)
@@ -42,6 +42,12 @@
staff.patron.bill_history.handle_void.btn_yes=Yes
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.bills.handle_refund.message_plural=Are you sure you would like to refund excess payment on bills %1$s? This action will simply put the amount in the Payment Pending column as a negative value. You must still select Apply Payment! Certain types of payments may not be refunded. The refund may be applied to checked transactions that follow the refunded transaction.
+staff.patron.bills.handle_refund.message_singular=Are you sure you would like to refund excess payment on bill %1$s? This action will simply put the amount in the Payment Pending column as a negative value. You must still select Apply Payment! Certain types of payments may not be refunded. The refund may be applied to checked transactions that follow the refunded transaction.
+staff.patron.bills.handle_refund.title=Refund Excess Payment
+staff.patron.bills.handle_refund.btn_yes=Yes
+staff.patron.bills.handle_refund.btn_no=No
+staff.patron.bills.handle_refund.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
Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill2.js 2010-09-10 20:12:47 UTC (rev 17591)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill2.js 2010-09-10 20:12:49 UTC (rev 17592)
@@ -78,6 +78,12 @@
false
);
+ $('refund').addEventListener(
+ 'command',
+ handle_refund,
+ false
+ );
+
$('opac').addEventListener(
'command',
handle_opac,
@@ -319,6 +325,33 @@
}
}
+function handle_refund() {
+ if(g.bill_list_selection.length > 1) {
+ var msg = $("patronStrings").getFormattedString('staff.patron.bills.handle_refund.message_plural', [g.bill_list_selection]);
+ } else {
+ var msg = $("patronStrings").getFormattedString('staff.patron.bills.handle_refund.message_singular', [g.bill_list_selection]);
+ }
+
+ var r = g.error.yns_alert(msg,
+ $("patronStrings").getString('staff.patron.bills.handle_refund.title'),
+ $("patronStrings").getString('staff.patron.bills.handle_refund.btn_yes'),
+ $("patronStrings").getString('staff.patron.bills.handle_refund.btn_no'),null,
+ $("patronStrings").getString('staff.patron.bills.handle_refund.confirm_message'));
+ if (r == 0) {
+ for (var i = 0; i < g.bill_list_selection.length; i++) {
+ var bill_id = g.bill_list_selection[i];
+ //alert('g.check_map['+bill_id+'] = '+g.check_map[bill_id]+' bill_map['+bill_id+'] = ' + js2JSON(g.bill_map[bill_id]));
+ g.check_map[bill_id] = true;
+ var row_params = g.row_map[bill_id];
+ row_params.row.my.checked = true;
+ g.bill_list.refresh_row(row_params);
+ }
+ }
+ tally_all();
+ distribute_payment();
+}
+
+
function check_all() {
try {
for (var i in g.bill_map) {
@@ -438,6 +471,7 @@
$('details').setAttribute('disabled', g.bill_list_selection.length == 0);
$('add').setAttribute('disabled', g.bill_list_selection.length == 0);
$('voidall').setAttribute('disabled', g.bill_list_selection.length == 0);
+ $('refund').setAttribute('disabled', g.bill_list_selection.length == 0);
$('opac').setAttribute('disabled', g.bill_list_selection.length == 0);
$('copy_details').setAttribute('disabled', g.bill_list_selection.length == 0);
},
More information about the open-ils-commits
mailing list