JTL Import
This commit is contained in:
@@ -33,7 +33,7 @@ class Order
|
||||
#[ORM\Column]
|
||||
private array $data = [];
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, name: 'change_date', options: ['default' => 'CURRENT_TIMESTAMP'])]
|
||||
#[ORM\Column(name: 'change_date',type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
|
||||
private ?\DateTimeInterface $changeDate = null;
|
||||
|
||||
public function getId(): ?int
|
||||
|
||||
@@ -27,7 +27,7 @@ class Product
|
||||
// #[ORM\Column(length: 255)]
|
||||
// private ?string $modellbez = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, name: 'change_date', options: ['default' => 'CURRENT_TIMESTAMP'])]
|
||||
#[ORM\Column(name: 'change_date', type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
|
||||
private ?\DateTimeInterface $updateTime = null;
|
||||
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ class Stock
|
||||
#[ORM\ManyToOne(inversedBy: 'stocks')]
|
||||
private ?Warehouse $warehouse = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATETIME_MUTABLE, name: 'change_date', options: ['default' => 'CURRENT_TIMESTAMP'])]
|
||||
#[ORM\Column(name: 'change_date',type: Types::DATETIME_MUTABLE, nullable: true, options: ['default' => 'CURRENT_TIMESTAMP'])]
|
||||
private ?\DateTimeInterface $update_time = null;
|
||||
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ class HiltesImport
|
||||
{
|
||||
$finder = Finder::create();
|
||||
$finder
|
||||
->in($this->currentDirPath.'/hiltes/')
|
||||
->in($this->currentDirPath.'/hiltes/h2c/')
|
||||
->depth(0);
|
||||
#->filter(static function (SplFileInfo $file) {
|
||||
# return $file->isDir() || \preg_match('/\.(php|json)$/', $file->getPathname());
|
||||
@@ -170,11 +170,11 @@ class HiltesImport
|
||||
protected function saveData(Array $arr){
|
||||
dump($arr);
|
||||
#*** Speichert und/oder Holt WareHouse ab
|
||||
$wareHouse = $this->checkWareHouseName($arr[0]);
|
||||
$wareHouse = $this->checkWareHouseName($arr[2]);
|
||||
|
||||
#*** PRodukt wird angelegt oder geholt ****
|
||||
#filiale;etikettnr;menge;
|
||||
$prodId = $this->checkProduct($arr[1]);
|
||||
$prodId = $this->checkProduct($arr[0]);
|
||||
#*** Ermitteln ob schon ein ID vorhadnen für ProdId und WareHouseId
|
||||
if(!empty($wareHouse) && !empty($this->cachedStockIds[$prodId][$wareHouse->getId()])){
|
||||
$stock = $this->cachedStockIds[$prodId][$wareHouse->getId()];
|
||||
|
||||
Reference in New Issue
Block a user