From ddb82d97f794d59d846aa9b7c3d1dd1eff9cb9a9 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Fri, 29 Nov 2024 16:31:58 +0700
Subject: ppn 12 persen

---
 src/lib/checkout/components/Checkout.jsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'src/lib/checkout/components/Checkout.jsx')

diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 6fb5cdb4..4e182745 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -50,6 +50,7 @@ function convertToInternational(number) {
 }
 
 const Checkout = () => {
+  const PPN = process.env.NEXT_PUBLIC_PPN ? parseFloat(process.env.NEXT_PUBLIC_PPN) : 0;
   const router = useRouter();
   const query = router.query.source ?? null;
   const qVoucher = router.query.voucher ?? null;
@@ -1210,7 +1211,7 @@ const Checkout = () => {
                 <div>{currencyFormat(cartCheckout?.subtotal)}</div>
               </div>
               <div className='flex gap-x-2 justify-between'>
-                <div className='text-gray_r-11'>PPN 11%</div>
+                <div className='text-gray_r-11'>PPN {((PPN - 1) * 100).toFixed(0)}%</div>
                 <div>{currencyFormat(cartCheckout?.tax)}</div>
               </div>
               <div className='flex gap-x-2 justify-between'>
@@ -1514,7 +1515,7 @@ const Checkout = () => {
                       <div>{currencyFormat(cartCheckout?.subtotal)}</div>
                     </div>
                     <div className='flex gap-x-2 justify-between'>
-                      <div className='text-gray_r-11'>PPN 11%</div>
+                      <div className='text-gray_r-11'>PPN {((PPN - 1) * 100).toFixed(0)}%</div>
                       <div>{currencyFormat(cartCheckout?.tax)}</div>
                     </div>
                     <div className='flex gap-x-2 justify-between'>
-- 
cgit v1.2.3


From d20adeb6a5f6e153e2d1cfc8c8c77f4cceb743e8 Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Tue, 31 Dec 2024 09:53:27 +0700
Subject: ppn 12%

---
 src/lib/checkout/components/Checkout.jsx | 1 -
 1 file changed, 1 deletion(-)

(limited to 'src/lib/checkout/components/Checkout.jsx')

diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 4e182745..e3b586f1 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -588,7 +588,6 @@ const Checkout = () => {
     setItemTnC(item);
     SetBottomPopupTnC(true);
   };
-  // const taxTotal = (totalAmount - totalDiscountAmount - discountVoucher) * 0.11
 
   const hasNoPrice = useMemo(() => {
     if (!products) return false;
-- 
cgit v1.2.3

