Skip to content

Commit

Permalink
fix: Total price (#1250)
Browse files Browse the repository at this point in the history
## Describe your changes

Fixes: #
  • Loading branch information
didrikmunther authored Aug 5, 2024
1 parent f72965d commit 6e867c5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion apps/dashboard/src/forms/fr_accounting/summary.page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,13 @@ export function SummaryFormPage() {
})
}

const totalPrice = 0
const totalPrice = orders.reduce(
(acc, current) =>
acc +
(current.unit_price ??
current.quantity * current.product.unit_price),
0
)

const grossPrice = formatCurrency(totalPrice * 1.25)

Expand Down

0 comments on commit 6e867c5

Please sign in to comment.