add fixed export
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Marko 2023-11-24 15:08:31 +01:00
parent 16aac3adc6
commit 8fea094593
No known key found for this signature in database
2 changed files with 12 additions and 10 deletions

View File

@ -60,7 +60,6 @@ class HiltesImport
throw new RuntimeException("Error: File not found - " . $file['realPath']);
}
}
$this->logger->info("Imported $count stocks");
} else {
$this->logger->info('No Files');
@ -130,10 +129,8 @@ class HiltesImport
$this->logger->error($e->getMessage());
}
// unlink($srcFile);
// unlink($srcFile . '.Ende');
unlink($this->rootPath . '/hiltes/h2c/WS.FERTIG');
unlink($srcFile);
unlink($srcFile . '.Ende');
$this->logger->info($count . ' Datensätze importiert');

View File

@ -78,12 +78,17 @@ class Jtl
$warehouse = $s->getWarehouse();
$warehouseName = $warehouse->getName();
$data[$s->getProductId() . $warehouseName] = [
'gtin' => $products[$s->getProductId()]->getGtin(),
'stock' => $s->getInstock(),
'warehouse' => $this->arrLager[$warehouseName] ?? 'Lager ' . $warehouseName
];
if (isset($products[$s->getProductId()])) {
$data[$s->getProductId() . $warehouseName] = [
'gtin' => $products[$s->getProductId()]->getGtin(),
'stock' => $s->getInstock(),
'warehouse' => $this->arrLager[$warehouseName] ?? 'Lager ' . $warehouseName,
'lager' => '01'
];
} else {
$this->logger->info('No product for stock ' . $s->getProductId());
}
}
} else {
//Wenn Product nicht gefunden werden kann, dann setzte Bestand auf Null