LP1904036 more billing
authorBill Erickson <berickxx@gmail.com>
Mon, 19 Apr 2021 19:11:43 +0000 (15:11 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 00:13:32 +0000 (20:13 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Jane Sandberg <js7389@princeton.edu>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts
Open-ILS/src/eg2/src/app/staff/share/billing/billing.service.ts

index 887ae89..6056061 100644 (file)
@@ -266,7 +266,7 @@ export class BillsComponent implements OnInit, AfterViewInit {
                 this.paymentNote,
                 this.checkNumber,
                 this.ccPaymentParams,
-                this.convertChangeToCredit
+                this.convertChangeToCredit ? this.pendingChange() : null
             );
         })
         .then(resp => {
@@ -274,6 +274,8 @@ export class BillsComponent implements OnInit, AfterViewInit {
             return this.handlePayReceipt(payments, resp.payments);
         })
 
+        .then(_ => this.context.refreshPatron())
+
         // refresh affected xact IDs
         .then(_ => this.billGrid.reload())
 
index 89f04bd..884eba2 100644 (file)
@@ -78,7 +78,7 @@ export class BillingService {
         paymentNote?: string,
         checkNumber?: string,
         creditCardParams?: CreditCardPaymentParams,
-        convertChangeToCredit?: boolean): Promise<PaymentResponse> {
+        addPatronCredit?: number): Promise<PaymentResponse> {
 
        return this.net.request(
             'open-ils.circ',
@@ -89,7 +89,7 @@ export class BillingService {
                 payment_type: paymentType,
                 check_number: checkNumber,
                 payments: payments,
-                patron_credit: convertChangeToCredit,
+                patron_credit: addPatronCredit,
                 cc_args: creditCardParams
             }, patronLastXactId).toPromise()