From aef98bb4b67861bde95a693388afc6d149a52fe8 Mon Sep 17 00:00:00 2001 From: dotworker Date: Tue, 28 Feb 2023 10:50:55 +0100 Subject: [PATCH] Import angepasst --- src/Helper/HiltesImport.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Helper/HiltesImport.php b/src/Helper/HiltesImport.php index 817e2bf..84e892e 100644 --- a/src/Helper/HiltesImport.php +++ b/src/Helper/HiltesImport.php @@ -217,7 +217,7 @@ class HiltesImport $warehouse2 = false; if(empty($this->cachedWarehouseIds[$wareHouseName])){ #*** Check - $warehouse2 = $this->warehouseRepository->findOneBy(['id'=> (int)$wareHouseName]); + $warehouse2 = $this->warehouseRepository->findOneBy(['name'=> $wareHouseName]); #dump($warehouse2); if(empty($warehouse2)){ $warehouse = new Warehouse(); @@ -226,7 +226,8 @@ class HiltesImport # $this->warehouseRepository->save($warehouse,true); #***************** - $warehouse2 = $this->warehouseRepository->findOneBy(['id'=> (int)$wareHouseName]); + #$warehouse2 = $this->warehouseRepository->findOneBy(['name'=> $wareHouseName]); + $warehouse2 = $warehouse; #dump($warehouse2); } $this->cachedWarehouseIds[$wareHouseName] = $warehouse2; @@ -250,7 +251,7 @@ class HiltesImport # $this->productRepository->save($prod,true); #***************** - $prod2 = $this->productRepository->findOneBy(['gtin'=> $gtin]); + $prod2 = $prod;#$this->productRepository->findOneBy(['gtin'=> $gtin]); #dump($warehouse2); } $this->cachedProdIds[$gtin] = $prod2->getId();