fixed backwards logic to protect system penalties from deletion
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Dec 2008 21:48:38 +0000 (21:48 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 23 Dec 2008 21:48:38 +0000 (21:48 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@11676 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/conify/global/config/standing_penalty.js

index cd05a70..f839659 100644 (file)
@@ -113,10 +113,12 @@ function _deleteFromGrid(list, idx) {
 
     var item = list[idx];
     var id = spGrid.store.getValue(item, 'id');
-    if(id > 100){
+
+    if(id < 100) { // don't delete system penalties
         _deleteFromGrid(list, ++idx);
         return;
     }
+
     fieldmapper.standardRequest(
        ['open-ils.permacrud', 'open-ils.permacrud.delete.csp'],
        {   async: true,