From 7bcf97973eaa48e0e7c6a6485524bf3c400e67f6 Mon Sep 17 00:00:00 2001 From: thehighestprimenumber Date: Thu, 27 Feb 2025 11:35:19 -0300 Subject: [PATCH 1/2] bug: [ON-3484] fix Misalignment between the totals in subcategory and total emissions --- app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx b/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx index 4f159632c..7a7a482b2 100644 --- a/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx +++ b/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx @@ -73,7 +73,6 @@ export function SourceDrawer({ ); const emissionsToBeIncluded = () => { - let number, unit; let converted; if (!!totalEmissionsData && totalEmissionsData !== "?") { converted = convertKgToTonnes(parseFloat(totalEmissionsData)); @@ -86,7 +85,8 @@ export function SourceDrawer({ totalEmissions = "?"; } if (!!totalEmissions && totalEmissions !== "?") { - converted = convertKgToTonnes(parseInt(totalEmissions)); + converted = convertKgToTonnes(parseFloat(totalEmissions) * 1000); + debugger; } if (!converted) { return { number: totalEmissionsData ?? totalEmissions, unit: "" }; From cd09d33bcf6d5e8f56a5538943f1934cb5dbbcf1 Mon Sep 17 00:00:00 2001 From: thehighestprimenumber Date: Thu, 27 Feb 2025 11:40:42 -0300 Subject: [PATCH 2/2] bug: [ON-3484] PR review --- app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx b/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx index 7a7a482b2..02c009025 100644 --- a/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx +++ b/app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx @@ -86,7 +86,6 @@ export function SourceDrawer({ } if (!!totalEmissions && totalEmissions !== "?") { converted = convertKgToTonnes(parseFloat(totalEmissions) * 1000); - debugger; } if (!converted) { return { number: totalEmissionsData ?? totalEmissions, unit: "" };