♻️ enhan: normalize shippingLine price

:%s
This commit is contained in:
lytrankieio123
2021-10-21 09:52:15 +07:00
parent bcdbea4059
commit 357e700e32
3 changed files with 5 additions and 19 deletions

View File

@@ -95,7 +95,7 @@ export function normalizeCartForCheckout(order: CartFragment): CartCheckout {
phoneNumber: order.shippingAddress?.phoneNumber || '',
},
shippingLine: {
priceWithTax: order.shippingLines[0].priceWithTax,
priceWithTax: order.shippingLines[0].priceWithTax / 100,
shippingMethod: order.shippingLines[0].shippingMethod as ShippingMethod
},
totalDiscount: order.discounts?.reduce((total, item) => total + item.amountWithTax, 0) / 100 || 0,