updated in production plan importer #1233

Merged
jothi merged 1 commits from ranjith-dev into master 2026-10-13 04:03:05 +00:00
Showing only changes of commit 2fedb76a87 - Show all commits

View File

@@ -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;
}