Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: [ON-3484] fix Misalignment between the totals in subcategory and total emissions #1161

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/src/app/[lng]/[inventory]/data/[step]/SourceDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ export function SourceDrawer({
);

const emissionsToBeIncluded = () => {
let number, unit;
let converted;
if (!!totalEmissionsData && totalEmissionsData !== "?") {
converted = convertKgToTonnes(parseFloat(totalEmissionsData));
Expand All @@ -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: "" };
Expand Down
Loading