From 8cd1c472cf4614e3d6c5e9e9bfbeb151f001ea48 Mon Sep 17 00:00:00 2001 From: Varun Date: Wed, 26 Mar 2025 16:45:14 +0530 Subject: [PATCH] changes in consumption --- src/controllers/tanksController.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index e7970c59..c0e79d69 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -6466,6 +6466,7 @@ exports.consumptionofparticulartank = async (request, reply) => { // Convert input dates into proper JavaScript Date objects for comparison const start = moment(startDate, "DD-MMM-YYYY - HH:mm").toDate(); const end = moment(stopDate, "DD-MMM-YYYY - HH:mm").toDate(); + end.setHours(23, 59, 59, 999); // Ensure full day is included // Find the tank by customerId, tankLocation, and tankName const tank = await Tank.findOne({