Skip to content

Commit d234bd4

Browse files
GonalsOSBotify
authored andcommitted
Merge pull request #59892 from daledah/fix/59886
fix: empty green button after paying with Expensify (cherry picked from commit 4c5750a) (CP triggered by mountiny)
1 parent 60a0513 commit d234bd4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/libs/ReportPreviewActionUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function canPay(report: Report, violations: OnyxCollection<TransactionViolation[
5656
if (!isReportPayer) {
5757
return false;
5858
}
59-
return (isExpense && isPaymentsEnabled && (isApproved || isClosed) && !hasViolations) || ((isInvoice || isIOU) && isProcessing);
59+
return (isExpense && isPaymentsEnabled && ((isApproved && !report.isWaitingOnBankAccount) || isClosed) && !hasViolations) || ((isInvoice || isIOU) && isProcessing);
6060
}
6161

6262
function canExport(report: Report, violations: OnyxCollection<TransactionViolation[]>, policy?: Policy) {

src/libs/ReportPrimaryActionUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function isPayAction(report: Report, policy?: Policy) {
7373
const arePaymentsEnabled = arePaymentsEnabledUtils(policy);
7474
const isReportApproved = isReportApprovedUtils({report});
7575
const isReportClosed = isClosedReportUtils(report);
76-
const isReportFinished = isReportApproved || isReportClosed;
76+
const isReportFinished = (isReportApproved && !report.isWaitingOnBankAccount) || isReportClosed;
7777

7878
if (isReportPayer && isExpenseReport && arePaymentsEnabled && isReportFinished) {
7979
return true;

0 commit comments

Comments
 (0)