From a652fdf5ab61be39a24796972cc167c3baf5a794 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 17 Nov 2026 09:34:04 +0530 Subject: [PATCH] Added production quantity report logic --- app/Console/Commands/SendProductionReport.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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; -- 2.49.1