diff options
Diffstat (limited to 'src/lib/checkout/components/Checkout.jsx')
| -rw-r--r-- | src/lib/checkout/components/Checkout.jsx | 6 |
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) |
