From: phasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Mon, 16 Aug 2010 13:53:09 +0000 (+0000)
Subject: redundant refresh() can cause duplicate rows in list.  Also, perm failure is an ... 
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4e881ce8ed36af9c6ff371bc439d90bf6997cd16;p=evergreen%2Fpines.git

redundant refresh() can cause duplicate rows in list.  Also, perm failure is an "expected" error here, so we can skip the skull and crossbones if folks without the permission cancel the Void All Billings action

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17226 dcc99617-32d9-48b4-a31d-7c20da2025e4
---

diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js
index 96f3e8bcf3..1206275a1d 100644
--- a/Open-ILS/xul/staff_client/server/patron/bill2.js
+++ b/Open-ILS/xul/staff_client/server/patron/bill2.js
@@ -875,9 +875,12 @@ function void_all_billings(mobts_id) {
             var robj = g.network.simple_request('FM_MB_VOID',[ses()].concat(util.functional.map_list(mb_list,function(o){return o.id();})));
             if (robj.ilsevent) {
                 switch(Number(robj.ilsevent)) {
+                    case 5000 /* PERM_FAILURE */:
+                        return;
+                    break;
                     default: 
                         g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bills.void_all_billings.error_voiding_bills'),robj); 
-                        refresh(); return; 
+                        return; 
                     break;
                 }
             }