fix(order): summary raw totals (#11712)

This commit is contained in:
Carlos R. L. Rodrigues
2025-03-04 08:01:12 -03:00
committed by GitHub
parent cc829185f4
commit 7dbec10b3b
3 changed files with 26 additions and 20 deletions

View File

@@ -144,14 +144,17 @@ export async function applyChangesToOrder(
}
const orderSummary = order.summary
summariesToUpsert.push({
const upsertSummary = {
id: orderSummary?.version === version ? orderSummary.id : undefined,
order_id: order.id,
version,
totals: calculated.getSummaryFromOrder(
calculated.order as unknown as OrderDTO
),
})
}
createRawPropertiesFromBigNumber(upsertSummary)
summariesToUpsert.push(upsertSummary)
if (Object.keys(orderAttributes).length > 0) {
orderToUpdate.push({