From d20adeb6a5f6e153e2d1cfc8c8c77f4cceb743e8 Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Tue, 31 Dec 2024 09:53:27 +0700 Subject: ppn 12% --- src/lib/cart/components/Cart.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/cart/components/Cart.jsx') diff --git a/src/lib/cart/components/Cart.jsx b/src/lib/cart/components/Cart.jsx index c6aaa596..1e25d959 100644 --- a/src/lib/cart/components/Cart.jsx +++ b/src/lib/cart/components/Cart.jsx @@ -27,6 +27,7 @@ import CardProdcuctsList from '@/core/components/elements/Product/cartProductsLi // import cardProdcuctsList from '@/core/components/elements/Product/cartProductsList' const Cart = () => { + const PPN = process.env.NEXT_PUBLIC_PPN const router = useRouter() const [products, setProducts] = useState(null) const [isLoading, setIsLoading] = useState(true) @@ -97,7 +98,7 @@ const Cart = () => { if (product.canBuy == false) { toggleSelected(product.id) } - let priceBeforeTax = product.price.price / 1.11 + let priceBeforeTax = product.price.price / PPN calculateTotalPriceBeforeTax += priceBeforeTax * product.quantity calculateTotalTaxAmount += (product.price.price - priceBeforeTax) * product.quantity calculateTotalDiscountAmount += -- cgit v1.2.3