From: Kathy Lussier Date: Fri, 11 Sep 2015 00:56:31 +0000 (-0400) Subject: lp1494544 Remove void options from bills UI X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=25cc93932b9e5971e99ac21ef594c5a9ae311cc7;p=working%2FEvergreen.git lp1494544 Remove void options from bills UI Removes manual void options from patron bills UI since using this option can produce a negative balance for sites that are configured to prohibit them. Also adds the adjust to zero option to the Actions for Selected Transactions menu. Signed-off-by: Kathy Lussier --- diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index 3db87f9ae5..5201eba1af 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -96,12 +96,6 @@ function event_listeners() { false ); - window.bill_event_listeners.add($('voidall'), - 'command', - handle_void_all, - false - ); - window.bill_event_listeners.add($('refund'), 'command', handle_refund, @@ -571,7 +565,6 @@ function init_lists() { //tally_selected(); $('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); $('adjust_to_zero').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); @@ -717,28 +710,6 @@ function handle_add() { } } -function handle_void_all() { - if(g.bill_list_selection.length > 1) { - var msg = $("patronStrings").getFormattedString('staff.patron.bill_history.handle_void.message_plural', [g.bill_list_selection]); - } else { - var msg = $("patronStrings").getFormattedString('staff.patron.bill_history.handle_void.message_singular', [g.bill_list_selection]); - } - - var r = g.error.yns_alert(msg, - $("patronStrings").getString('staff.patron.bill_history.handle_void.title'), - $("patronStrings").getString('staff.patron.bill_history.handle_void.btn_yes'), - $("patronStrings").getString('staff.patron.bill_history.handle_void.btn_no'),null, - $("patronStrings").getString('staff.patron.bill_history.handle_void.confirm_message')); - if (r == 0) { - for (var i = 0; i < g.bill_list_selection.length; i++) { - void_all_billings( g.bill_list_selection[i] ); - } - refresh(); - if (typeof window.xulG == 'object' && typeof window.xulG.refresh == 'function') window.xulG.refresh(); - if (typeof window.xulG == 'object' && typeof window.xulG.on_money_change == 'function') window.xulG.on_money_change(); - } -} - function handle_opac() { try { var ids = []; diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.xul b/Open-ILS/xul/staff_client/server/patron/bill2.xul index 6fbd90d507..11a8a2620a 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.xul +++ b/Open-ILS/xul/staff_client/server/patron/bill2.xul @@ -40,7 +40,6 @@ - @@ -51,7 +50,6 @@ - @@ -146,7 +144,7 @@ - +