@@ -148,6 +148,7 @@ import {
148
148
getUpdatedTransaction ,
149
149
hasReceipt as hasReceiptTransactionUtils ,
150
150
isAmountMissing ,
151
+ isCustomUnitRateIDForP2P ,
151
152
isDistanceRequest as isDistanceRequestTransactionUtils ,
152
153
isExpensifyCardTransaction ,
153
154
isFetchingWaypointsFromServer ,
@@ -4728,6 +4729,8 @@ function trackExpense(
4728
4729
value : recentServerValidatedWaypoints ,
4729
4730
} ) ;
4730
4731
4732
+ const mileageRate = isCustomUnitRateIDForP2P ( transaction ) ? undefined : customUnitRateID ;
4733
+
4731
4734
switch ( action ) {
4732
4735
case CONST . IOU . ACTION . CATEGORIZE : {
4733
4736
if ( ! linkedTrackedExpenseReportAction || ! actionableWhisperReportActionID || ! linkedTrackedExpenseReportID ) {
@@ -4746,6 +4749,8 @@ function trackExpense(
4746
4749
tag,
4747
4750
billable,
4748
4751
receipt : trackedReceipt instanceof Blob ? trackedReceipt : undefined ,
4752
+ waypoints : sanitizedWaypoints ,
4753
+ customUnitRateID : mileageRate ,
4749
4754
} ;
4750
4755
const policyParams : TrackedExpensePolicyParams = {
4751
4756
policyID : chatReport ?. policyID ,
@@ -4790,7 +4795,7 @@ function trackExpense(
4790
4795
billable,
4791
4796
receipt : trackedReceipt instanceof Blob ? trackedReceipt : undefined ,
4792
4797
waypoints : sanitizedWaypoints ,
4793
- customUnitRateID,
4798
+ customUnitRateID : mileageRate ,
4794
4799
} ;
4795
4800
const policyParams : TrackedExpensePolicyParams = {
4796
4801
policyID : chatReport ?. policyID ,
0 commit comments