mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-25 15:55:48 +00:00
feat(FE-212): add types for purchase creation and updates
This commit is contained in:
+47
@@ -0,0 +1,47 @@
|
|||||||
|
import { BaseMetadata } from '@/types/api/api-general';
|
||||||
|
import { Supplier } from '@/types/api/master-data/supplier';
|
||||||
|
import { Warehouse } from '@/types/api/master-data/warehouse';
|
||||||
|
|
||||||
|
export type BasePurchase = {
|
||||||
|
id: number;
|
||||||
|
pr_number: string;
|
||||||
|
po_number: string;
|
||||||
|
po_date: string;
|
||||||
|
supplier: Supplier;
|
||||||
|
warehouse: Warehouse[];
|
||||||
|
credit_term: number;
|
||||||
|
due_date: string;
|
||||||
|
grand_total: number;
|
||||||
|
notes?: string | null;
|
||||||
|
deleted_at?: string | null;
|
||||||
|
created_by: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type Purchase = BaseMetadata & BasePurchase;
|
||||||
|
|
||||||
|
export type CreatePurchasePayload = {
|
||||||
|
pr_number: string;
|
||||||
|
po_number: string;
|
||||||
|
po_date: string;
|
||||||
|
supplier_id: number;
|
||||||
|
warehouse_ids: number[];
|
||||||
|
credit_term: number;
|
||||||
|
due_date: string;
|
||||||
|
grand_total: number;
|
||||||
|
notes?: string | null;
|
||||||
|
purchase_items: {
|
||||||
|
product_id: number;
|
||||||
|
product_warehouse_id?: number | null;
|
||||||
|
received_date?: string | null;
|
||||||
|
travel_number?: string | null;
|
||||||
|
travel_number_docs?: string | null;
|
||||||
|
vehicle_number?: string | null;
|
||||||
|
sub_qty: number;
|
||||||
|
total_qty: number;
|
||||||
|
total_used: number;
|
||||||
|
price: number;
|
||||||
|
total_price: number;
|
||||||
|
}[];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdatePurchasePayload = CreatePurchasePayload;
|
||||||
Reference in New Issue
Block a user