diff --git a/src/libs/SearchUIUtils.ts b/src/libs/SearchUIUtils.ts index b5ae73bed2e4..68b3ce60963a 100644 --- a/src/libs/SearchUIUtils.ts +++ b/src/libs/SearchUIUtils.ts @@ -305,9 +305,11 @@ function getAction(data: OnyxTypes.SearchResults['data'], key: string): SearchTr ) { return CONST.SEARCH.ACTION_TYPES.PAY; } + const hasOnlyPendingTransactions = + allReportTransactions.length > 0 && allReportTransactions.every((t) => TransactionUtils.isExpensifyCardTransaction(t) && TransactionUtils.isPending(t)); const isAllowedToApproveExpenseReport = ReportUtils.isAllowedToApproveExpenseReport(report, undefined, policy); - if (IOU.canApproveIOU(report, policy) && isAllowedToApproveExpenseReport) { + if (IOU.canApproveIOU(report, policy) && isAllowedToApproveExpenseReport && !hasOnlyPendingTransactions) { return CONST.SEARCH.ACTION_TYPES.APPROVE; }