From e290d99ff7a872540c59db90125defaf6bb1cfb5 Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Wed, 26 Mar 2025 13:23:06 +0530 Subject: [PATCH 1/2] message added in measure height --- src/controllers/tanksController.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 83d4ce20..42dff0dc 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -7497,6 +7497,12 @@ exports.adjustMeasurement = async (req, reply) => { // Calculate percentage difference const percentageDifference = Math.abs(originalPercentage - calculatedPercentage); + let message; + if (percentageDifference > 0) { + message = "Tank details and measurement details match."; + } else { + message = "Please check the tank measurement."; + } reply.send({ status_code: 200, @@ -7511,7 +7517,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 } }); From a2b4c251ef8c4d9f78e50a034199da4edd5c3693 Mon Sep 17 00:00:00 2001 From: Bhaskar Date: Wed, 26 Mar 2025 13:25:21 +0530 Subject: [PATCH 2/2] message added --- src/controllers/tanksController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index c6f5d9e8..5309ddb9 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -7547,7 +7547,7 @@ exports.adjustMeasurement = async (req, reply) => { // Calculate percentage difference const percentageDifference = Math.abs(originalPercentage - calculatedPercentage); let message; - if (percentageDifference > 0) { + if (percentageDifference === originalPercentage) { message = "Tank details and measurement details match."; } else { message = "Please check the tank measurement.";