Skip to content

Commit

Permalink
fix:showing the expense value in the sub-title inside create new repo…
Browse files Browse the repository at this point in the history
…rt (#3255)
  • Loading branch information
Sishhhh authored and Snehasish committed Nov 6, 2024
1 parent eecd991 commit ce50192
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit ce50192

Please sign in to comment.