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