diff --git a/app/Console/Commands/SendProductionReport.php b/app/Console/Commands/SendProductionReport.php index 7f4b25f6..fe7585ee 100644 --- a/app/Console/Commands/SendProductionReport.php +++ b/app/Console/Commands/SendProductionReport.php @@ -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; $nightShiftEfficiency = $nightShiftPlanQuan > 0 ? ($nightproductionQuantity / $nightShiftPlanQuan) * 100 : 0;