feat(FE): Closing Finance and adjust reports expense filter request

This commit is contained in:
randy-ar
2025-12-16 17:52:59 +07:00
parent 9c09395677
commit b02b458034
15 changed files with 1476 additions and 254 deletions
+75
View File
@@ -142,3 +142,78 @@ export type OverheadTotal = {
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
View File
@@ -35,7 +35,6 @@ export type ReportExpense = {
supplier: Supplier;
realization_date: string;
transaction_date: string;
location: Location;
pengajuan: Pengajuan;
realisasi: Realisasi;
kandang: Kandang;
@@ -49,9 +48,8 @@ export type ReportExpenseSearchParams = {
locationId: string | null;
supplierId: string | null;
kandangId: string | null;
startDate: string | null;
endDate: string | null;
nonstockId: string | null;
realizationDate: string | null;
category: string | null;
period: string | number;
search: string;
};