Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Amount shows 0.00 in invoice report and LHN #50620

Merged
merged 3 commits into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2449,10 +2449,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
Loading