Skip to content

Commit

Permalink
UIU-3010: Fix wrong date in Cash-Drawer-Reconciliation-Report.pdf (#2599
Browse files Browse the repository at this point in the history
)
  • Loading branch information
Dmitriy-Litvinenko authored Dec 5, 2023
1 parent cc017a7 commit 99e4b9f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
* Hide all actionalble buttons on user details pane for DCB Virtual user. Refs UIU-2987.
* Open loan page modifications for a virtual patron. Refs UIU-2988.
* Display item title and barcode as text when the item is dcb virtual item. Refs UIU-2966.
* Fix wrong date in Cash-Drawer-Reconciliation-Report.pdf. Refs UIU-3010.

## [10.0.4](https://github.com/folio-org/ui-users/tree/v10.0.4) (2023-11-10)
[Full Changelog](https://github.com/folio-org/ui-users/compare/v10.0.3...v10.0.4)
Expand Down
8 changes: 6 additions & 2 deletions src/components/data/reports/CashDrawerReconciliationReport.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ class CashDrawerReconciliationReport {
}

buildHeader() {
const DEFAULT_DATE_OPTIONS = {
timeZone: 'UTC',
};

return this.formatMessage(
{ id: 'ui-users.reports.cash.header' },
{
servicePoint: this.headerData.createdAt,
sources: this.headerData.sources,
startDate: this.formatDate(this.headerData.startDate),
endDate: this.formatDate(this.headerData.endDate) || moment().format('YYYY/MM/DD') // if no endDate then show date='today'
startDate: this.formatDate(this.headerData.startDate, DEFAULT_DATE_OPTIONS),
endDate: this.formatDate(this.headerData.endDate, DEFAULT_DATE_OPTIONS) || moment().format('YYYY/MM/DD') // if no endDate then show date='today'
}
);
}
Expand Down

0 comments on commit 99e4b9f

Please sign in to comment.