Changed logic for efficiency for production report and commented in mail report capacity quantity
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user