Skip to content

Commit

Permalink
Unheld total needs to be multiplied against coefficient as well
Browse files Browse the repository at this point in the history
  • Loading branch information
robertjchen committed Sep 16, 2024
1 parent 9a0bc92 commit 94d3e00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7225,7 +7225,7 @@ function getNonHeldAndFullAmount(iouReport: OnyxEntry<Report>, policy: OnyxEntry
if (hasUpdatedTotal(iouReport, policy) && hasPendingTransaction) {
const unheldTotal = reportTransactions.reduce((currentVal, transaction) => currentVal + (!TransactionUtils.isOnHold(transaction) ? transaction.amount : 0), 0);

return [CurrencyUtils.convertToDisplayString(unheldTotal, iouReport?.currency), CurrencyUtils.convertToDisplayString((iouReport?.total ?? 0) * coefficient, iouReport?.currency)];
return [CurrencyUtils.convertToDisplayString(unheldTotal * coefficient, iouReport?.currency), CurrencyUtils.convertToDisplayString((iouReport?.total ?? 0) * coefficient, iouReport?.currency)];

Check failure on line 7228 in src/libs/ReportUtils.ts

View workflow job for this annotation

GitHub Actions / Run ESLint

Replace `CurrencyUtils.convertToDisplayString(unheldTotal·*·coefficient,·iouReport?.currency),·CurrencyUtils.convertToDisplayString((iouReport?.total·??·0)·*·coefficient,·iouReport?.currency)` with `⏎············CurrencyUtils.convertToDisplayString(unheldTotal·*·coefficient,·iouReport?.currency),⏎············CurrencyUtils.convertToDisplayString((iouReport?.total·??·0)·*·coefficient,·iouReport?.currency),⏎········`
}

return [
Expand Down

0 comments on commit 94d3e00

Please sign in to comment.