diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-15 16:29:48 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-15 16:29:48 +0700 |
| commit | 98236a47c3558c4b701009a275c7ae917ee8bf67 (patch) | |
| tree | 21e0300680a724c8a24ed815ea4e9a32ab13a895 /src/lib/quotation/components/Quotation.jsx | |
| parent | 1fa1a7873aa67cdd9ca211c239276a148cd4cdda (diff) | |
| parent | 7a14ed5ccdde86d0400d6aa02ac866317d4add63 (diff) | |
Merge branch 'new-release' into Feature/switch-account
# Conflicts:
# src/lib/auth/components/CompanyProfile.jsx
# src/lib/auth/components/Menu.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'> |
