Skip to content

Commit

Permalink
Merge pull request Expensify#50620 from nkdengineer/fix/50236
Browse files Browse the repository at this point in the history
fix: Amount shows 0.00 in invoice report and LHN
  • Loading branch information
arosiclair authored Oct 23, 2024
2 parents 4f0ca94 + 79b8b82 commit d20c564
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2459,10 +2459,7 @@ function calculateDiffAmount(
// Add the diff to the total if we change the currency from a different currency to the currency of the IOU report
return updatedAmount;
}
if (updatedCurrency !== iouReport?.currency && currentCurrency === iouReport?.currency) {
// Subtract the diff from the total if we change the currency from the currency of IOU report to a different currency
return -updatedAmount;
}

if (updatedCurrency === iouReport?.currency && updatedAmount !== currentAmount) {
// Calculate the diff between the updated amount and the current amount if we change the amount and the currency of the transaction is the currency of the report
return updatedAmount - currentAmount;
Expand Down

0 comments on commit d20c564

Please sign in to comment.