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
false
);
+ $('refund').addEventListener(
+ 'command',
+ handle_refund,
+ false
+ );
+
$('opac').addEventListener(
'command',
handle_opac,
}
}
+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) {
$('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);
},