fix discount calculating
This commit is contained in:
@@ -44,13 +44,17 @@ export default function OrderSummary() {
|
||||
<ProText type="secondary">{t("cart.basketTotal")}</ProText>
|
||||
<ArabicPrice price={subtotal} />
|
||||
</div>
|
||||
{orderType != OrderType.DineIn && <div className={styles.summaryRow}>
|
||||
<ProText type="secondary">{t("cart.deliveryFee")}</ProText>
|
||||
<ArabicPrice price={Number(restaurant?.delivery_fees || 0)} />
|
||||
</div>}
|
||||
{orderType != OrderType.DineIn && (
|
||||
<div className={styles.summaryRow}>
|
||||
<ProText type="secondary">{t("cart.deliveryFee")}</ProText>
|
||||
<ArabicPrice price={Number(restaurant?.delivery_fees || 0)} />
|
||||
</div>
|
||||
)}
|
||||
<div className={styles.summaryRow}>
|
||||
<ProText type="secondary">{t("cart.discount")}</ProText>
|
||||
<ArabicPrice price={highestLoyaltyItem?.price || 0} />
|
||||
<ArabicPrice
|
||||
price={useLoyaltyPoints ? highestLoyaltyItem?.price || 0 : 0}
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.summaryRow}>
|
||||
<ProText type="secondary">{t("cart.tax")}</ProText>
|
||||
|
||||
Reference in New Issue
Block a user