From e07b4470ba487c01e2420a115a285e7fd4a305ce Mon Sep 17 00:00:00 2001 From: trisusilo48 Date: Wed, 4 Sep 2024 17:12:44 +0700 Subject: fixing voucher shipping --- src/lib/checkout/components/Checkout.jsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/lib') diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 913bd273..f63ef457 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -410,7 +410,7 @@ const Checkout = () => { Math.round(parseInt(finalShippingAmt * 1.1) / 1000) * 1000; const finalGT = GT < 0 ? 0 : GT; setGrandTotal(finalGT); - }, [biayaKirim, cartCheckout?.grandTotal, activeVoucher]); + }, [biayaKirim, cartCheckout?.grandTotal, activeVoucher, activeVoucherShipping]); const checkout = async () => { const file = poFile.current.files[0]; @@ -497,7 +497,7 @@ const Checkout = () => { } } - const midtrans = async () => { + /* const midtrans = async () => { for (const product of products) deleteItemCart({ productId: product.id }); if (grandTotal > 0) { const payment = await axios.post( @@ -513,7 +513,7 @@ const Checkout = () => { '-' )}`; } - }; + };*/ }; const handlingActivateCode = async () => { @@ -1189,7 +1189,7 @@ const Checkout = () => {
Biaya Kirim

{etdFix}

-
{currencyFormat(biayaKirim)}
+
{currencyFormat(Math.round(parseInt(biayaKirim * 1.1) / 1000) * 1000)}
{activeVoucherShipping && voucherShippingAmt && (
@@ -1490,7 +1490,7 @@ const Checkout = () => { Biaya Kirim

{etdFix}

-
{currencyFormat(biayaKirim)}
+
{currencyFormat(Math.round(parseInt(biayaKirim * 1.1) / 1000) * 1000) }
{activeVoucherShipping && voucherShippingAmt && (
-- cgit v1.2.3