Skip to content

Commit fab7cf8

Browse files
committed
push unreport expense check
1 parent 07b911e commit fab7cf8

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/libs/ReportUtils.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4300,7 +4300,10 @@ function canEditFieldOfMoneyRequest(
43004300
}
43014301

43024302
if (fieldToEdit === CONST.EDIT_REQUEST_FIELD.REPORT) {
4303-
if (!isReportOutstanding(moneyRequestReport, moneyRequestReport.policyID) && isExpenseReport(moneyRequestReport)) {
4303+
// Unreported transaction from OldDot can have the reportID as an empty string
4304+
const isUnreportedExpense = !transaction?.reportID || transaction?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID;
4305+
4306+
if (!isReportOutstanding(moneyRequestReport, moneyRequestReport.policyID) && !isUnreportedExpense) {
43044307
return false;
43054308
}
43064309

@@ -4310,9 +4313,6 @@ function canEditFieldOfMoneyRequest(
43104313
}
43114314
const isOwner = moneyRequestReport?.ownerAccountID === currentUserAccountID;
43124315

4313-
// Unreported transaction from OldDot can have the reportID as an empty string
4314-
const isUnreportedExpense = !transaction?.reportID || transaction?.reportID === CONST.REPORT.UNREPORTED_REPORT_ID;
4315-
43164316
if (isInvoiceReport(moneyRequestReport) && !isUnreportedExpense) {
43174317
return (
43184318
getOutstandingReportsForUser(

0 commit comments

Comments
 (0)