diff --git a/src/components/pages/purchase/order/PurchaseOrderDetail.tsx b/src/components/pages/purchase/order/PurchaseOrderDetail.tsx index a5d6474b..72f9c474 100644 --- a/src/components/pages/purchase/order/PurchaseOrderDetail.tsx +++ b/src/components/pages/purchase/order/PurchaseOrderDetail.tsx @@ -583,7 +583,7 @@ const PurchaseOrderDetail = ({ { header: 'Ekspedisi', accessorKey: 'expedition_name', - cell: (props) => props.row.original.expedition_vendor.name || '-', + cell: (props) => props.row.original.expedition_vendor?.name || '-', }, { header: 'Transport /Item', diff --git a/src/types/api/purchase/purchase.d.ts b/src/types/api/purchase/purchase.d.ts index 7f493d08..4e717f15 100644 --- a/src/types/api/purchase/purchase.d.ts +++ b/src/types/api/purchase/purchase.d.ts @@ -42,12 +42,12 @@ export type PurchaseItem = { expedition_vendor_name?: string | null; received_qty?: number | null; transport_per_item?: number | null; - expedition_vendor: { - id: number; - name: string; - alias: string; - category: string; - }; + expedition_vendor?: { + id?: number; + name?: string; + alias?: string; + category?: string; + } | null; }; export type BasePurchase = {