From 17d38e09099da44779f03bb25873406a69a07d1b Mon Sep 17 00:00:00 2001 From: phasefx Date: Tue, 6 Jul 2010 20:28:59 +0000 Subject: [PATCH] adjust code for an API change. Assume success if no ils_event 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 | 2 +- Open-ILS/xul/staff_client/server/patron/bills.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/bill2.js b/Open-ILS/xul/staff_client/server/patron/bill2.js index 3cd986449..34c4e9665 100644 --- a/Open-ILS/xul/staff_client/server/patron/bill2.js +++ b/Open-ILS/xul/staff_client/server/patron/bill2.js @@ -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; diff --git a/Open-ILS/xul/staff_client/server/patron/bills.js b/Open-ILS/xul/staff_client/server/patron/bills.js index 4a7cf0537..7f72ea0ab 100644 --- a/Open-ILS/xul/staff_client/server/patron/bills.js +++ b/Open-ILS/xul/staff_client/server/patron/bills.js @@ -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; -- 2.11.0