Skip to content

Commit

Permalink
Merge pull request #47941 from Expensify/dangrous-pendingtransactions
Browse files Browse the repository at this point in the history
[CP Staging] Fix hasOnlyPendingTransactions

(cherry picked from commit b509d95)

(CP triggered by AndrewGable)
  • Loading branch information
luacmartins authored and OSBotify committed Aug 27, 2024
1 parent 3f53b20 commit 0fab9bc
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
const connectedIntegration = PolicyUtils.getConnectedIntegration(policy);
const navigateBackToAfterDelete = useRef<Route>();
const hasScanningReceipt = ReportUtils.getTransactionsWithReceipts(moneyRequestReport?.reportID).some((t) => TransactionUtils.isReceiptBeingScanned(t));
const hasOnlyPendingTransactions = ReportUtils.getTransactionsWithReceipts(moneyRequestReport?.reportID).every(
(t) => TransactionUtils.isExpensifyCardTransaction(t) && TransactionUtils.isPending(t),
);
const hasOnlyPendingTransactions = allTransactions.length > 0 && allTransactions.every((t) => TransactionUtils.isExpensifyCardTransaction(t) && TransactionUtils.isPending(t));
const transactionIDs = allTransactions.map((t) => t.transactionID);
const allHavePendingRTERViolation = TransactionUtils.allHavePendingRTERViolation(transactionIDs);
const hasOnlyHeldExpenses = ReportUtils.hasOnlyHeldExpenses(moneyRequestReport.reportID);
Expand Down

0 comments on commit 0fab9bc

Please sign in to comment.