From da80b7e00e2ee6aaa3a81902cd51ff556d4d7ef0 Mon Sep 17 00:00:00 2001
From: "HATEC\\SPVDEV001" <tri.susilo@altama.co.id>
Date: Wed, 5 Jun 2024 15:01:12 +0700
Subject: fixing shipping address and invoice address

---
 src/lib/checkout/components/Checkout.jsx | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'src/lib/checkout/components/Checkout.jsx')

diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 0090acee..5ca3611f 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -333,8 +333,10 @@ const Checkout = () => {
       quantity: product.quantity,
     }));
     let data = {
-      partner_shipping_id: auth.partnerId,
-      partner_invoice_id: auth.partnerId,
+      // partner_shipping_id: auth.partnerId,
+      // partner_invoice_id: auth.partnerId,
+      partner_shipping_id: selectedAddress?.shipping?.id || auth.partnerId,
+      partner_invoice_id: selectedAddress?.invoicing?.id || auth.partnerId,
       user_id: auth.id,
       order_line: JSON.stringify(productOrder),
       delivery_amount: biayaKirim,
-- 
cgit v1.2.3

