diff --git a/src/libs/actions/IOU.ts b/src/libs/actions/IOU.ts index 1b8b06841dda..403940898fdb 100644 --- a/src/libs/actions/IOU.ts +++ b/src/libs/actions/IOU.ts @@ -199,6 +199,7 @@ import { isTrackExpenseReport, prepareOnboardingOnyxData, shouldCreateNewMoneyRequestReport as shouldCreateNewMoneyRequestReportReportUtils, + shouldEnableNegative, updateReportPreview, } from '@libs/ReportUtils'; import {getCurrentSearchQueryJSON} from '@libs/SearchQueryUtils'; @@ -4762,8 +4763,9 @@ function getUpdateTrackExpenseParams( // - we're merging two expenses (server does not create MODIFIED_EXPENSE in this flow) // In these cases, there isn't a valid optimistic mileage data we can use, // and the report action is created on the server with the distance-related response from the MapBox API + const allowNegative = shouldEnableNegative(transactionThread ?? undefined); const updatedReportAction = shouldBuildOptimisticModifiedExpenseReportAction - ? buildOptimisticModifiedExpenseReportAction(transactionThread, transaction, transactionChanges, false, policy, updatedTransaction) + ? buildOptimisticModifiedExpenseReportAction(transactionThread, transaction, transactionChanges, false, policy, updatedTransaction, allowNegative) : null; if (!hasPendingWaypoints && !(hasModifiedDistanceRate && isFetchingWaypointsFromServer(transaction)) && updatedReportAction) { apiParams.reportActionID = updatedReportAction.reportActionID;