order create

This commit is contained in:
Samandar Turgunboyev
2026-01-23 19:47:58 +05:00
parent 2f94e16176
commit 59045c583d
2 changed files with 15 additions and 16 deletions

View File

@@ -58,17 +58,15 @@ export interface OrderCreateBody {
currency_code: string;
owner_person_code: string;
note: string;
order_products: [
{
inventory_kind: string;
product_code: string;
on_balance: string;
order_quant: number;
price_type_code: string;
product_price: string;
warehouse_code: string;
},
];
order_products: {
inventory_kind: string;
product_code: string;
on_balance: string;
order_quant: number;
price_type_code: string;
product_price: string;
warehouse_code: string;
}[];
}[];
}

View File

@@ -549,21 +549,22 @@ const OrderPage = () => {
<Image
width={500}
height={500}
src={BASE_URL + item.product_image}
alt={item.product_name}
src={BASE_URL + item.product.images}
alt={item.product.name}
className="w-16 h-16 object-contain bg-gray-100 rounded"
/>
<div className="flex-1">
<h4 className="font-medium text-sm">
{item.product_name}
{item.product.name}
</h4>
<p className="text-sm text-gray-500">
{item.quantity} x{' '}
{formatPrice(item.product_price, true)}
{formatPrice(item.product.prices[0].price, true)}
</p>
<p className="font-semibold text-sm">
{formatPrice(
item.product_price * item.quantity,
Number(item.product.prices[0].price) *
item.quantity,
true,
)}
</p>