From 3d9eb86466d35067444e1e12395ceecea4362684 Mon Sep 17 00:00:00 2001 From: "a. bellenir" Date: Mon, 11 Mar 2019 13:39:00 -0400 Subject: [PATCH] LP1775639: Refresh required to see Patron Credit reload patron data when applying a payment if the payment will change the patron's credit forward balance. To test ------- [1] Bill a patron, then make sure that the "Convert Change to Patron Credit" checkbox is checked. Pay bill with more than the total balance. Note that the Credit Available amount in the billing summary does not change. Refresh the page. [2] Bill a patron, then use the patron credit added in step 1 to pay off the bill. Note that again, the Credit Available amount does not change. [3] Apply the patch and repeats steps 1 and 2. This time, the Credit Available field should get updated. Signed-off-by: a. bellenir Signed-off-by: Garry Collum Signed-off-by: Galen Charlton --- Open-ILS/web/js/ui/default/staff/circ/patron/bills.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js index 7f41f16175..b644718915 100644 --- a/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js +++ b/Open-ILS/web/js/ui/default/staff/circ/patron/bills.js @@ -76,6 +76,10 @@ function($q , egCore , egWorkLog , patronSvc) { // payment API returns the update xact id so we can track it // for future payments without having to refresh the user. patronSvc.current.last_xact_id(resp.last_xact_id); + + // reload patron data if credit balance has changed: + if(type === 'credit_payment' || patron_credit){ patronSvc.refreshPrimary(); } + return resp.payments; }); } -- 2.11.0