Skip to content

Commit

Permalink
remove next step if iou has no expenses
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Feb 20, 2025
1 parent a21bc62 commit be11af8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/MoneyReportHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import {
isAllowedToApproveExpenseReport,
isAllowedToSubmitDraftExpenseReport,
isArchivedReportWithID,
isClosedExpenseReportWithNoExpenses,
isCurrentUserSubmitter,
isInvoiceReport,
navigateBackOnDeleteTransaction,
Expand Down Expand Up @@ -200,7 +199,7 @@ function MoneyReportHeader({policy, report: moneyRequestReport, transactionThrea
const isFromPaidPolicy = policyType === CONST.POLICY.TYPE.TEAM || policyType === CONST.POLICY.TYPE.CORPORATE;
const shouldShowStatusBar =
hasAllPendingRTERViolations || shouldShowBrokenConnectionViolation || hasOnlyHeldExpenses || hasScanningReceipt || isPayAtEndExpense || hasOnlyPendingTransactions;
const shouldShowNextStep = !isClosedExpenseReportWithNoExpenses(moneyRequestReport) && isFromPaidPolicy && !!nextStep?.message?.length && !shouldShowStatusBar;
const shouldShowNextStep = transactions?.length !== 0 && isFromPaidPolicy && !!nextStep?.message?.length && !shouldShowStatusBar;
const shouldShowAnyButton =
isDuplicate ||
shouldShowSettlementButton ||
Expand Down
1 change: 1 addition & 0 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6529,6 +6529,7 @@ function prepareToCleanUpMoneyRequest(transactionID: string, reportAction: OnyxT
const message = updatedReportPreviewAction.message.at(0);
if (message) {
message.text = messageText;
message.html = messageText;
message.deleted = shouldDeleteIOUReport ? DateUtils.getDBTime() : '';
}
} else if (!Array.isArray(updatedReportPreviewAction.message) && updatedReportPreviewAction.message) {
Expand Down

0 comments on commit be11af8

Please sign in to comment.