JTL Import
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace App\Command;
|
||||
|
||||
use App\Repository\OrdersRepository;
|
||||
use App\Repository\OrderRepository;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
@@ -19,9 +19,9 @@ use App\Helper\Hiltes;
|
||||
)]
|
||||
class HiltesExportCommand extends Command
|
||||
{
|
||||
public function __construct(OrdersRepository $ordersRepository, LoggerInterface $logger)
|
||||
public function __construct(OrderRepository $orderRepository, LoggerInterface $logger)
|
||||
{
|
||||
$this->ordersRepository = $ordersRepository;
|
||||
$this->orderRepository = $orderRepository;
|
||||
$this->logger = $logger;
|
||||
|
||||
parent::__construct();
|
||||
@@ -46,8 +46,22 @@ class HiltesExportCommand extends Command
|
||||
{
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
|
||||
$io->info('Start Hiltes Export');
|
||||
|
||||
$hiltes = new Hiltes();
|
||||
|
||||
|
||||
$orders = $this->orderRepository->findAll();
|
||||
|
||||
dump($orders);
|
||||
|
||||
die();
|
||||
|
||||
foreach ($orders as $order) {
|
||||
$hiltes->addOrder($order);
|
||||
}
|
||||
|
||||
|
||||
$hiltes->export('Test Test');
|
||||
|
||||
|
||||
@@ -55,4 +69,4 @@ class HiltesExportCommand extends Command
|
||||
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,12 +67,15 @@ class HiltesImportCommand extends Command
|
||||
$this->logger->error($r['text']);
|
||||
return Command::FAILURE;
|
||||
}else{
|
||||
$io->info('Start Hiltes Push Stock');
|
||||
$pushStock = new SwPushStockCommand($this->productRepository,$this->logger);
|
||||
$pushStock->execute($input,$output);
|
||||
$io->info('Start Hiltes Push JTL');
|
||||
// $pushStock = new SwPushStockCommand($this->productRepository,$this->logger);
|
||||
// $pushStock->execute($input,$output);
|
||||
|
||||
$jtl = new JtlExportCommand($this->productRepository,$this->stockRepository,$this->warehouseRepository,$this->logger);
|
||||
$jtl->execute($input,$output);
|
||||
|
||||
$io->success('Done.');
|
||||
return Command::SUCCESS;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user