diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-01-13 17:08:44 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-01-13 17:08:44 +0700 |
| commit | e06905990de608585320754eb6a477cf32263595 (patch) | |
| tree | c2ffa0b95bec6da309eebf852e5c181a8da6c285 /src/lib/invoice/components | |
| parent | 40f762589601de0fe1d5b06164b2553ebdbf5ecd (diff) | |
| parent | a868498e7327593b40d1e02fd96531fefd9548d5 (diff) | |
Merge branch 'new-release' into Feature/pengajuan-tempo
# Conflicts:
# src/core/components/elements/Navbar/NavbarDesktop.jsx
Diffstat (limited to 'src/lib/invoice/components')
| -rw-r--r-- | src/lib/invoice/components/Invoice.jsx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/invoice/components/Invoice.jsx b/src/lib/invoice/components/Invoice.jsx index 81202b1c..15bfa746 100644 --- a/src/lib/invoice/components/Invoice.jsx +++ b/src/lib/invoice/components/Invoice.jsx @@ -13,6 +13,7 @@ import { createSlug } from '@/core/utils/slug' import { useEffect, useState } from 'react' const Invoice = ({ id }) => { + const PPN = process.env.NEXT_PUBLIC_PPN const { invoice } = useInvoice({ id }) const [totalAmount, setTotalAmount] = useState(0) @@ -255,8 +256,8 @@ const Invoice = ({ id }) => { {currencyFormat(invoice.data?.amountTotal)} </div> - <div className='text-right'>PPN 11% (Incl.)</div> - <div className='text-right font-medium'>{currencyFormat(totalAmount * 0.11)}</div> + <div className='text-right'>PPN {((PPN - 1) * 100).toFixed(0)}% (Incl.)</div> + <div className='text-right font-medium'>{currencyFormat(invoice.data?.amountTotal - totalAmount)}</div> </div> </div> </div> |
