From bec4fabb1d489de7c4aeea83217834062a6f0221 Mon Sep 17 00:00:00 2001 From: wixarm Date: Sat, 7 Feb 2026 17:43:42 +0330 Subject: [PATCH] fix: loadingSum calculations --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 1affaeb..575b062 100644 --- a/index.js +++ b/index.js @@ -2295,7 +2295,8 @@ app.post("/samasat-good-sum", async (req, res) => { )?.reduce((acc, item) => acc + Number(item?.GoodAmount || 0), 0); const loadingSum = jsonData.Data?.filter( - (option) => option?.TrackingStatus === 1, + (option) => + option?.TrackingStatus === 1 || option?.TrackingStatus === 2, )?.reduce((acc, item) => acc + Number(item?.GoodAmount || 0), 0); res.json({ goodSum, loadingSum });