Skip to content

Commit

Permalink
Show optimistic distance receipt for tracked expenses
Browse files Browse the repository at this point in the history
  • Loading branch information
neil-marcellini committed Jun 26, 2024
1 parent d0674b3 commit 48abfaf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/libs/actions/IOU.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3623,6 +3623,9 @@ function trackExpense(
const moneyRequestReportID = isMoneyRequestReport ? report.reportID : '';
const isMovingTransactionFromTrackExpense = IOUUtils.isMovingTransactionFromTrackExpense(action);

// Pass an open receipt so the distance expense will show a map with the route optimistically
const trackedReceipt = validWaypoints ? {source: ReceiptGeneric as ReceiptSource, state: CONST.IOU.RECEIPT_STATE.OPEN} : receipt;

const {
createdWorkspaceParams,
iouReport,
Expand All @@ -3645,7 +3648,7 @@ function trackExpense(
currency,
created,
merchant,
receipt,
trackedReceipt,
category,
tag,
taxCode,
Expand Down

0 comments on commit 48abfaf

Please sign in to comment.