diff --git a/app/Console/Commands/SendProductionReport.php b/app/Console/Commands/SendProductionReport.php index c7acbd3..6b7b88d 100644 --- a/app/Console/Commands/SendProductionReport.php +++ b/app/Console/Commands/SendProductionReport.php @@ -74,7 +74,7 @@ class SendProductionReport extends Command $tableData = []; $no = 1; - // . + // .. // foreach ($plants as $plant) { // $lines = Line::where('plant_id', $plant->id)->get(); @@ -240,8 +240,8 @@ class SendProductionReport extends Command ->count(); } - if ($capacityQuan > 0) { - $efficiency = ($productionQuantity / $capacityQuan) * 100; + if ($totalTargetQuantity > 0) { + $efficiency = ($totalTargetQuantity / $productionQuantity) * 100; } else { $efficiency = 0; } diff --git a/resources/views/mail/production_report.blade.php b/resources/views/mail/production_report.blade.php index 9267994..9bb759a 100644 --- a/resources/views/mail/production_report.blade.php +++ b/resources/views/mail/production_report.blade.php @@ -62,10 +62,10 @@