feat: Totals calculation (#6980)
This commit is contained in:
@@ -1670,7 +1670,7 @@ export default class OrderModuleService<
|
||||
}
|
||||
return data.order_change_id
|
||||
})
|
||||
.filter(Boolean)
|
||||
.filter(Boolean) as string[]
|
||||
|
||||
if (orderChangeIds.length) {
|
||||
const ordChanges = await this.getAndValidateOrderChange_(
|
||||
|
||||
@@ -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