diff --git a/src/libs/PolicyUtils.ts b/src/libs/PolicyUtils.ts index 39e6c8932aad..7717513d3f59 100644 --- a/src/libs/PolicyUtils.ts +++ b/src/libs/PolicyUtils.ts @@ -240,7 +240,7 @@ function isPaidGroupPolicy(policy: OnyxEntry | EmptyObject): boolean { * Note: Free policies have "instant" submit always enabled. */ function isInstantSubmitEnabled(policy: OnyxEntry | EmptyObject): boolean { - return policy?.autoReportingFrequency === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT || policy?.type === CONST.POLICY.TYPE.FREE; + return policy?.type === CONST.POLICY.TYPE.FREE || (policy?.autoReporting === true && policy?.autoReportingFrequency === CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT); } /** diff --git a/tests/unit/ReportUtilsTest.js b/tests/unit/ReportUtilsTest.js index 9fbea1df862e..adfa35a57ad8 100644 --- a/tests/unit/ReportUtilsTest.js +++ b/tests/unit/ReportUtilsTest.js @@ -552,6 +552,7 @@ describe('ReportUtils', () => { const paidPolicy = { id: 'ef72dfeb', type: CONST.POLICY.TYPE.TEAM, + autoReporting: true, autoReportingFrequency: CONST.POLICY.AUTO_REPORTING_FREQUENCIES.INSTANT, }; Promise.all([