Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ import {
isTrackExpenseReport,
prepareOnboardingOnyxData,
shouldCreateNewMoneyRequestReport as shouldCreateNewMoneyRequestReportReportUtils,
shouldEnableNegative,
updateReportPreview,
} from '@libs/ReportUtils';
import {getCurrentSearchQueryJSON} from '@libs/SearchQueryUtils';
Expand Down Expand Up @@ -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;
Expand Down
Loading