Fix: Ensure group work center is retrieved when plant is found

This commit is contained in:
dhanabalan
2025-10-29 16:36:59 +05:30
parent d166b7461c
commit e7b4f1c716

View File

@@ -67,6 +67,7 @@ class MachineImporter extends Importer
$warnMsg[] = "Plant not found!"; $warnMsg[] = "Plant not found!";
} }
else { else {
$groupWorkCenter = WorkGroupMaster::where('name', $this->data['workGroupMaster'])->where('plant_id', $plant->id)->first();
$line = Line::where('name', $this->data['line'])->where('plant_id', $plant->id)->first(); $line = Line::where('name', $this->data['line'])->where('plant_id', $plant->id)->first();
if ($line) { if ($line) {
$grpWrkCnr = $line->no_of_operation; $grpWrkCnr = $line->no_of_operation;