Purchase Order table
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import { Vendor } from './vendor'
|
||||
|
||||
export interface PurchaseOrderRequest {
|
||||
vendor_id: string // uuid.UUID
|
||||
po_number: string
|
||||
@@ -17,3 +19,77 @@ export interface PurchaseOrderItemRequest {
|
||||
unit_id: string // uuid.UUID
|
||||
amount: number
|
||||
}
|
||||
|
||||
export interface PurchaseOrders {
|
||||
purchase_orders: PurchaseOrder[]
|
||||
total_count: number
|
||||
page: number
|
||||
limit: number
|
||||
total_pages: number
|
||||
}
|
||||
|
||||
export interface PurchaseOrder {
|
||||
id: string
|
||||
organization_id: string
|
||||
vendor_id: string
|
||||
po_number: string
|
||||
transaction_date: string // RFC3339
|
||||
due_date: string // RFC3339
|
||||
reference: string | null
|
||||
status: string
|
||||
message: string | null
|
||||
total_amount: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
vendor: Vendor
|
||||
items: PurchaseOrderItem[]
|
||||
attachments: PurchaseOrderAttachment[]
|
||||
}
|
||||
|
||||
export interface PurchaseOrderItem {
|
||||
id: string
|
||||
purchase_order_id: string
|
||||
ingredient_id: string
|
||||
description: string
|
||||
quantity: number
|
||||
unit_id: string
|
||||
amount: number
|
||||
created_at: string
|
||||
updated_at: string
|
||||
ingredient: PurchaseOrderIngredient
|
||||
unit: PurchaseOrderUnit
|
||||
}
|
||||
|
||||
export interface PurchaseOrderIngredient {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface PurchaseOrderUnit {
|
||||
id: string
|
||||
name: string
|
||||
}
|
||||
|
||||
export interface PurchaseOrderAttachment {
|
||||
id: string
|
||||
purchase_order_id: string
|
||||
file_id: string
|
||||
created_at: string
|
||||
file: PurchaseOrderFile
|
||||
}
|
||||
|
||||
export interface PurchaseOrderFile {
|
||||
id: string
|
||||
organization_id: string
|
||||
user_id: string
|
||||
file_name: string
|
||||
original_name: string
|
||||
file_url: string
|
||||
file_size: number
|
||||
mime_type: string
|
||||
file_type: string
|
||||
upload_path: string
|
||||
is_public: boolean
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user