5
.changeset/rude-adults-melt.md
Normal file
5
.changeset/rude-adults-melt.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/dashboard": patch
|
||||
---
|
||||
|
||||
fix(dashboard): nan in tax total
|
||||
@@ -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,
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user