[open-ils-commits] r17226 - trunk/Open-ILS/xul/staff_client/server/patron (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Aug 16 09:53:11 EDT 2010


Author: phasefx
Date: 2010-08-16 09:53:09 -0400 (Mon, 16 Aug 2010)
New Revision: 17226

Modified:
   trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
Log:
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

Modified: trunk/Open-ILS/xul/staff_client/server/patron/bill2.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/patron/bill2.js	2010-08-16 13:31:05 UTC (rev 17225)
+++ trunk/Open-ILS/xul/staff_client/server/patron/bill2.js	2010-08-16 13:53:09 UTC (rev 17226)
@@ -875,9 +875,12 @@
             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;
                 }
             }



More information about the open-ils-commits mailing list