From 5d0649116457a775233c759051bad7656a189f32 Mon Sep 17 00:00:00 2001 From: elpamart Date: Thu, 19 Dec 2024 08:48:29 +0100 Subject: [PATCH] update wguwucalculation --- .../services/impact-calculator.service.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/api/src/modules/indicator-records/services/impact-calculator.service.ts b/api/src/modules/indicator-records/services/impact-calculator.service.ts index 5df283802..d819cd944 100644 --- a/api/src/modules/indicator-records/services/impact-calculator.service.ts +++ b/api/src/modules/indicator-records/services/impact-calculator.service.ts @@ -81,9 +81,8 @@ export class ImpactCalculator { tracker.startProgressInterval(progressIncrement, 50); let rawData: SourcingRecordsWithIndicatorRawData[]; try { - rawData = await this.getImpactRawDataForAllSourcingRecords( - activeIndicators, - ); + rawData = + await this.getImpactRawDataForAllSourcingRecords(activeIndicators); tracker.stopProgressInterval(); } catch (error: any) { tracker.stopProgressInterval(); @@ -392,7 +391,7 @@ export class ImpactCalculator { const waterWithdrawalValue: number = rawData[INDICATOR_NAME_CODES.WW] * tonnage || 0; return ( - (rawData[INDICATOR_NAME_CODES.WGUWU] * waterWithdrawalValue) / + (rawData[INDICATOR_NAME_CODES.UWU] * waterWithdrawalValue) / (100 * rawData.production) || 0 ); },