diff --git a/app/Console/Commands/SendProductionReport.php b/app/Console/Commands/SendProductionReport.php index 6c01eaa9..49bc744b 100644 --- a/app/Console/Commands/SendProductionReport.php +++ b/app/Console/Commands/SendProductionReport.php @@ -247,6 +247,7 @@ class SendProductionReport extends Command // $totalTargetQuantity = round($dailyTarget + $previousRemaining, 2); + $totalTargetQuantity = round($dailyTarget, 2); // $totalHourlyQuantity = Item::whereIn('id', $itemIds) @@ -293,9 +294,16 @@ class SendProductionReport extends Command $efficiency = 0; } - $dayShiftPlanQuan = ($totalTargetQuantity / 2); - - $nightShiftPlanQuan = ($totalTargetQuantity / 2); + if($line->shift_flag == '0'){ + $dayShiftPlanQuan = ($totalTargetQuantity / 2); + $nightShiftPlanQuan = ($totalTargetQuantity / 2); + } + elseif($line->shift_flag == '1'){ + $dayShiftPlanQuan = ($totalTargetQuantity); + } + elseif($line->shift_flag == '2'){ + $nightShiftPlanQuan = ($totalTargetQuantity); + } if (strtolower($line->type) == 'fg line') {