@@ -958,9 +958,9 @@ function isProcessingReport(report: OnyxEntry<Report> | EmptyObject): boolean {
958
958
/**
959
959
* Returns true if the policy has `instant` reporting frequency and if the report is still being processed (i.e. submitted state)
960
960
*/
961
- function isInstantSubmittedState ( report : OnyxEntry < Report > | EmptyObject ) : boolean {
961
+ function isExpenseReportWithInstantSubmittedState ( report : OnyxEntry < Report > | EmptyObject ) : boolean {
962
962
const policy = allPolicies ?. [ `${ ONYXKEYS . COLLECTION . POLICY } ${ report ?. policyID } ` ] ?? null ;
963
- return isProcessingReport ( report ) && PolicyUtils . isInstantSubmitEnabled ( policy ) ;
963
+ return isExpenseReport ( report ) && isProcessingReport ( report ) && PolicyUtils . isInstantSubmitEnabled ( policy ) ;
964
964
}
965
965
966
966
/**
@@ -1273,7 +1273,7 @@ function canDeleteReportAction(reportAction: OnyxEntry<ReportAction>, reportID:
1273
1273
if ( isActionOwner ) {
1274
1274
if ( ! isEmptyObject ( report ) && isPaidGroupPolicyExpenseReport ( report ) ) {
1275
1275
// If it's a paid policy expense report, only allow deleting the request if it's a draft or is instantly submitted or the user is the policy admin
1276
- return isDraftExpenseReport ( report ) || isInstantSubmittedState ( report ) || PolicyUtils . isPolicyAdmin ( policy ) ;
1276
+ return isDraftExpenseReport ( report ) || isExpenseReportWithInstantSubmittedState ( report ) || PolicyUtils . isPolicyAdmin ( policy ) ;
1277
1277
}
1278
1278
return true ;
1279
1279
}
@@ -4264,7 +4264,7 @@ function canRequestMoney(report: OnyxEntry<Report>, policy: OnyxEntry<Policy>, o
4264
4264
if ( isMoneyRequestReport ( report ) ) {
4265
4265
const isOwnExpenseReport = isExpenseReport ( report ) && isOwnPolicyExpenseChat ;
4266
4266
if ( isOwnExpenseReport && PolicyUtils . isPaidGroupPolicy ( policy ) ) {
4267
- return isDraftExpenseReport ( report ) || isInstantSubmittedState ( report ) ;
4267
+ return isDraftExpenseReport ( report ) || isExpenseReportWithInstantSubmittedState ( report ) ;
4268
4268
}
4269
4269
4270
4270
return ( isOwnExpenseReport || isIOUReport ( report ) ) && ! isReportApproved ( report ) && ! isSettled ( report ?. reportID ) ;
@@ -5066,7 +5066,7 @@ export {
5066
5066
isPublicAnnounceRoom ,
5067
5067
isConciergeChatReport ,
5068
5068
isProcessingReport ,
5069
- isInstantSubmittedState ,
5069
+ isExpenseReportWithInstantSubmittedState ,
5070
5070
isCurrentUserTheOnlyParticipant ,
5071
5071
hasAutomatedExpensifyAccountIDs ,
5072
5072
hasExpensifyGuidesEmails ,
0 commit comments