Merge pull request 'updated in production plan importer' (#1233) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 25s
Reviewed-on: #1233
This commit was merged in pull request #1233.
This commit is contained in:
@@ -167,7 +167,6 @@ class ProductionPlanImporter extends Importer
|
||||
$workingDays = $previousRecord?->working_days ?? null;
|
||||
|
||||
$productionPlan1 = ProductionPlan::where('plant_id', $plant->id)
|
||||
->where('line_id', $line)
|
||||
->where('item_id', $itemAgaPlant->id)
|
||||
->whereYear('created_at', $recordDate->year)
|
||||
->whereMonth('created_at', $recordDate->month)
|
||||
@@ -175,6 +174,7 @@ class ProductionPlanImporter extends Importer
|
||||
|
||||
if ($productionPlan1) {
|
||||
$productionPlan1->update([
|
||||
'line_id' => $line,
|
||||
'plan_quantity' => $this->data['plan_quantity'],
|
||||
'working_days' => $workingDays,
|
||||
'operator_id' => $operatorName,
|
||||
@@ -193,18 +193,6 @@ class ProductionPlanImporter extends Importer
|
||||
]);
|
||||
}
|
||||
|
||||
// ProductionPlan::updateOrCreate([
|
||||
// 'plant_id' => $plant->id,
|
||||
// 'line_id' => $line,
|
||||
// 'item_id' => $itemAgaPlant->id,
|
||||
// // 'shift_id' => $shift->id,
|
||||
// 'plan_quantity' => $this->data['plan_quantity'],
|
||||
// 'working_days' => $workingDays,
|
||||
// 'created_at' =>now(),
|
||||
// 'updated_at' => now(),
|
||||
// 'operator_id' => $operatorName,
|
||||
// ]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user