Skip to content

Commit

Permalink
Merge pull request #27451 from BeeMargarida/fix/IOU-edit-amount
Browse files Browse the repository at this point in the history
fix: move amount diff to check in edit money request
  • Loading branch information
mountiny authored Sep 19, 2023
2 parents e5768e1 + 91698ea commit e452e53
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -1054,8 +1054,8 @@ function editMoneyRequest(transactionID, transactionThreadReportID, transactionC
// from the server with the currency conversion
let updatedMoneyRequestReport = {...iouReport};
const updatedChatReport = {...chatReport};
if (updatedTransaction.currency === iouReport.currency && updatedTransaction.modifiedAmount) {
const diff = TransactionUtils.getAmount(transaction, true) - TransactionUtils.getAmount(updatedTransaction, true);
const diff = TransactionUtils.getAmount(transaction, true) - TransactionUtils.getAmount(updatedTransaction, true);
if (updatedTransaction.currency === iouReport.currency && updatedTransaction.modifiedAmount && diff !== 0) {
if (ReportUtils.isExpenseReport(iouReport)) {
updatedMoneyRequestReport.total += diff;
} else {
Expand Down

0 comments on commit e452e53

Please sign in to comment.