From d614b4a0e8981b7b2264dbbf05bc515e349772b3 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 24 Aug 2021 16:27:52 -0400 Subject: [PATCH] LP1904036 Bill grid columns; data refreshing Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- .../app/staff/circ/patron/bill-statement.component.html | 16 ++++++++++++++-- .../eg2/src/app/staff/circ/patron/bills.component.html | 11 ++++++++++- .../src/eg2/src/app/staff/circ/patron/bills.component.ts | 11 ++++++++--- .../src/perlmods/lib/OpenILS/Application/Circ/Money.pm | 3 +++ 4 files changed, 35 insertions(+), 6 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 f2fc980034..99f07b528d 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 @@ -12,11 +12,23 @@
Billing Location
-
{{context.orgSn(statement.billing_location)}}
+
Total Billed
{{statement.summary.billing_total | currency}}
Title
-
{{statement.title}}
+
+ + + {{statement.title}} + + + {{statement.title}} +
Type
diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html index 4a26b2c35a..54ca7b1b18 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.html @@ -232,7 +232,8 @@ [required]="true" label="Last Payment Type" i18n-label> + [required]="true" [datePlusTime]="true" label="Last Payment Time" i18n-label> + @@ -246,6 +247,14 @@ + + + + + + diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts index b4288a1243..6331551f67 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/bills.component.ts @@ -498,7 +498,7 @@ export class BillsComponent implements OnInit, AfterViewInit { this.billingDialog.newXact = true; this.billingDialog.open().subscribe(data => { if (data) { - this.billGrid.reload(); + this.context.refreshPatron().then(_ => this.billGrid.reload()); } }); } @@ -566,7 +566,9 @@ export class BillsComponent implements OnInit, AfterViewInit { this.sessionVoided = (this.sessionVoided * 100 + cents) / 100; this.voidAmount = 0; - this.billGrid.reload(); + + this.context.refreshPatron() + .then(_ => this.billGrid.reload()); }); } @@ -584,7 +586,10 @@ export class BillsComponent implements OnInit, AfterViewInit { 'open-ils.circ.money.billable_xact.adjust_to_zero', this.auth.token(), xactIds ).subscribe(resp => { - if (!this.reportError(resp)) { this.billGrid.reload(); } + if (!this.reportError(resp)) { + this.context.refreshPatron() + .then(_ => this.billGrid.reload()); + } }); }); } diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm index 975479f2dd..88d72ad323 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Money.pm @@ -1378,12 +1378,14 @@ sub retrieve_statement { my $title; my $billing_location; + my $title_id; if ($xact->circulation) { $billing_location = $xact->circulation->circ_lib; my $copy = $xact->circulation->target_copy; if ($copy->call_number->id == -1) { $title = $copy->dummy_title; } else { + $title_id = $copy->call_number->record->id; $title = OpenSRF::Utils::JSON->JSON2perl( $copy->call_number->record->wide_display_entry->title); } @@ -1396,6 +1398,7 @@ sub retrieve_statement { xact_id => $xact_id, xact => $xact, title => $title, + title_id => $title_id, billing_location => $billing_location, summary => { balance_due => $totals{billing} - ($totals{payment} + $totals{account_adjustment} + $totals{void}), -- 2.11.0