From 91a0cb3c0d6421d4513857272e686bfd6da8efb4 Mon Sep 17 00:00:00 2001 From: kubabutkiewicz Date: Thu, 30 Oct 2025 12:02:22 +0100 Subject: [PATCH 1/2] Enhance shouldEnableNegative function to allow report creation for first-time submissions --- src/libs/ReportUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index a6c1449c6b73..09f999f30465 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1879,9 +1879,10 @@ function isSelfDMOrSelfDMThread(report: OnyxEntry): boolean { */ function shouldEnableNegative(report: OnyxEntry, policy?: OnyxEntry, iouType?: string) { const isSelfDMReport = isSelfDMOrSelfDMThread(report); + const isFirstTimeCreatingReport = !report && !policy && iouType === CONST.IOU.TYPE.SUBMIT; return ( - (isExpenseReport(report) || isGroupPolicy(policy?.type ?? '') || isSelfDMReport || iouType === CONST.IOU.TYPE.CREATE) && + (isExpenseReport(report) || isGroupPolicy(policy?.type ?? '') || isSelfDMReport || iouType === CONST.IOU.TYPE.CREATE || isFirstTimeCreatingReport) && iouType !== CONST.IOU.TYPE.SPLIT && iouType !== CONST.IOU.TYPE.INVOICE ); From dc5246eb0003e3581a3ff6069f7ed95a925ce0e0 Mon Sep 17 00:00:00 2001 From: kubabutkiewicz Date: Fri, 7 Nov 2025 16:23:36 +0100 Subject: [PATCH 2/2] make the condition more readable --- src/libs/ReportUtils.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 1532dddb6887..807f8de643d2 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1890,11 +1890,14 @@ function shouldEnableNegative(report: OnyxEntry, policy?: OnyxEntry