update fix data chicken counting not showing before publish cutoff #2
This commit is contained in:
1 parent
3fe6b05258
commit
d9e04a2bd7
2 files changed
+5
-7
No files matched your search
@@ -38,10 +38,10 @@ function stockAkhirByDate(
|
||||
const kpiByDate = new Map(kpis.map((k) => [k.date, k]));
|
||||
const manualByDate = new Map(manualInputs.map((m) => [m.date, m]));
|
||||
|
||||
const lastCycleDay = Math.max(0, (cycle.total_days || 1) - 1);
|
||||
const calendarDay = cycleDayForDate(cycle.start_date, todayIso());
|
||||
const endDay = cycle.end_date ? cycleDayForDate(cycle.start_date, cycle.end_date) : calendarDay;
|
||||
const maxDay = Math.min(calendarDay, lastCycleDay, endDay);
|
||||
const maxDay = cycle.end_date
|
||||
? Math.min(calendarDay, cycleDayForDate(cycle.start_date, cycle.end_date))
|
||||
: calendarDay;
|
||||
|
||||
const result = new Map<string, number>();
|
||||
let previousStockAkhir = 0;
|
||||
|
||||
Reference in new issue
Block a user