From 99e4b9f941f372a7589efb382989bd673e7a92d5 Mon Sep 17 00:00:00 2001 From: Dmitriy-Litvinenko Date: Tue, 5 Dec 2023 23:24:31 +0200 Subject: [PATCH] UIU-3010: Fix wrong date in Cash-Drawer-Reconciliation-Report.pdf (#2599) --- CHANGELOG.md | 1 + .../data/reports/CashDrawerReconciliationReport.js | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ac206677e..1777346a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/components/data/reports/CashDrawerReconciliationReport.js b/src/components/data/reports/CashDrawerReconciliationReport.js index 1f970dc15..29d9914fb 100644 --- a/src/components/data/reports/CashDrawerReconciliationReport.js +++ b/src/components/data/reports/CashDrawerReconciliationReport.js @@ -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' } ); }