Add supply purchase order workflow

This commit is contained in:
Cauê Faleiros
2026-08-25 11:10:36 -03:00
parent 91f3e5e00c
commit 21d9960145
6 changed files with 223 additions and 4 deletions

View File

@@ -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;