mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-21 13:55:45 +00:00
Merge branch 'development' of gitlab.com:mbugroup/lti-web-client into feat/FE/US-339/purchase-report
This commit is contained in:
Vendored
+141
@@ -23,6 +23,33 @@ export type BaseSales = {
|
||||
payment_status: string;
|
||||
};
|
||||
|
||||
export type BaseClosingSales = {
|
||||
project_type: string;
|
||||
flock_id: number;
|
||||
period: number;
|
||||
sales: BaseSales[];
|
||||
};
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
import { Product } from '@type/api/master-data/product';
|
||||
import { Customer } from '@type/api/master-data/customer';
|
||||
import { BaseMetadata } from '@/types/api/api-general';
|
||||
|
||||
export type BaseSales = {
|
||||
id: number;
|
||||
realization_date: string;
|
||||
age: number;
|
||||
do_number: string;
|
||||
product: Product;
|
||||
customer: Customer;
|
||||
qty: number;
|
||||
weight: number;
|
||||
avg_weight: number;
|
||||
price: number;
|
||||
total_price: number;
|
||||
kandang: Kandang;
|
||||
payment_status: string;
|
||||
};
|
||||
|
||||
export type BaseClosingSales = {
|
||||
project_type: string;
|
||||
flock_id: number;
|
||||
@@ -79,6 +106,44 @@ export type ClosingIncomingSapronak = {
|
||||
|
||||
export type ClosingOutgoingSapronak = ClosingIncomingSapronak;
|
||||
|
||||
export type ClosingProductionData = {
|
||||
purchase: {
|
||||
initial_population: number;
|
||||
claim_culling: number;
|
||||
final_population: number;
|
||||
feed_in: number;
|
||||
feed_used: number;
|
||||
feed_used_per_head: number;
|
||||
};
|
||||
|
||||
sales: {
|
||||
chicken: {
|
||||
sales_population: number;
|
||||
sales_weight: number;
|
||||
average_weight: number;
|
||||
chicken_average_selling_price: number;
|
||||
};
|
||||
egg?: {
|
||||
egg_pieces: number;
|
||||
egg_mass_kg: number;
|
||||
average_egg_weight_kg: number;
|
||||
egg_average_selling_price: number;
|
||||
};
|
||||
};
|
||||
|
||||
performance: {
|
||||
depletion: number;
|
||||
age_day: number;
|
||||
mortality_std: number;
|
||||
mortality_act: number;
|
||||
deff_mortality: number;
|
||||
fcr_std: number;
|
||||
fcr_act: number;
|
||||
deff_fcr: number;
|
||||
awg: number;
|
||||
};
|
||||
};
|
||||
|
||||
// ====== PERHITUNGAN SAPRONAK ======
|
||||
|
||||
export type RowSapronakCalculation = {
|
||||
@@ -141,4 +206,80 @@ export type OverheadTotal = {
|
||||
actual_total_amount: number;
|
||||
cost_per_bird: number;
|
||||
};
|
||||
|
||||
export type ClosingSales = BaseMetadata & BaseClosingSales;
|
||||
|
||||
// ====== FINANCE ======
|
||||
export interface ClosingFinance {
|
||||
project_flock_id: number;
|
||||
period: number;
|
||||
project_type: string;
|
||||
volume_base: ClosingFinanceVolumeBase;
|
||||
hpp_purchases: ClosingFinanceHppPurchases;
|
||||
profit_loss: ClosingFinanceProfitLoss;
|
||||
}
|
||||
|
||||
export interface ClosingFinanceProfitLoss {
|
||||
title: string;
|
||||
data: ProfitLossData;
|
||||
}
|
||||
|
||||
export interface ClosingFinanceHppPurchases {
|
||||
title: string;
|
||||
hpp: GroupHppPurchase[];
|
||||
summary_hpp: HppPurchasesSummary;
|
||||
}
|
||||
|
||||
export interface ClosingFinanceVolumeBase {
|
||||
total_birds: number;
|
||||
total_weight_kg: number;
|
||||
}
|
||||
|
||||
export interface ProfitLossData {
|
||||
penjualan: ProfitLossDataAmount[];
|
||||
pembelian: ProfitLossDataAmount[];
|
||||
summary: ProfitLossDataSummary;
|
||||
}
|
||||
|
||||
export interface GroupHppPurchase {
|
||||
group_name: string;
|
||||
data: HppPurchaseData[];
|
||||
}
|
||||
|
||||
export interface ProfitLossDataSummary {
|
||||
gross_profit: DataSummarySubTotal;
|
||||
sub_total: DataSummarySubTotal;
|
||||
net_profit: DataSummarySubTotal;
|
||||
}
|
||||
|
||||
export interface ProfitLossDataAmount {
|
||||
type: string;
|
||||
rp_per_bird: number;
|
||||
rp_per_kg: number;
|
||||
amount: number;
|
||||
}
|
||||
|
||||
export interface HppPurchasesSummary {
|
||||
label: string;
|
||||
budgeting: HppPurchaseDataAmount;
|
||||
realization: HppPurchaseDataAmount;
|
||||
}
|
||||
|
||||
export interface HppPurchaseData {
|
||||
type: string;
|
||||
budgeting: HppPurchaseDataAmount;
|
||||
realization: HppPurchaseDataAmount;
|
||||
}
|
||||
|
||||
export interface HppPurchaseDataAmount {
|
||||
rp_per_bird: number;
|
||||
rp_per_kg: number;
|
||||
amount: number;
|
||||
}
|
||||
|
||||
export interface DataSummarySubTotal {
|
||||
label: string;
|
||||
rp_per_bird: number;
|
||||
rp_per_kg: number;
|
||||
amount: number;
|
||||
}
|
||||
|
||||
+2
-4
@@ -4,10 +4,8 @@ import { BaseMetadata } from '@/types/api/api-general';
|
||||
|
||||
export type BaseInventoryAdjustment = {
|
||||
id: number;
|
||||
transaction_type: string;
|
||||
quantity: number;
|
||||
before_quantity: number;
|
||||
after_quantity: number;
|
||||
increase: number;
|
||||
decrease: number;
|
||||
note: string;
|
||||
product_warehouse_id: number;
|
||||
product_warehouse: {
|
||||
|
||||
-1
@@ -10,7 +10,6 @@ export type BaseKandang = {
|
||||
capacity: number;
|
||||
pic: BaseUser;
|
||||
project_flock_kandang_id?: number;
|
||||
capacity: number;
|
||||
};
|
||||
|
||||
export type Kandang = BaseMetadata & BaseKandang;
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
import { BaseMetadata } from '@types/api/base-metadata';
|
||||
import { Supplier } from '@/types/api/master-data/supplier';
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
|
||||
export type HppPerKandangRow = {
|
||||
id: number;
|
||||
kandang: Kandang;
|
||||
weight_range: {
|
||||
weight_min: number;
|
||||
weight_max: number;
|
||||
};
|
||||
remaining_chicken_birds: number;
|
||||
remaining_chicken_weight_kg: number;
|
||||
avg_weight_kg: number;
|
||||
egg_production_pieces: number;
|
||||
egg_production_kg: number;
|
||||
egg_hpp_rp_per_kg: number;
|
||||
egg_value_rp: number;
|
||||
feed_suppliers: Supplier[];
|
||||
doc_suppliers: Supplier[];
|
||||
average_doc_price_rp: number;
|
||||
hpp_rp: number;
|
||||
remaining_value_rp: number;
|
||||
};
|
||||
|
||||
export type HppPerKandangSummaryTotal = {
|
||||
total_remaining_chicken_birds: number;
|
||||
total_remaining_chicken_weight_kg: number;
|
||||
average_weight_kg: number;
|
||||
total_remaining_value_rp: number;
|
||||
total_egg_production_pieces: number;
|
||||
total_egg_production_kg: number;
|
||||
average_egg_hpp_rp_per_kg: number;
|
||||
total_egg_value_rp: number;
|
||||
total_hpp_rp: number;
|
||||
total_average_doc_price_rp: number;
|
||||
};
|
||||
|
||||
export type HppPerKandangPerWeightRange = {
|
||||
id: number;
|
||||
weight_range: {
|
||||
weight_min: number;
|
||||
weight_max: number;
|
||||
};
|
||||
label: string;
|
||||
remaining_chicken_birds: number;
|
||||
remaining_chicken_weight_kg: number;
|
||||
avg_weight_kg: number;
|
||||
egg_production_pieces: number;
|
||||
egg_production_kg: number;
|
||||
egg_hpp_rp_per_kg: number;
|
||||
egg_value_rp: number;
|
||||
feed_suppliers: Supplier[];
|
||||
doc_suppliers: Supplier[];
|
||||
average_doc_price_rp: number;
|
||||
hpp_rp: number;
|
||||
remaining_value_rp: number;
|
||||
};
|
||||
|
||||
export type HppPerKandangSummary = {
|
||||
per_weight_range: HppPerKandangPerWeightRange[];
|
||||
total: HppPerKandangSummaryTotal;
|
||||
};
|
||||
|
||||
export type HppPerKandangReport = BaseMetadata & {
|
||||
period: string;
|
||||
rows: HppPerKandangRow[];
|
||||
summary: HppPerKandangSummary;
|
||||
};
|
||||
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';
|
||||
};
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
import { BaseApproval, CreatedUser } from '@/types/api/api-general';
|
||||
import { Supplier } from '@/types/api/master-data/supplier';
|
||||
import { Location } from '@/types/api/master-data/location';
|
||||
import { Nonstock } from '@/types/api/master-data/nonstock';
|
||||
import { Kandang } from '@/types/api/master-data/kandang';
|
||||
|
||||
export type Pengajuan = {
|
||||
id: number;
|
||||
expense_id: number;
|
||||
project_flock_kandang_id: number;
|
||||
kandang_id: number;
|
||||
nonstock_id: number;
|
||||
qty: number;
|
||||
price: number;
|
||||
notes: string;
|
||||
nonstock: Nonstock;
|
||||
created_at: string;
|
||||
};
|
||||
|
||||
export type Realisasi = {
|
||||
id: number;
|
||||
expense_nonstock_id: number;
|
||||
qty: number;
|
||||
price: number;
|
||||
notes: string;
|
||||
nonstock: Nonstock;
|
||||
created_at: string;
|
||||
};
|
||||
|
||||
export type ReportExpense = {
|
||||
id: number;
|
||||
reference_number: string;
|
||||
po_number: string;
|
||||
category: string;
|
||||
supplier: Supplier;
|
||||
realization_date: string;
|
||||
transaction_date: string;
|
||||
pengajuan: Pengajuan;
|
||||
realisasi: Realisasi;
|
||||
kandang: Kandang;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
created_user: CreatedUser;
|
||||
latest_approval: BaseApproval;
|
||||
};
|
||||
|
||||
export type ReportExpenseSearchParams = {
|
||||
locationId: string | null;
|
||||
supplierId: string | null;
|
||||
kandangId: string | null;
|
||||
nonstockId: string | null;
|
||||
realizationDate: string | null;
|
||||
category: string | null;
|
||||
search: string;
|
||||
};
|
||||
Reference in New Issue
Block a user