diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index c24a2842..ff4b7d51 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -7546,6 +7546,12 @@ exports.adjustMeasurement = async (req, reply) => { // Calculate percentage difference const percentageDifference = Math.abs(originalPercentage - calculatedPercentage); + let message; + if (percentageDifference === originalPercentage) { + message = "Tank details and measurement details match."; + } else { + message = "Please check the tank measurement."; + } reply.send({ status_code: 200, @@ -7560,7 +7566,7 @@ exports.adjustMeasurement = async (req, reply) => { originalPercentage: originalPercentage.toFixed(2) + "%", calculatedPercentage: calculatedPercentage.toFixed(2) + "%", percentageDifference: percentageDifference.toFixed(2) + "%", - message: "Calculation completed. No updates were made." + message } });