From 425b81663ef57bdbfe380b62b28f41813aa8807f Mon Sep 17 00:00:00 2001 From: alexeh Date: Thu, 5 Dec 2024 09:50:27 +0100 Subject: [PATCH] remove duplicated prop in cost details --- api/src/modules/calculations/cost.calculator.ts | 2 -- .../custom-projects/input-factory/custom-project.factory.ts | 6 +----- shared/dtos/custom-projects/custom-project-output.dto.ts | 1 - 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/api/src/modules/calculations/cost.calculator.ts b/api/src/modules/calculations/cost.calculator.ts index ffda4dcf..89707f5c 100644 --- a/api/src/modules/calculations/cost.calculator.ts +++ b/api/src/modules/calculations/cost.calculator.ts @@ -225,7 +225,6 @@ export class CostCalculator { capitalExpenditure: totalCapex, operationalExpenditure: totalOpex, totalCost: totalCapex + totalCapex, - operationExpenditure: totalOpex, feasibilityAnalysis: sum( Object.values(this.costPlans.feasibilityAnalysis), ), @@ -298,7 +297,6 @@ export class CostCalculator { this.costPlans.implementationLabor, discountRate, ), - operationExpenditure: this.totalOpexNPV, monitoring: this.calculateNpv(this.costPlans.monitoring, discountRate), maintenance: this.calculateNpv( this.costPlans.maintenance, diff --git a/api/src/modules/custom-projects/input-factory/custom-project.factory.ts b/api/src/modules/custom-projects/input-factory/custom-project.factory.ts index b4941594..5589163a 100644 --- a/api/src/modules/custom-projects/input-factory/custom-project.factory.ts +++ b/api/src/modules/custom-projects/input-factory/custom-project.factory.ts @@ -5,11 +5,7 @@ import { AdditionalBaseData } from '@api/modules/calculations/data.repository'; import { CreateCustomProjectDto } from '@api/modules/custom-projects/dto/create-custom-project-dto'; import { ConservationProjectInput } from '@api/modules/custom-projects/input-factory/conservation-project.input'; -import { - ModelAssumptionsForCalculations, - NonOverridableModelAssumptions, -} from '@api/modules/calculations/assumptions.repository'; -import { BaseDataView } from '@shared/entities/base-data.view'; +import { NonOverridableModelAssumptions } from '@api/modules/calculations/assumptions.repository'; import { CostOutput } from '@api/modules/calculations/calculation.engine'; import { ProjectInput } from '@api/modules/calculations/cost.calculator'; import { CustomProject } from '@shared/entities/custom-project.entity'; diff --git a/shared/dtos/custom-projects/custom-project-output.dto.ts b/shared/dtos/custom-projects/custom-project-output.dto.ts index bc53fe17..31e1a494 100644 --- a/shared/dtos/custom-projects/custom-project-output.dto.ts +++ b/shared/dtos/custom-projects/custom-project-output.dto.ts @@ -32,7 +32,6 @@ export type CustomProjectCostDetails = { establishingCarbonRights: number; validation: number; implementationLabor: number; - operationExpenditure: number; monitoring: number; maintenance: number; communityBenefitSharingFund: number;