diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index fab8b4418895..1b03c3a1bdb2 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1434,7 +1434,8 @@ function getPolicyExpenseChatName(report, policy = undefined) { * @returns {String} */ function getMoneyRequestReportName(report, policy = undefined) { - const formattedAmount = CurrencyUtils.convertToDisplayString(getMoneyRequestReimbursableTotal(report), report.currency); + const moneyRequestTotal = getMoneyRequestReimbursableTotal(report); + const formattedAmount = CurrencyUtils.convertToDisplayString(moneyRequestTotal, report.currency); const payerName = isExpenseReport(report) ? getPolicyName(report, false, policy) : getDisplayNameForParticipant(report.managerID); const payerPaidAmountMesssage = Localize.translateLocal('iou.payerPaidAmount', { payer: payerName, @@ -1449,7 +1450,7 @@ function getMoneyRequestReportName(report, policy = undefined) { return Localize.translateLocal('iou.payerSpentAmount', {payer: payerName, amount: formattedAmount}); } - if (report.hasOutstandingIOU) { + if (report.hasOutstandingIOU || moneyRequestTotal === 0) { return Localize.translateLocal('iou.payerOwesAmount', {payer: payerName, amount: formattedAmount}); }