diff --git a/src/libs/ReportUtils.js b/src/libs/ReportUtils.js index 75fff28d152c..d41a31c5bae7 100644 --- a/src/libs/ReportUtils.js +++ b/src/libs/ReportUtils.js @@ -1334,20 +1334,8 @@ function canEditReportAction(reportAction) { * @returns {[Object]} */ function getTransactionsWithReceipts(iouReportID) { - const reportActions = ReportActionsUtils.getAllReportActions(iouReportID); - return _.reduce( - reportActions, - (transactions, action) => { - if (ReportActionsUtils.isMoneyRequestAction(action)) { - const transaction = TransactionUtils.getLinkedTransaction(action); - if (TransactionUtils.hasReceipt(transaction)) { - transactions.push(transaction); - } - } - return transactions; - }, - [], - ); + const allTransactions = TransactionUtils.getAllReportTransactions(iouReportID); + return _.filter(allTransactions, (transaction) => TransactionUtils.hasReceipt(transaction)); } /**