order create
This commit is contained in:
@@ -259,19 +259,15 @@ const OrderPage = () => {
|
||||
return;
|
||||
}
|
||||
|
||||
const order_products = [];
|
||||
|
||||
cartItems.forEach((e) => {
|
||||
order_products.push({
|
||||
inventory_kind: 'G',
|
||||
product_code: e.product.code,
|
||||
on_balance: 'Y',
|
||||
order_quant: e.quantity,
|
||||
price_type_code: e.product.prices[0].price_type.code,
|
||||
product_price: e.product.prices[0].price,
|
||||
warehouse_code: 'wh1',
|
||||
});
|
||||
});
|
||||
const order_products = cartItems.map((item) => ({
|
||||
inventory_kind: 'G',
|
||||
product_code: item.product.code,
|
||||
on_balance: 'Y',
|
||||
order_quant: item.quantity,
|
||||
price_type_code: item.product.prices?.[0]?.price_type?.code,
|
||||
product_price: item.product.prices?.[0]?.price,
|
||||
warehouse_code: 'wh1',
|
||||
}));
|
||||
|
||||
mutate({
|
||||
order: [
|
||||
|
||||
Reference in New Issue
Block a user