adjust code for an API change. Assume success if no ils_event
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 6 Jul 2010 20:28:59 +0000 (20:28 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 6 Jul 2010 20:28:59 +0000 (20:28 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16860 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/patron/bill2.js
Open-ILS/xul/staff_client/server/patron/bills.js

index 3cd9864..34c4e96 100644 (file)
@@ -837,7 +837,6 @@ function pay(payment_blob) {
             note : payment_blob.note
         }
         var robj = g.network.simple_request( 'BILL_PAY', [ ses(), payment_blob ]);
-        if (robj == 1) { return true; } 
         if (typeof robj.ilsevent != 'undefined') {
             switch(Number(robj.ilsevent)) {
                 case 0 /* SUCCESS */ : return true; break;
@@ -845,6 +844,7 @@ function pay(payment_blob) {
                 default: throw(robj); break;
             }
         }
+        return true;
     } catch(E) {
         g.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bills.pay.payment_failed'),E);
         return false;
index 4a7cf05..7f72ea0 100644 (file)
@@ -574,7 +574,6 @@ patron.bills.prototype = {
                 api.BILL_PAY.method,
                 [ ses(), payment_blob ]
             );
-            if (robj == 1) { return true; } 
             if (typeof robj.ilsevent != 'undefined') {
                 switch(Number(robj.ilsevent)) {
                     case 0 /* SUCCESS */ : return true; break;
@@ -582,6 +581,7 @@ patron.bills.prototype = {
                     default: throw(robj); break;
                 }
             }
+            return true;
         } catch(E) {
             obj.error.standard_unexpected_error_alert($("patronStrings").getString('staff.patron.bills.pay.payment_failed'),E);
             return false;