|
|
|
@ -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({
|
|
|
|
|