issue solved for production pln in production report
This commit is contained in:
@@ -124,6 +124,9 @@ class SendProductionReport extends Command
|
||||
$startDate = now()->setTime(8, 0, 0);
|
||||
$endDate = now()->copy()->addDay()->setTime(8, 0, 0);
|
||||
|
||||
$PlanstartDate = now()->setTime(8, 0, 0);
|
||||
$planendDate = now()->copy()->addDay()->setTime(7, 59, 00);
|
||||
|
||||
$tableData = [];
|
||||
$no = 1;
|
||||
|
||||
@@ -133,7 +136,7 @@ class SendProductionReport extends Command
|
||||
|
||||
$targetQuantity = ProductionPlan::where('plant_id', $plantId)
|
||||
->where('line_id', $lineId)
|
||||
->whereBetween('created_at', [$startDate, $endDate])
|
||||
->whereBetween('created_at', [$PlanstartDate, $planendDate])
|
||||
->sum('plan_quantity');
|
||||
|
||||
$productionQuantity = ProductionQuantity::where('plant_id', $plantId)
|
||||
@@ -150,10 +153,10 @@ class SendProductionReport extends Command
|
||||
];
|
||||
}
|
||||
|
||||
// $this->table(
|
||||
// ['No', 'Plant', 'Line', 'Target Quantity', 'Production Quantity'],
|
||||
// $tableData
|
||||
// );
|
||||
$this->table(
|
||||
['No', 'Plant', 'Line', 'Target Quantity', 'Production Quantity'],
|
||||
$tableData
|
||||
);
|
||||
|
||||
if (!empty($emails)) {
|
||||
foreach ($emails as $email) {
|
||||
|
||||
Reference in New Issue
Block a user