From 0d7fd395244f0a557a595a3b6ce4f85abe9809db Mon Sep 17 00:00:00 2001 From: Dysto coder Date: Wed, 25 Jun 2025 11:49:05 +0300 Subject: [PATCH] enable report field on money request view when user owens more than one report accorss multiple workspace --- src/libs/ReportUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/ReportUtils.ts b/src/libs/ReportUtils.ts index 0fe969338dfb..73f1de85f2cd 100644 --- a/src/libs/ReportUtils.ts +++ b/src/libs/ReportUtils.ts @@ -4236,7 +4236,7 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry const isUnreported = !transaction?.reportID || transaction?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID; return isUnreported ? Object.values(allPolicies ?? {}).flatMap((currentPolicy) => getOutstandingReportsForUser(currentPolicy?.id, currentUserAccountID, allReports ?? {})).length > 0 - : getOutstandingReportsForUser(moneyRequestReport?.policyID, moneyRequestReport?.ownerAccountID, allReports ?? {}).length > 1; + : Object.values(allPolicies ?? {}).flatMap((currentPolicy) => getOutstandingReportsForUser(currentPolicy?.id, moneyRequestReport?.ownerAccountID, allReports ?? {})).length > 1; } return true;