1
0
forked from poc/pds

changed logic in producion report for night query

This commit is contained in:
dhanabalan
2026-09-29 10:46:36 +05:30
parent 71358225ff
commit 99288cad3a

View File

@@ -267,14 +267,14 @@ class SendProductionReport extends Command
->where('line_id', $line->id)
->whereBetween('created_at', [
$startDate->copy()->setTime(19, 30, 0),
$endDate->copy()->addDay()->setTime(8, 0, 0),
$endDate->copy()->setTime(8, 0, 0),
])
->count();
}
$dayShiftEfficiency = $dayShiftPlanQuan > 0 ? ($dayproductionQuantity / $dayShiftPlanQuan) * 100 : 0;
$nightShiftEfficiency = $dayShiftPlanQuan > 0 ? ($nightproductionQuantity / $nightShiftPlanQuan) * 100 : 0;
$nightShiftEfficiency = $nightShiftPlanQuan > 0 ? ($nightproductionQuantity / $nightShiftPlanQuan) * 100 : 0;
$efficiency = round($efficiency, 2);