Skip to content

Commit

Permalink
Merge pull request #13522 from Expensify/alberto-setError
Browse files Browse the repository at this point in the history
Check hasOutstandingIOU in money requests

(cherry picked from commit 904f5cb)
  • Loading branch information
youssef-lr authored and OSBotify committed Dec 12, 2022
1 parent 13e28f9 commit e0b943e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/actions/IOU.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function requestMoney(report, amount, currency, recipientEmail, participant, com
isNewChat = true;
}
let iouReport;
if (chatReport.iouReportID) {
if (chatReport.hasOutstandingIOU && chatReport.iouReportID) {
iouReport = IOUUtils.updateIOUOwnerAndTotal(
iouReports[`${ONYXKEYS.COLLECTION.REPORT}${chatReport.iouReportID}`],
recipientEmail,
Expand Down

0 comments on commit e0b943e

Please sign in to comment.