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/checkout/components/Checkout.jsx | 1 - src/lib/checkout/components/CheckoutOld.jsx | 2 +- src/lib/checkout/email/FinishCheckoutEmail.jsx | 5 +++-- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/checkout') 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; diff --git a/src/lib/checkout/components/CheckoutOld.jsx b/src/lib/checkout/components/CheckoutOld.jsx index 5b479a73..433c5672 100644 --- a/src/lib/checkout/components/CheckoutOld.jsx +++ b/src/lib/checkout/components/CheckoutOld.jsx @@ -239,7 +239,7 @@ const Checkout = () => { setIsLoading(false) window.location.href = payment.data.redirectUrl } - const taxTotal = (totalAmount - totalDiscountAmount) * 0.11 + const taxTotal = (totalAmount - totalDiscountAmount) * (PPN - 1) return ( <> diff --git a/src/lib/checkout/email/FinishCheckoutEmail.jsx b/src/lib/checkout/email/FinishCheckoutEmail.jsx index d19ba1ca..9a94587e 100644 --- a/src/lib/checkout/email/FinishCheckoutEmail.jsx +++ b/src/lib/checkout/email/FinishCheckoutEmail.jsx @@ -17,6 +17,7 @@ import { import FinishCheckout from '../components/FinishCheckout' const FinishCheckoutEmail = ({ transaction, payment, statusPayment }) => { + const PPN = process.env.NEXT_PUBLIC_PPN return ( @@ -206,9 +207,9 @@ const FinishCheckoutEmail = ({ transaction, payment, statusPayment }) => { - PPN 11% (Incl.) + PPN {((PPN - 1) * 100).toFixed(0)}% (Incl.) - {currencyFormat(transaction.subtotal * 0.11)} + {currencyFormat(transaction.subtotal * (PPN - 1))} -- cgit v1.2.3