From ce501928b6cfc30b45aa248acd8ec3ebcf9b4685 Mon Sep 17 00:00:00 2001 From: Snehasish Jena <142651781+Sishhhh@users.noreply.github.com> Date: Wed, 6 Nov 2024 13:43:33 +0530 Subject: [PATCH] fix:showing the expense value in the sub-title inside create new report (#3255) --- .../create-new-report-v2/create-new-report.component.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/shared/components/create-new-report-v2/create-new-report.component.ts b/src/app/shared/components/create-new-report-v2/create-new-report.component.ts index ba63dd6b14..ee3ec03f15 100644 --- a/src/app/shared/components/create-new-report-v2/create-new-report.component.ts +++ b/src/app/shared/components/create-new-report-v2/create-new-report.component.ts @@ -49,10 +49,7 @@ export class CreateNewReportComponent implements OnInit { getReportTitle(): Subscription { const txnIds = this.selectedElements.map((etxn) => etxn.id); - this.selectedTotalAmount = this.selectedElements.reduce( - (acc, obj) => acc + (obj.is_reimbursable ? obj.amount : 0), - 0 - ); + this.selectedTotalAmount = this.selectedElements.reduce((acc, obj) => acc + obj.amount, 0); if (this.reportTitleInput && !this.reportTitleInput.dirty && txnIds.length > 0) { return this.spenderReportsService.suggestPurpose(txnIds).subscribe((res) => {