Add supply purchase order workflow
This commit is contained in:
30
src/types.ts
30
src/types.ts
@@ -454,6 +454,36 @@ export interface SupplyFabricPlan {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export type SupplyPurchaseOrderStatus = 'draft' | 'sent' | 'approved' | 'received' | 'canceled';
|
||||
|
||||
export interface SupplyPurchaseOrderItem {
|
||||
id: number;
|
||||
material: string;
|
||||
quantity: number;
|
||||
unit: string;
|
||||
unitCost: number | null;
|
||||
}
|
||||
|
||||
export interface SupplyPurchaseOrder {
|
||||
id: number;
|
||||
number: string;
|
||||
supplier: string;
|
||||
status: SupplyPurchaseOrderStatus;
|
||||
expectedDate: string | null;
|
||||
notes: string;
|
||||
total: number;
|
||||
items: SupplyPurchaseOrderItem[];
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export type SupplyPurchaseOrderPayload = {
|
||||
supplier: string;
|
||||
expectedDate?: string | null;
|
||||
notes?: string;
|
||||
items: Array<{ material: string; quantity: number; unit?: string; unitCost?: number | null }>;
|
||||
};
|
||||
|
||||
export interface SupplyPurchaseNeed {
|
||||
material: string;
|
||||
materialKey: string;
|
||||
|
||||
Reference in New Issue
Block a user