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/app/Http/Controllers/CharacteristicsController.php b/app/Http/Controllers/CharacteristicsController.php index 181fedc..13f91c8 100644 --- a/app/Http/Controllers/CharacteristicsController.php +++ b/app/Http/Controllers/CharacteristicsController.php @@ -342,7 +342,7 @@ class CharacteristicsController extends Controller $charField = 'NIL'; } - if ($expectedTime == null || $expectedTime == '' || $expectedTime == '0' || ! $expectedTime) { + if ($expectedTime == null || $expectedTime == '' || ($markedStatus == 'Marked' && $expectedTime == '0')) { // || ! $expectedTime return response()->json([ 'status_code' => 'ERROR', 'status_description' => "Expected time can't be empty or zero!", 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 @@ Plant Line Line Type - Capacity Quantity + {{-- Capacity Quantity --}} Target Quantity Production Quantity - OverAll Efficiency(%) + Plan Vs Actual Efficiency(%) @@ -75,7 +75,7 @@ {{ $row['plant'] }} {{ $row['line'] }} {{ $row['type'] }} - {{ $row['capacityQuantity'] }} + {{-- {{ $row['capacityQuantity'] }} --}} {{ $row['targetQuantity'] }} {{ $row['productionQuantity'] }} {{ $row['efficiency'] }}