mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-24 07:15:44 +00:00
feat(FE-365): create marketing report types
This commit is contained in:
Vendored
+61
@@ -0,0 +1,61 @@
|
|||||||
|
import { BaseMetadata } from '@/types/api/api-general';
|
||||||
|
import { BaseCustomer, Customer } from '@/types/api/master-data/customer';
|
||||||
|
import {
|
||||||
|
BaseWarehouseArea,
|
||||||
|
BaseWarehouseKandang,
|
||||||
|
BaseWarehouseLocation,
|
||||||
|
Warehouse,
|
||||||
|
} from '@/types/api/master-data/warehouse';
|
||||||
|
import { Location } from '@/types/api/master-data/location';
|
||||||
|
import { Area } from '@/types/api/master-data/area';
|
||||||
|
import { BaseProduct } from '@/types/api/master-data/product';
|
||||||
|
|
||||||
|
export type BaseDailyMarketingRow = {
|
||||||
|
no: number;
|
||||||
|
so_date: string; // e.g. "01-Dec-2025"
|
||||||
|
do_date: string; // e.g. "08-Dec-2025"
|
||||||
|
aging_days: number;
|
||||||
|
|
||||||
|
warehouse: BaseWarehouseArea | BaseWarehouseLocation | BaseWarehouseKandang;
|
||||||
|
customer: BaseCustomer;
|
||||||
|
sales: string;
|
||||||
|
product: BaseProduct;
|
||||||
|
|
||||||
|
do_number: string;
|
||||||
|
vehicle_number: string;
|
||||||
|
marketing_type: string;
|
||||||
|
|
||||||
|
qty: number;
|
||||||
|
average_weight_kg: number;
|
||||||
|
total_weight_kg: number;
|
||||||
|
|
||||||
|
sales_price_per_kg: number;
|
||||||
|
hpp_price_per_kg: number;
|
||||||
|
|
||||||
|
sales_amount: number;
|
||||||
|
hpp_amount: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DailyMarketingRow = BaseMetadata & BaseDailyMarketingRow;
|
||||||
|
|
||||||
|
export interface SalesSummary {
|
||||||
|
total_qty: number;
|
||||||
|
total_weight_kg: number;
|
||||||
|
total_sales_amount: number;
|
||||||
|
total_hpp_amount: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DailyMarketingReport = {
|
||||||
|
rows: DailyMarketingRow[];
|
||||||
|
summary: SalesSummary;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type MarketingReportFilters = {
|
||||||
|
area_id?: number;
|
||||||
|
location_id?: number;
|
||||||
|
warehouse_id?: number;
|
||||||
|
customer_id?: number;
|
||||||
|
start_date?: string;
|
||||||
|
end_date?: string;
|
||||||
|
date_type?: 'realized' | 'transaction';
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user