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; currency_code: string;
owner_person_code: string; owner_person_code: string;
note: string; note: string;
order_products: [ order_products: {
{ inventory_kind: string;
inventory_kind: string; product_code: string;
product_code: string; on_balance: string;
on_balance: string; order_quant: number;
order_quant: number; price_type_code: string;
price_type_code: string; product_price: string;
product_price: string; warehouse_code: string;
warehouse_code: string; }[];
},
];
}[]; }[];
} }

View File

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