File tree 2 files changed +9
-0
lines changed
2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -408,6 +408,10 @@ function isSubmitAndClose(policy: OnyxInputOrEntry<Policy>): boolean {
408
408
return policy ?. approvalMode === CONST . POLICY . APPROVAL_MODE . OPTIONAL ;
409
409
}
410
410
411
+ function arePaymentsEnabled ( policy : OnyxEntry < Policy > ) : boolean {
412
+ return policy ?. reimbursementChoice !== CONST . POLICY . REIMBURSEMENT_CHOICES . REIMBURSEMENT_NO ;
413
+ }
414
+
411
415
function isControlOnAdvancedApprovalMode ( policy : OnyxInputOrEntry < Policy > ) : boolean {
412
416
return policy ?. type === CONST . POLICY . TYPE . CORPORATE && getApprovalWorkflow ( policy ) === CONST . POLICY . APPROVAL_MODE . ADVANCED ;
413
417
}
@@ -1058,6 +1062,7 @@ export {
1058
1062
isPolicyEmployee ,
1059
1063
isPolicyFeatureEnabled ,
1060
1064
isPolicyOwner ,
1065
+ arePaymentsEnabled ,
1061
1066
isSubmitAndClose ,
1062
1067
isTaxTrackingEnabled ,
1063
1068
shouldShowPolicy ,
Original file line number Diff line number Diff line change @@ -1675,6 +1675,10 @@ function canAddOrDeleteTransactions(moneyRequestReport: OnyxEntry<Report>): bool
1675
1675
return false ;
1676
1676
}
1677
1677
1678
+ if ( PolicyUtils . isInstantSubmitEnabled ( policy ) && PolicyUtils . isSubmitAndClose ( policy ) && ! PolicyUtils . arePaymentsEnabled ( policy ) ) {
1679
+ return false ;
1680
+ }
1681
+
1678
1682
if ( isReportApproved ( moneyRequestReport ) || isSettled ( moneyRequestReport ?. reportID ) ) {
1679
1683
return false ;
1680
1684
}
You can’t perform that action at this time.
0 commit comments