fix discount calculating
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user