Added production quantity report logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Failing after 7s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Laravel Pint / pint (pull_request) Successful in 2m42s
Laravel Larastan / larastan (pull_request) Failing after 5m54s

This commit is contained in:
dhanabalan
2026-11-17 09:34:04 +05:30
parent 24e6d4069d
commit a652fdf5ab

View File

@@ -468,6 +468,14 @@ class SendProductionReport extends Command
} }
if (strtolower($line->type) == 'base fg line') {
$productionQuantity = ProductionQuantity::where('plant_id', $plant->id)
->where('line_id', $line->id)
->whereBetween('created_at', [$startDate, $endDate])
->count();
}
$dayShiftEfficiency = $dayShiftPlanQuan > 0 ? ($dayproductionQuantity / $dayShiftPlanQuan) * 100 : 0; $dayShiftEfficiency = $dayShiftPlanQuan > 0 ? ($dayproductionQuantity / $dayShiftPlanQuan) * 100 : 0;
$nightShiftEfficiency = $nightShiftPlanQuan > 0 ? ($nightproductionQuantity / $nightShiftPlanQuan) * 100 : 0; $nightShiftEfficiency = $nightShiftPlanQuan > 0 ? ($nightproductionQuantity / $nightShiftPlanQuan) * 100 : 0;