From: Bill Erickson Date: Tue, 20 Jul 2021 15:20:03 +0000 (-0400) Subject: LP1904036 Historical xacts/payments sort newest to oldest X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a6685a4f2f3a82c55414a9d012523483d98176b9;p=Evergreen.git LP1904036 Historical xacts/payments sort newest to oldest Signed-off-by: Bill Erickson Signed-off-by: Jane Sandberg Signed-off-by: Galen Charlton --- diff --git a/Open-ILS/src/eg2/src/app/staff/circ/patron/billing-history.component.ts b/Open-ILS/src/eg2/src/app/staff/circ/patron/billing-history.component.ts index d231be05b1..41d45277c5 100644 --- a/Open-ILS/src/eg2/src/app/staff/circ/patron/billing-history.component.ts +++ b/Open-ILS/src/eg2/src/app/staff/circ/patron/billing-history.component.ts @@ -86,6 +86,10 @@ export class BillingHistoryComponent implements OnInit { this.xactsDataSource.getRows = (pager: Pager, sort: any[]) => { + if (sort.length === 0) { + sort = [{name: 'xact_start', dir: 'DESC'}]; + } + const query: any = { usr: this.patronId, xact_start: {between: [this.xactsStart, this.xactsEnd]}, @@ -105,6 +109,10 @@ export class BillingHistoryComponent implements OnInit { payment_ts: {between: [this.paymentsStart, this.paymentsEnd]}, }; + if (sort.length === 0) { + sort = [{name: 'payment_ts', dir: 'DESC'}]; + } + return this.flatData.getRows( this.paymentsGrid.context, query, pager, sort); };