diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-15 16:29:48 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-15 16:29:48 +0700 |
| commit | 98236a47c3558c4b701009a275c7ae917ee8bf67 (patch) | |
| tree | 21e0300680a724c8a24ed815ea4e9a32ab13a895 /src/lib/cart | |
| parent | 1fa1a7873aa67cdd9ca211c239276a148cd4cdda (diff) | |
| parent | 7a14ed5ccdde86d0400d6aa02ac866317d4add63 (diff) | |
Merge branch 'new-release' into Feature/switch-account
# Conflicts:
# src/lib/auth/components/CompanyProfile.jsx
# src/lib/auth/components/Menu.jsx
Diffstat (limited to 'src/lib/cart')
| -rw-r--r-- | src/lib/cart/components/Cart.jsx | 3 | ||||
| -rw-r--r-- | src/lib/cart/components/CartOld.jsx | 3 | ||||
| -rw-r--r-- | src/lib/cart/components/Cartheader.jsx | 3 |
3 files changed, 6 insertions, 3 deletions
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 += diff --git a/src/lib/cart/components/CartOld.jsx b/src/lib/cart/components/CartOld.jsx index 718541af..358efa49 100644 --- a/src/lib/cart/components/CartOld.jsx +++ b/src/lib/cart/components/CartOld.jsx @@ -20,6 +20,7 @@ import whatsappUrl from '@/core/utils/whatsappUrl' import useAuth from '@/core/hooks/useAuth' const Cart = () => { + const PPN = process.env.NEXT_PUBLIC_PPN const router = useRouter() const [products, setProducts] = useState(null) const auth = useAuth() @@ -67,7 +68,7 @@ const Cart = () => { }) if (!product.selected) continue - 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 += diff --git a/src/lib/cart/components/Cartheader.jsx b/src/lib/cart/components/Cartheader.jsx index 1c30bb13..6d4e2679 100644 --- a/src/lib/cart/components/Cartheader.jsx +++ b/src/lib/cart/components/Cartheader.jsx @@ -14,6 +14,7 @@ const { ShoppingCartIcon, PhotoIcon } = require('@heroicons/react/24/outline'); const { default: Link } = require('next/link'); const Cardheader = (cartCount) => { + const PPN = process.env.NEXT_PUBLIC_PPN const router = useRouter(); const [subTotal, setSubTotal] = useState(null); const [buttonLoading, SetButtonTerapkan] = useState(false); @@ -66,7 +67,7 @@ const Cardheader = (cartCount) => { for (const product of products) { if (product.quantity == '') continue; - let priceBeforeTax = product.price.price / 1.11; + let priceBeforeTax = product.price.price / PPN; calculateTotalPriceBeforeTax += priceBeforeTax * product.quantity; calculateTotalTaxAmount += (product.price.price - priceBeforeTax) * product.quantity; |
