From 59045c583ddf4bb746ca0d1696dd0686d82f4f73 Mon Sep 17 00:00:00 2001 From: Samandar Turgunboyev Date: Fri, 23 Jan 2026 19:47:58 +0500 Subject: [PATCH] order create --- src/features/cart/lib/api.ts | 20 +++++++++----------- src/features/cart/ui/OrderPage.tsx | 11 ++++++----- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/features/cart/lib/api.ts b/src/features/cart/lib/api.ts index 18938b6..869e86a 100644 --- a/src/features/cart/lib/api.ts +++ b/src/features/cart/lib/api.ts @@ -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; + }[]; }[]; } diff --git a/src/features/cart/ui/OrderPage.tsx b/src/features/cart/ui/OrderPage.tsx index 408a9ef..136b419 100644 --- a/src/features/cart/ui/OrderPage.tsx +++ b/src/features/cart/ui/OrderPage.tsx @@ -549,21 +549,22 @@ const OrderPage = () => { {item.product_name}

- {item.product_name} + {item.product.name}

{item.quantity} x{' '} - {formatPrice(item.product_price, true)} + {formatPrice(item.product.prices[0].price, true)}

{formatPrice( - item.product_price * item.quantity, + Number(item.product.prices[0].price) * + item.quantity, true, )}