Updated item code get func. (if plant exist)
This commit is contained in:
@@ -187,7 +187,10 @@ class StickerMasterImporter extends Importer
|
|||||||
if (!$plant) {
|
if (!$plant) {
|
||||||
$warnMsg[] = "Plant not found";
|
$warnMsg[] = "Plant not found";
|
||||||
}
|
}
|
||||||
$item = Item::where('code', $this->data['item'])->where('plant_id', $plant->id)->first();
|
$item = null;
|
||||||
|
if ($plant) {
|
||||||
|
$item = Item::where('code', $this->data['item'])->where('plant_id', $plant->id)->first();
|
||||||
|
}
|
||||||
if (!$item) {
|
if (!$item) {
|
||||||
$warnMsg[] = "Item code not found";
|
$warnMsg[] = "Item code not found";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user