summaryrefslogtreecommitdiff
path: root/src/lib/cart/components/Cartheader.jsx
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2025-01-13 17:08:44 +0700
committerit-fixcomart <it@fixcomart.co.id>2025-01-13 17:08:44 +0700
commite06905990de608585320754eb6a477cf32263595 (patch)
treec2ffa0b95bec6da309eebf852e5c181a8da6c285 /src/lib/cart/components/Cartheader.jsx
parent40f762589601de0fe1d5b06164b2553ebdbf5ecd (diff)
parenta868498e7327593b40d1e02fd96531fefd9548d5 (diff)
Merge branch 'new-release' into Feature/pengajuan-tempo
# Conflicts: # src/core/components/elements/Navbar/NavbarDesktop.jsx
Diffstat (limited to 'src/lib/cart/components/Cartheader.jsx')
-rw-r--r--src/lib/cart/components/Cartheader.jsx3
1 files changed, 2 insertions, 1 deletions
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;