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

CLOSES CORE-1210
This commit is contained in:
William Bouchard
2025-10-08 07:45:32 -04:00
committed by GitHub
parent b43b285125
commit e9b7a8c1f3
2 changed files with 9 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@medusajs/dashboard": patch
---
fix(dashboard): nan in tax total

View File

@@ -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,
}
})