Skip to content

Commit

Permalink
Merge pull request #56651 from Krishna2323/krishna2323/issue/56647
Browse files Browse the repository at this point in the history
fix: Distance expense - Delete and replace options are present in distance map menu.
  • Loading branch information
lakchote authored Feb 13, 2025
2 parents a0a2609 + e65122e commit 76375c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libs/ReportUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3599,14 +3599,14 @@ function canEditFieldOfMoneyRequest(reportAction: OnyxInputOrEntry<ReportAction>

if (fieldToEdit === CONST.EDIT_REQUEST_FIELD.RECEIPT) {
const isRequestor = currentUserAccountID === reportAction?.actorAccountID;
return !isInvoiceReport(moneyRequestReport) &&
return (
!isInvoiceReport(moneyRequestReport) &&
!isReceiptBeingScanned(transaction) &&
!isDistanceRequest(transaction) &&
!isPerDiemRequest(transaction) &&
(isAdmin || isManager || isRequestor) &&
isDeleteAction
? isRequestor
: true;
(isDeleteAction ? isRequestor : true)
);
}

if (fieldToEdit === CONST.EDIT_REQUEST_FIELD.DISTANCE_RATE) {
Expand Down

0 comments on commit 76375c0

Please sign in to comment.