Skip to content

Commit e08f2d0

Browse files
authored
Merge pull request Expensify#88438 from paulnjs/paulnjs-fix/86887
fix: report Pay status appear in ND but unpaid and missing payment state in Classic
2 parents 8095dd0 + 6f80903 commit e08f2d0

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

src/libs/ReportPrimaryActionUtils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,9 @@ function isPrimaryPayAction({
198198
return false;
199199
}
200200
const isExpenseReport = isExpenseReportUtils(report);
201+
if (isExpenseReport && !isPaidGroupPolicy(policy)) {
202+
return false;
203+
}
201204
const isReportPayer = isPayer(currentUserAccountID, currentUserLogin, report, bankAccountList, policy, false);
202205
const arePaymentsEnabled = arePaymentsEnabledUtils(policy);
203206
const isReportApproved = isReportApprovedUtils({report});

src/libs/actions/IOU/ReportWorkflow.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,10 @@ function canIOUBePaid(
215215
return true;
216216
}
217217

218+
if (isExpenseReport(iouReport) && !isPaidGroupPolicy(policy)) {
219+
return false;
220+
}
221+
218222
return (
219223
isPayer &&
220224
isReportFinished &&

0 commit comments

Comments
 (0)