From dea8af5e7293d5e656a8a70b45b47a458420ed41 Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Fri, 16 Jun 2023 14:01:58 +0700 Subject: Update cart detail --- src/lib/cart/components/Cart.jsx | 48 +++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 18 deletions(-) diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index 8c4e7d42..c02f976f 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -140,6 +140,10 @@ const Cart = () => { router.push('/shop/checkout') } + const totalOrder = totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount + const tax = totalOrder * 0.11 + const totalPrice = totalOrder + tax + return ( <> { ))}
-
-
- Total: - -   - {selectedProduct().length > 0 - ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) - : '-'} - +
+
+ Total Pesanan + {currencyFormat(totalOrder)} +
+
+ PPN 11% + {currencyFormat(tax)} +
+
+
+ Total Harga: + {currencyFormat(totalPrice)}
@@ -447,15 +455,19 @@ const Cart = () => {

Ringkasan Belanja

-
-
- Total: - -   - {selectedProduct().length > 0 - ? currencyFormat(totalPriceBeforeTax - totalDiscountAmount + totalTaxAmount) - : '-'} - +
+
+ Total Pesanan + {currencyFormat(totalOrder)} +
+
+ PPN 11% + {currencyFormat(tax)} +
+
+
+ Total Harga: + {currencyFormat(totalPrice)}
-- cgit v1.2.3