diff options
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/checkout/components/Checkout.jsx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx index 8c80640a..77053d1c 100644 --- a/src/lib/checkout/components/Checkout.jsx +++ b/src/lib/checkout/components/Checkout.jsx @@ -566,8 +566,15 @@ const Checkout = () => { order_line: JSON.stringify(productOrder), delivery_amount: biayaKirim, carrier_id: selectedCourierId, - estimated_arrival_days_start : parseInt(eta_courier_start) + parseInt(productSla), - estimated_arrival_days: parseInt(eta_courier) + parseInt(productSla), + // estimated_arrival_days_start : parseInt(eta_courier_start) + parseInt(productSla), + // estimated_arrival_days: parseInt(eta_courier) + parseInt(productSla), + // If NaN conver to 0 (int) + estimated_arrival_days_start: (isNaN(parseInt(eta_courier_start)) ? 0 : parseInt(eta_courier_start)) + + (isNaN(parseInt(productSla)) ? 0 : parseInt(productSla)), + + estimated_arrival_days: (isNaN(parseInt(eta_courier)) ? 0 : parseInt(eta_courier)) + + (isNaN(parseInt(productSla)) ? 0 : parseInt(productSla)), + delivery_service_type: selectedService?.service_type, // New release // carrier_id: selectedCarrierId, |
