diff options
| author | trisusilo48 <tri.susilo@altama.co.id> | 2025-01-20 10:39:35 +0700 |
|---|---|---|
| committer | trisusilo48 <tri.susilo@altama.co.id> | 2025-01-20 10:39:35 +0700 |
| commit | 00afe24409bf3cd517597e7c59cf1c12535c54c0 (patch) | |
| tree | 2e3e573ead141c8381e9b962b442de3a80f17529 /src/lib/quotation/components/Quotation.jsx | |
| parent | bd4cdf2125f717875ba90e03893b319dd962f753 (diff) | |
| parent | 389382046d804053d8e5c6de13d7d0b197175022 (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/quotation/components/Quotation.jsx')
| -rw-r--r-- | src/lib/quotation/components/Quotation.jsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/quotation/components/Quotation.jsx b/src/lib/quotation/components/Quotation.jsx index 5a2f63a5..2f4d6c46 100644 --- a/src/lib/quotation/components/Quotation.jsx +++ b/src/lib/quotation/components/Quotation.jsx @@ -37,6 +37,7 @@ const { checkoutApi } = require('@/lib/checkout/api/checkoutApi'); const { getProductsCheckout } = require('@/lib/checkout/api/checkoutApi'); const Quotation = () => { + const PPN = process.env.NEXT_PUBLIC_PPN ? parseFloat(process.env.NEXT_PUBLIC_PPN) : 0; const router = useRouter(); const auth = useAuth(); const query = router.query.source ?? null; @@ -307,7 +308,7 @@ const Quotation = () => { toast.error('Gagal melakukan transaksi, terjadi kesalahan internal'); }; - const taxTotal = (totalAmount - totalDiscountAmount) * 0.11; + const taxTotal = (totalAmount - totalDiscountAmount) * (PPN - 1); return ( <> @@ -425,7 +426,7 @@ const Quotation = () => { <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'> @@ -574,7 +575,7 @@ const Quotation = () => { <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'> |
