adjust ai insight and seed data
This commit is contained in:
1 parent
68e0d1a0bb
commit
a2b5b10977
18 files changed
+1835
-140
No files matched your search
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* KPI.chicken_life = DOC − cumulative mortality (excludes harvest).
|
||||
* Stock akhir (in-house remaining) = chicken_life − harvest_total.
|
||||
*/
|
||||
export function stockAkhirFromKpi(
|
||||
kpi: { chicken_life?: number | null; harvest_total?: number | null } | null | undefined
|
||||
): number | null {
|
||||
if (kpi?.chicken_life == null) return null;
|
||||
return Math.max(0, kpi.chicken_life - (kpi.harvest_total ?? 0));
|
||||
}
|
||||
Reference in new issue
Block a user