From b063270a67d7ef5d9ea5ef6c2d7e46a378603513 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 23 Feb 2022 10:28:34 -0500 Subject: [PATCH] LP1904036 Transaction details total billed/paid fixes Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../eg2/src/app/staff/circ/patron/bill-statement.component.html | 6 +++--- .../eg2/src/app/staff/circ/patron/bill-statement.component.ts | 9 +++++++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.html index 7324746d56..227f6034f6 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.html @@ -19,7 +19,7 @@
Total Billed
-
{{statement.summary.billing_total | currency}}
+
{{totalBilled() | currency}}
Title
@@ -37,7 +37,7 @@ Grocery
Total Paid / Credited
-
{{statement.payment_total | currency}}
+
{{statement.summary.payment_total | currency}}
Checked Out
@@ -49,7 +49,7 @@
Started
{{statement.xact.xact_start() | date:'short'}}
Balance Due
-
{{statement.balance_due | currency}}
+
{{statement.summary.balance_due | currency}}
Due Date
diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.ts index a9c276240d..2dcbfbec1d 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.ts @@ -165,5 +165,14 @@ export class BillStatementComponent implements OnInit { return this.statement.xact.circulation().target_copy(); } } + + totalBilled(): number { + if (!this.statement) { return 0; } + + const billed = (this.statement.summary.billing_total || 0) * 100; + const voided = (this.statement.summary.void_total || 0) * 100; + + return (billed - voided) / 100; + } } -- 2.11.0