Skip to content

Commit cbbbc8c

Browse files
MelvinBottruph01
andcommitted
Narrow closed-report guard to RECEIPT field only
Instead of blocking all restricted field edits on closed reports, only block RECEIPT edits — matching the original issue scope. Co-authored-by: truph01 <truph01@users.noreply.github.com>
1 parent 2a340ff commit cbbbc8c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/libs/ReportUtils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4888,7 +4888,11 @@ function canEditFieldOfMoneyRequest(
48884888
const moneyRequestReport = report ?? (iouMessage?.IOUReportID ? (getReport(iouMessage?.IOUReportID, allReports) ?? ({} as Report)) : ({} as Report));
48894889
const transaction = linkedTransaction ?? deprecatedAllTransactions?.[`${ONYXKEYS.COLLECTION.TRANSACTION}${iouMessage?.IOUTransactionID}`] ?? ({} as Transaction);
48904890

4891-
if (isSettled(String(moneyRequestReport.reportID)) || isReportIDApproved(String(moneyRequestReport.reportID)) || isClosedReport(moneyRequestReport)) {
4891+
if (isSettled(String(moneyRequestReport.reportID)) || isReportIDApproved(String(moneyRequestReport.reportID))) {
4892+
return false;
4893+
}
4894+
4895+
if (fieldToEdit === CONST.EDIT_REQUEST_FIELD.RECEIPT && isClosedReport(moneyRequestReport)) {
48924896
return false;
48934897
}
48944898

0 commit comments

Comments
 (0)