summaryrefslogtreecommitdiff
path: root/src/lib/checkout/components
diff options
context:
space:
mode:
authorHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-07-26 13:21:07 +0700
committerHATEC\SPVDEV001 <tri.susilo@altama.co.id>2023-07-26 13:21:07 +0700
commita3d4259a70ca24dadf1e86d392efc05818d9327e (patch)
tree3a1c93bef559748a50f8ed68b66e390c3656cc13 /src/lib/checkout/components
parenta72a7503dd5f04c9f3db5a3803dce0610fcff7ea (diff)
fixing jika beli langsung
Diffstat (limited to 'src/lib/checkout/components')
-rw-r--r--src/lib/checkout/components/Checkout.jsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/checkout/components/Checkout.jsx b/src/lib/checkout/components/Checkout.jsx
index 11a14e31..17616938 100644
--- a/src/lib/checkout/components/Checkout.jsx
+++ b/src/lib/checkout/components/Checkout.jsx
@@ -34,12 +34,13 @@ const { getProductsCheckout } = require('../api/checkoutApi')
const Checkout = () => {
const router = useRouter()
+ const query = router.query.source ?? null
const auth = useAuth()
const [activeVoucher, SetActiveVoucher] = useState(null)
const { data: cartCheckout } = useQuery('cartCheckout-' + activeVoucher, () =>
- getProductsCheckout(activeVoucher)
+ getProductsCheckout(activeVoucher, query)
)
const [selectedAddress, setSelectedAddress] = useState({
@@ -298,6 +299,9 @@ const Checkout = () => {
voucher: activeVoucher,
type: 'sale_order'
}
+ if(query){
+ data.source = 'buy'
+ }
if (poNumber.current.value) data.po_number = poNumber.current.value
if (typeof file !== 'undefined') data.po_file = await getFileBase64(file)