feat: Totals calculation (#6980)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { OrderTypes } from "@medusajs/types"
|
||||
import { deduplicate, isDefined } from "@medusajs/utils"
|
||||
import { decorateCartTotals, deduplicate, isDefined } from "@medusajs/utils"
|
||||
|
||||
export function formatOrder(
|
||||
order
|
||||
@@ -23,7 +23,7 @@ export function formatOrder(
|
||||
|
||||
order.summary = order.summary?.[0]?.totals
|
||||
|
||||
return order
|
||||
return decorateCartTotals(order)
|
||||
})
|
||||
|
||||
return isArray ? orders : orders[0]
|
||||
|
||||
Reference in New Issue
Block a user