diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 4b78b5b97a68..807f8de643d2 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -1888,12 +1888,16 @@ 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) && - iouType !== CONST.IOU.TYPE.SPLIT && - iouType !== CONST.IOU.TYPE.INVOICE - ); + const isExpenseReportType = isExpenseReport(report); + const isGroupPolicyType = isGroupPolicy(policy?.type ?? ''); + const isCreatingNewIOU = iouType === CONST.IOU.TYPE.CREATE; + const supportsNegativeAmounts = isExpenseReportType || isGroupPolicyType || isSelfDMReport || isCreatingNewIOU || isFirstTimeCreatingReport; + + const isExcludedType = iouType === CONST.IOU.TYPE.SPLIT || iouType === CONST.IOU.TYPE.INVOICE; + + return supportsNegativeAmounts && !isExcludedType; } /**