Skip to content

Commit

Permalink
Merge pull request #52814 from Expensify/revert-52482-expense-fix-vie…
Browse files Browse the repository at this point in the history
…w-of-amount-with-description

[CP Staging] Revert "Fix distance amount changes after submitting track distance expense with description"
  • Loading branch information
rlinoz authored Nov 20, 2024
2 parents 4dcbc11 + 0aa5aed commit d7450ad
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 19 deletions.
2 changes: 0 additions & 2 deletions src/libs/API/parameters/CategorizeTrackedExpenseParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ type CategorizeTrackedExpenseParams = {
taxCode: string;
taxAmount: number;
billable?: boolean;
waypoints?: string;
customUnitRateID?: string;
};

export default CategorizeTrackedExpenseParams;
2 changes: 0 additions & 2 deletions src/libs/API/parameters/ShareTrackedExpenseParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ type ShareTrackedExpenseParams = {
taxCode: string;
taxAmount: number;
billable?: boolean;
customUnitRateID?: string;
waypoints?: string;
};

export default ShareTrackedExpenseParams;
16 changes: 1 addition & 15 deletions src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3389,8 +3389,6 @@ function categorizeTrackedExpense(
billable?: boolean,
receipt?: Receipt,
createdWorkspaceParams?: CreateWorkspaceParams,
waypoints?: string,
customUnitRateID?: string,
) {
const {optimisticData, successData, failureData} = onyxData ?? {};

Expand Down Expand Up @@ -3437,8 +3435,6 @@ function categorizeTrackedExpense(
policyExpenseCreatedReportActionID: createdWorkspaceParams?.expenseCreatedReportActionID,
adminsChatReportID: createdWorkspaceParams?.adminsChatReportID,
adminsCreatedReportActionID: createdWorkspaceParams?.adminsCreatedReportActionID,
waypoints,
customUnitRateID,
};

API.write(WRITE_COMMANDS.CATEGORIZE_TRACKED_EXPENSE, parameters, {optimisticData, successData, failureData});
Expand Down Expand Up @@ -3474,8 +3470,6 @@ function shareTrackedExpense(
billable?: boolean,
receipt?: Receipt,
createdWorkspaceParams?: CreateWorkspaceParams,
waypoints?: string,
customUnitRateID?: string,
) {
const {optimisticData, successData, failureData} = onyxData ?? {};

Expand Down Expand Up @@ -3522,8 +3516,6 @@ function shareTrackedExpense(
policyExpenseCreatedReportActionID: createdWorkspaceParams?.expenseCreatedReportActionID,
adminsChatReportID: createdWorkspaceParams?.adminsChatReportID,
adminsCreatedReportActionID: createdWorkspaceParams?.adminsCreatedReportActionID,
waypoints,
customUnitRateID,
};

API.write(WRITE_COMMANDS.SHARE_TRACKED_EXPENSE, parameters, {optimisticData, successData, failureData});
Expand Down Expand Up @@ -3827,8 +3819,6 @@ function trackExpense(
value: recentServerValidatedWaypoints,
});

const waypoints = validWaypoints ? JSON.stringify(sanitizeRecentWaypoints(validWaypoints)) : undefined;

switch (action) {
case CONST.IOU.ACTION.CATEGORIZE: {
if (!linkedTrackedExpenseReportAction || !actionableWhisperReportActionID || !linkedTrackedExpenseReportID) {
Expand Down Expand Up @@ -3859,8 +3849,6 @@ function trackExpense(
billable,
trackedReceipt,
createdWorkspaceParams,
waypoints,
customUnitRateID,
);
break;
}
Expand Down Expand Up @@ -3892,8 +3880,6 @@ function trackExpense(
billable,
trackedReceipt,
createdWorkspaceParams,
waypoints,
customUnitRateID,
);
break;
}
Expand Down Expand Up @@ -3922,7 +3908,7 @@ function trackExpense(
receiptGpsPoints: gpsPoints ? JSON.stringify(gpsPoints) : undefined,
transactionThreadReportID: transactionThreadReportID ?? '-1',
createdReportActionIDForThread: createdReportActionIDForThread ?? '-1',
waypoints,
waypoints: validWaypoints ? JSON.stringify(sanitizeRecentWaypoints(validWaypoints)) : undefined,
customUnitRateID,
};
if (actionableWhisperReportActionIDParam) {
Expand Down

0 comments on commit d7450ad

Please sign in to comment.