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