Skip to content

Commit ba687b4

Browse files
authored
Merge pull request Expensify#64903 from etCoderDysto/move_expense_report
fix: Enable user to move expense when they have more than one expense report across multiple workspace
2 parents 3892d45 + 0d7fd39 commit ba687b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libs/ReportUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4221,7 +4221,7 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>
42214221
const isUnreported = !transaction?.reportID || transaction?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID;
42224222
return isUnreported
42234223
? Object.values(allPolicies ?? {}).flatMap((currentPolicy) => getOutstandingReportsForUser(currentPolicy?.id, currentUserAccountID, allReports ?? {})).length > 0
4224-
: getOutstandingReportsForUser(moneyRequestReport?.policyID, moneyRequestReport?.ownerAccountID, allReports ?? {}).length > 1;
4224+
: Object.values(allPolicies ?? {}).flatMap((currentPolicy) => getOutstandingReportsForUser(currentPolicy?.id, moneyRequestReport?.ownerAccountID, allReports ?? {})).length > 1;
42254225
}
42264226

42274227
return true;

0 commit comments

Comments
 (0)