updated in production plan importer
Some checks failed
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 17s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m24s
Laravel Pint / pint (pull_request) Successful in 4m57s
Laravel Larastan / larastan (pull_request) Failing after 6m14s

This commit is contained in:
dhanabalan
2026-10-13 09:32:36 +05:30
parent 6167f865bf
commit 2fedb76a87

View File

@@ -167,7 +167,6 @@ class ProductionPlanImporter extends Importer
$workingDays = $previousRecord?->working_days ?? null; $workingDays = $previousRecord?->working_days ?? null;
$productionPlan1 = ProductionPlan::where('plant_id', $plant->id) $productionPlan1 = ProductionPlan::where('plant_id', $plant->id)
->where('line_id', $line)
->where('item_id', $itemAgaPlant->id) ->where('item_id', $itemAgaPlant->id)
->whereYear('created_at', $recordDate->year) ->whereYear('created_at', $recordDate->year)
->whereMonth('created_at', $recordDate->month) ->whereMonth('created_at', $recordDate->month)
@@ -175,6 +174,7 @@ class ProductionPlanImporter extends Importer
if ($productionPlan1) { if ($productionPlan1) {
$productionPlan1->update([ $productionPlan1->update([
'line_id' => $line,
'plan_quantity' => $this->data['plan_quantity'], 'plan_quantity' => $this->data['plan_quantity'],
'working_days' => $workingDays, 'working_days' => $workingDays,
'operator_id' => $operatorName, '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; return null;
} }