Skip to content

Commit

Permalink
Fix to not include attachment when duplicating expense (and use corre…
Browse files Browse the repository at this point in the history
…ct field)
  • Loading branch information
gustavlrsn committed Jan 7, 2025
1 parent edac3e7 commit d913424
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions components/submit-expense/useExpenseForm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1471,9 +1471,7 @@ export function useExpenseForm(opts: {
setFieldValue(
'expenseItems',
formOptions.expense.items?.map(ei => ({
attachment: ei.url,
url: ei.url, // !startOptions.current.duplicateExpense ? ei.url : null,
// url: !startOptions.current.duplicateExpense ? ei.url : null,
attachment: !startOptions.current.duplicateExpense ? ei.url : null,
description: ei.description ?? '',
incurredAt: !startOptions.current.duplicateExpense
? dayjs.utc(ei.incurredAt).toISOString().substring(0, 10)
Expand Down

0 comments on commit d913424

Please sign in to comment.