lp1494427: Fix refund error
authorKathy Lussier <klussier@masslnc.org>
Fri, 11 Sep 2015 17:54:32 +0000 (13:54 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Tue, 15 Sep 2015 13:15:55 +0000 (09:15 -0400)
Fixes an error that occurs when attempting to refund a negative balance from
the patron's bill record. We removed the staff.patron.bills.handle_refund.
confirm_message string, which caused the error when the handle_refund function
tried to retrieve the string. It turns out the string never displayed in the
client. Therefore, in this branch, we stop the handle_refund function from
trying to retrieve the string. I did the confirmation message for the
adjust_to_zero function since the same issue was occurring there.

Test case: Find a negative balance transaction and, from the patron's bills
record, select the transaction and select the option to Refund. Pre-patch, this
action will generate an error message. Post-patch, this action should generate
a prompt asking the user to confirm the action.

Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/xul/staff_client/server/locale/en-US/patron.properties
Open-ILS/xul/staff_client/server/patron/bill2.js

index 401f19d..e8e48dc 100644 (file)
@@ -49,7 +49,6 @@ 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_adjust_to_zero.confirm_message=Check here to confirm this message
 staff.patron.bills.handle_adjust_to_zero.message_plural=Are you sure you would like to adjust to zero the balance on bills %1$s?
 staff.patron.bills.handle_adjust_to_zero.message_singular=Are you sure you would like to adjust to zero the balance on bill %1$s?
 staff.patron.bills.handle_adjust_to_zero.title=Adjust to Zero
index 3db87f9..ee0cc62 100644 (file)
@@ -372,8 +372,7 @@ function handle_refund() {
     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'));
+        $("patronStrings").getString('staff.patron.bills.handle_refund.btn_no'),null);
     if (r == 0) {
         for (var i = 0; i < g.bill_list_selection.length; i++) {
             var bill_id = g.bill_list_selection[i];
@@ -408,10 +407,7 @@ function handle_adjust_to_zero() {
         $("patronStrings").getString(
             'staff.patron.bills.handle_adjust_to_zero.btn_yes'),
         $("patronStrings").getString(
-            'staff.patron.bills.handle_adjust_to_zero.btn_no'),null,
-        $("patronStrings").getString(
-            'staff.patron.bills.handle_adjust_to_zero.confirm_message'));
-
+            'staff.patron.bills.handle_adjust_to_zero.btn_no'),null);
     if (r == 0) {
         var xact_ids = [];
         for (var i = 0; i < g.bill_list_selection.length; i++) {