From 31edbad01e3198231205c5a43fc0a4d856b26135 Mon Sep 17 00:00:00 2001 From: Gary Jones Date: Thu, 8 Jan 2026 09:47:34 -0700 Subject: [PATCH] Update to ChargeRate.js and active view xml to have end dtime at the end of the day --- .../resources/queries/onprc_billing/chargeRates.js | 10 +++++++++- .../onprc_billing/chargeRates/Active Rates.qview.xml | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/onprc_billing/resources/queries/onprc_billing/chargeRates.js b/onprc_billing/resources/queries/onprc_billing/chargeRates.js index 3ee20ddab..0b8f87628 100644 --- a/onprc_billing/resources/queries/onprc_billing/chargeRates.js +++ b/onprc_billing/resources/queries/onprc_billing/chargeRates.js @@ -16,10 +16,18 @@ function beforeUpdate(row, errors){ function beforeUpsert(row, errors){ if (row.startDate){ + // normalize to date-only (00:00) row.startDate = ldkUtils.removeTimeFromDate(row.startDate); } if (row.endDate){ - row.endDate = ldkUtils.removeTimeFromDate(row.endDate); + // normalize to date-only first + var cleanDate = ldkUtils.removeTimeFromDate(row.endDate); + + // create a new date object set to 23:59 + var endOfDay = new Date(cleanDate); + endOfDay.setHours(23, 59, 0, 0); + + row.endDate = endOfDay; } } \ No newline at end of file diff --git a/onprc_billing/resources/queries/onprc_billing/chargeRates/Active Rates.qview.xml b/onprc_billing/resources/queries/onprc_billing/chargeRates/Active Rates.qview.xml index 4453d5cc3..6cba0006d 100644 --- a/onprc_billing/resources/queries/onprc_billing/chargeRates/Active Rates.qview.xml +++ b/onprc_billing/resources/queries/onprc_billing/chargeRates/Active Rates.qview.xml @@ -4,6 +4,6 @@ - + \ No newline at end of file