Skip to content

Commit 0686278

Browse files
authored
Merge pull request Expensify#64222 from nkdengineer/fix/63994
fix: report field of unreported expense is not clickable when it is created on OD
2 parents 831a976 + 32560ce commit 0686278

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/libs/ReportUtils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4021,7 +4021,8 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>
40214021
}
40224022

40234023
if (fieldToEdit === CONST.EDIT_REQUEST_FIELD.REPORT) {
4024-
const isUnreported = !moneyRequestReport || isEmptyObject(moneyRequestReport);
4024+
// Unreported transaction from OldDot can have the reportID as an empty string
4025+
const isUnreported = !transaction?.reportID || transaction?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID;
40254026
return isUnreported
40264027
? Object.values(allPolicies ?? {}).flatMap((currentPolicy) => getOutstandingReportsForUser(currentPolicy?.id, currentUserAccountID, allReports ?? {})).length > 0
40274028
: getOutstandingReportsForUser(moneyRequestReport?.policyID, moneyRequestReport?.ownerAccountID, allReports ?? {}).length > 1;

0 commit comments

Comments
 (0)