Skip to content

Commit

Permalink
Merge pull request #7245 from ORNL-AMO/issue-7244
Browse files Browse the repository at this point in the history
issue 7244 TH PPT bug from PF calc fix
  • Loading branch information
nbintertech authored Jan 8, 2025
2 parents a1a35af + 0702cc8 commit 9cfefd6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,8 @@ export class TreasureHuntPptTableService {
} else {
utilityUnit = 'GJ';
}
} else if (utilityType == 'Other') {
utilityUnit = ' ';
}
return utilityUnit;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,17 +375,13 @@ export class TreasureHuntPptService {
{ text: "Payback (Years)", options: { color: "FFFFFF", bold: true, fill: { color: '1D428A' } } }
]);
let utilityUnit: string;
opp.annualEnergySavings.forEach(annulEnergy => {
let additionalSavings: number = 0;
if(opp.opportunitySheet.opportunityCost.additionalAnnualSavings){
additionalSavings = opp.opportunitySheet.opportunityCost.additionalAnnualSavings.cost;
}
opp.annualEnergySavings.forEach(annulEnergy => {
utilityUnit = this.treasureHuntPptTableService.getUtilityUnit(annulEnergy.label, settings);
rows.push([
annulEnergy.label,
this.treasureHuntPptTableService.roundValToFormatString(annulEnergy.savings),
utilityUnit,
this.treasureHuntPptTableService.roundValToCurrency(opp.annualCostSavings + additionalSavings),
this.treasureHuntPptTableService.roundValToCurrency(opp.annualCostSavings),
this.treasureHuntPptTableService.roundValToCurrency(opp.opportunitySheet.opportunityCost.material),
this.treasureHuntPptTableService.roundValToCurrency(opp.opportunitySheet.opportunityCost.labor),
this.treasureHuntPptTableService.getOtherCost(opp.opportunitySheet.opportunityCost),
Expand Down Expand Up @@ -436,16 +432,12 @@ export class TreasureHuntPptService {
]);
let utilityUnit: string;
opp.annualEnergySavings.forEach(annulEnergy => {
let additionalSavings: number = 0;
if(opp.opportunitySheet.opportunityCost.additionalAnnualSavings){
additionalSavings = opp.opportunitySheet.opportunityCost.additionalAnnualSavings.cost;
}
utilityUnit = this.treasureHuntPptTableService.getUtilityUnit(annulEnergy.label, settings);
rows.push([
annulEnergy.label,
this.treasureHuntPptTableService.roundValToFormatString(annulEnergy.savings),
utilityUnit,
this.treasureHuntPptTableService.roundValToCurrency(opp.annualCostSavings + additionalSavings),
this.treasureHuntPptTableService.roundValToCurrency(opp.annualCostSavings),
this.treasureHuntPptTableService.roundValToCurrency(opp.opportunitySheet.opportunityCost.material),
this.treasureHuntPptTableService.roundValToCurrency(opp.opportunitySheet.opportunityCost.labor),
this.treasureHuntPptTableService.getOtherCost(opp.opportunitySheet.opportunityCost),
Expand Down

0 comments on commit 9cfefd6

Please sign in to comment.