summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/checkout/components/Checkout.jsx10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 23a471aa..5a9dcf7f 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -164,9 +164,9 @@ const Checkout = () => {
let dataVoucherIndex = listVouchers.findIndex((voucher) => voucher.code == code)
let dataActiveVoucher = listVouchers[dataVoucherIndex]
- let countDiscount = 0
+ let countDiscount = dataActiveVoucher.discountVoucher
- if (dataActiveVoucher.discountType === 'percentage') {
+ /*if (dataActiveVoucher.discountType === 'percentage') {
countDiscount = cartCheckout?.subtotal * (dataActiveVoucher.discountAmount / 100)
if (
dataActiveVoucher.maxDiscountAmount > 0 &&
@@ -176,7 +176,7 @@ const Checkout = () => {
}
} else {
countDiscount = dataActiveVoucher.discountAmount
- }
+ }*/
return countDiscount
}
@@ -562,7 +562,9 @@ const Checkout = () => {
{item.canApply && (
<p>
Potensi potongan sebesar{' '}
- <span className='text-red-500'>{item.discountVoucher}</span>
+ <span className='text-red-500'>
+ {currencyFormat(item.discountVoucher)}
+ </span>
</p>
)}
{/* {item.canApply === false