Merge branch 'feat/closing-finance-kandang' into 'development'

[FEAT/FE] Refactor Response Data Closing Finance

See merge request mbugroup/lti-web-client!193
This commit is contained in:
Rivaldi A N S
2026-01-16 12:01:29 +00:00
2 changed files with 139 additions and 359 deletions
+32 -47
View File
@@ -219,64 +219,30 @@ export type ClosingSales = BaseMetadata & BaseClosingSales;
// ====== FINANCE ======
export interface ClosingFinance {
project_flock_id: number;
period: number;
project_type: string;
volume_base: ClosingFinanceVolumeBase;
hpp_purchases: ClosingFinanceHppPurchases;
hpp: ClosingFinanceHpp;
profit_loss: ClosingFinanceProfitLoss;
}
export interface ClosingFinanceProfitLoss {
title: string;
data: ProfitLossData;
export interface ClosingFinanceHpp {
items: HppItem[];
summary: HppSummary;
}
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 {
export interface HppItem {
id: number;
category: string;
code: string;
label: string;
budgeting: HppPurchaseDataAmount;
realization: HppPurchaseDataAmount;
}
export interface HppPurchaseData {
type: string;
export interface HppSummary {
label: string;
budgeting: HppPurchaseDataAmount;
realization: HppPurchaseDataAmount;
egg_budgeting: HppPurchaseDataAmount;
egg_realization: HppPurchaseDataAmount;
}
export interface HppPurchaseDataAmount {
@@ -285,8 +251,27 @@ export interface HppPurchaseDataAmount {
amount: number;
}
export interface DataSummarySubTotal {
export interface ClosingFinanceProfitLoss {
items: ProfitLossItem[];
summary: ProfitLossSummary;
}
export interface ProfitLossItem {
code: string;
label: string;
type: string;
rp_per_bird: number;
rp_per_kg: number;
amount: number;
}
export interface ProfitLossSummary {
gross_profit: ProfitLossAmount;
sub_total: ProfitLossAmount;
net_profit: ProfitLossAmount;
}
export interface ProfitLossAmount {
rp_per_bird: number;
rp_per_kg: number;
amount: number;