Import angepasst
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
dotworker 2023-02-28 10:50:55 +01:00
parent 101f3652c5
commit aef98bb4b6

View File

@ -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();