refactor(FE-363): Extract row and summary types for logistic report

This commit is contained in:
rstubryan
2025-12-18 14:35:10 +07:00
parent 2d8e479b6c
commit 20494657c6
+27 -17
View File
@@ -3,21 +3,31 @@ import { Supplier } from '@/types/api/supplier/supplier';
import { Product } from '@/types/api/product/product';
import { Warehouse } from '@/types/api/warehouse/warehouse';
export type LogisticPurchasePerSupplierReport = BaseMetadata & {
rows: {
supplier: Supplier;
receive_date: string;
po_date: string;
po_number: string;
product: Product;
warehouse: Warehouse;
qty: number;
unit_price: number;
purchase_value: number;
transport_unit_price: number;
transport_value: number;
total_amount: number;
expedition: string;
delivery_number: string;
}[];
export type LogisticPurchasePerSupplierReportRow = {
receive_date: string;
po_date: string;
po_number: string;
product: Product;
warehouse: Warehouse;
qty: number;
unit_price: number;
purchase_value: number;
transport_unit_price: number;
transport_value: number;
total_amount: number;
expedition: string;
delivery_number: string;
};
export type LogisticPurchasePerSupplierSummary = {
total_qty: number;
total_purchase_value: number;
total_transport_value: number;
total_amount: number;
};
export type LogisticPurchasePerSupplierReport = BaseMetadata & {
supplier: Supplier;
rows: LogisticPurchasePerSupplierReportRow[];
summary: LogisticPurchasePerSupplierSummary;
};