summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components/Checkout.jsx
diff options
context:
space:
mode:
authortrisusilo48 <tri.susilo@altama.co.id>2025-01-20 10:39:35 +0700
committertrisusilo48 <tri.susilo@altama.co.id>2025-01-20 10:39:35 +0700
commit00afe24409bf3cd517597e7c59cf1c12535c54c0 (patch)
tree2e3e573ead141c8381e9b962b442de3a80f17529 /src/lib/checkout/components/Checkout.jsx
parentbd4cdf2125f717875ba90e03893b319dd962f753 (diff)
parent389382046d804053d8e5c6de13d7d0b197175022 (diff)
Merge branch 'new-release' into feature/integrasi_biteship
# Conflicts: # src/lib/address/components/CreateAddress.jsx # src/lib/address/components/EditAddress.jsx
Diffstat (limited to 'src/lib/checkout/components/Checkout.jsx')
-rw-r--r--src/lib/checkout/components/Checkout.jsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 6479881d..5f630799 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -55,6 +55,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;
@@ -554,7 +555,6 @@ const Checkout = () => {
setItemTnC(item);
SetBottomPopupTnC(true);
};
- // const taxTotal = (totalAmount - totalDiscountAmount - discountVoucher) * 0.11
const hasNoPrice = useMemo(() => {
if (!products) return false;
@@ -1164,7 +1164,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'>
@@ -1472,7 +1472,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'>