fix discount calculating

This commit is contained in:
2025-11-05 18:24:34 +03:00
parent 4f6f3e146e
commit 27f522e75c
2 changed files with 15 additions and 7 deletions

View File

@@ -650,7 +650,11 @@ export const selectGrandTotal = (state: RootState) => {
? Number(state.order.restaurant?.delivery_fees) || 0
: 0;
return subtotal + taxAmount - loyaltyDiscount + deliveryFee;
};
return (
subtotal +
taxAmount -
(state.order.useLoyaltyPoints ? loyaltyDiscount : 0) +
deliveryFee
);};
export default orderSlice.reducer;