From 4efea97f1385be94a5d94caff7dae7dd9136e77f Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Fri, 11 Sep 2015 13:54:32 -0400 Subject: [PATCH] lp1494427: Fix refund error 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 Signed-off-by: Jason Stephenson --- Open-ILS/xul/staff_client/server/locale/en-US/patron.properties | 1 - Open-ILS/xul/staff_client/server/patron/bill2.js | 8 ++------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties index 401f19df23..e8e48dccbf 100644 --- a/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties +++ b/Open-ILS/xul/staff_client/server/locale/en-US/patron.properties @@ -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 diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index 3db87f9ae5..ee0cc62d52 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -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++) { -- 2.11.0