fix(dashboard): nan in tax total (#13699)

CLOSES CORE-1210
This commit is contained in:
William Bouchard authored and GitHub committed 2025-10-08 11:45:32 +00:00
1 parent b43b285125
commit e9b7a8c1f3
2 files changed
+9 -2

No files matched your search

@@ -575,9 +575,10 @@ const CostBreakdown = ({
order.items.forEach((item) => {
item.tax_lines?.forEach((line) => {
const currTotal = line.subtotal || 0
const prevTotal = taxCodeMap[line.code]?.total || 0
taxCodeMap[line.code] = {
total: prevTotal + line.subtotal,
total: prevTotal + currTotal,
rate: line.rate,
}
})
@@ -585,9 +586,10 @@ const CostBreakdown = ({
order.shipping_methods.forEach((sm) => {
sm.tax_lines?.forEach((line) => {
const currTotal = line.subtotal || 0
const prevTotal = taxCodeMap[line.code]?.total || 0
taxCodeMap[line.code] = {
total: prevTotal + line.subtotal,
total: prevTotal + currTotal,
rate: line.rate,
}
})