= $setting->getId(); ?>
diff --git a/Admin/Install/Media.php b/Admin/Install/Media.php
index 42d3d51..e37d2a0 100755
--- a/Admin/Install/Media.php
+++ b/Admin/Install/Media.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange\Admin\Install
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract;
* Media class.
*
* @package Modules\Exchange\Admin\Install
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json
index 60512ae..ce53674 100755
--- a/Admin/Install/Navigation.install.json
+++ b/Admin/Install/Navigation.install.json
@@ -5,7 +5,7 @@
"type": 2,
"subtype": 1,
"name": "Exchange",
- "uri": "{/lang}/{/app}/admin/exchange/log/list?{?}",
+ "uri": "{/base}/admin/exchange/log/list?{?}",
"target": "self",
"icon": null,
"order": 50,
@@ -19,7 +19,7 @@
"type": 3,
"subtype": 1,
"name": "Dashboard",
- "uri": "{/lang}/{/app}/admin/exchange/log/list?{?}",
+ "uri": "{/base}/admin/exchange/log/list?{?}",
"target": "self",
"icon": null,
"order": 1,
@@ -34,7 +34,7 @@
"type": 3,
"subtype": 1,
"name": "Import",
- "uri": "{/lang}/{/app}/admin/exchange/import/list",
+ "uri": "{/base}/admin/exchange/import/list",
"target": "self",
"icon": null,
"order": 5,
@@ -49,7 +49,7 @@
"type": 3,
"subtype": 1,
"name": "Export",
- "uri": "{/lang}/{/app}/admin/exchange/export/list",
+ "uri": "{/base}/admin/exchange/export/list",
"target": "self",
"icon": null,
"order": 10,
diff --git a/Admin/Install/Navigation.php b/Admin/Install/Navigation.php
index c1e989c..9e6e9f5 100755
--- a/Admin/Install/Navigation.php
+++ b/Admin/Install/Navigation.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange\Admin\Install
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract;
* Navigation class.
*
* @package Modules\Exchange\Admin\Install
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/Admin/Installer.php b/Admin/Installer.php
index 3141c26..e5ac7c9 100755
--- a/Admin/Installer.php
+++ b/Admin/Installer.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -27,7 +27,7 @@ use phpOMS\Uri\HttpUri;
* Installer class.
*
* @package Modules\Exchange
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/Admin/Routes/Web/Api.php b/Admin/Routes/Web/Api.php
index b340619..f0940aa 100755
--- a/Admin/Routes/Web/Api.php
+++ b/Admin/Routes/Web/Api.php
@@ -6,7 +6,7 @@
*
* @package Modules
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php
index f70066d..39b9551 100755
--- a/Admin/Routes/Web/Backend.php
+++ b/Admin/Routes/Web/Backend.php
@@ -6,7 +6,7 @@
*
* @package Modules
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/Admin/Status.php b/Admin/Status.php
index 1c2024f..231c87e 100755
--- a/Admin/Status.php
+++ b/Admin/Status.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -20,7 +20,7 @@ use phpOMS\Module\StatusAbstract;
* Status class.
*
* @package Modules\Exchange
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/Admin/Uninstaller.php b/Admin/Uninstaller.php
index c9ab90d..c936e74 100755
--- a/Admin/Uninstaller.php
+++ b/Admin/Uninstaller.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -20,7 +20,7 @@ use phpOMS\Module\UninstallerAbstract;
* Uninstaller class.
*
* @package Modules\Exchange
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/Admin/Updater.php b/Admin/Updater.php
index b2782d9..915a5e4 100755
--- a/Admin/Updater.php
+++ b/Admin/Updater.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -20,7 +20,7 @@ use phpOMS\Module\UpdaterAbstract;
* Updater class.
*
* @package Modules\Exchange
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/Controller/ApiController.php b/Controller/ApiController.php
index 0fcd486..b9a22cd 100755
--- a/Controller/ApiController.php
+++ b/Controller/ApiController.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -41,7 +41,7 @@ use phpOMS\Utils\StringUtils;
* Exchange controller class.
*
* @package Modules\Exchange
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@@ -116,18 +116,18 @@ final class ApiController extends Controller
if (!empty($request->getData('dbtype'))) {
$remoteConnection = ConnectionFactory::create([
'db' => (string) $request->getData('dbtype'),
- 'host' => $request->getData('dbhost', 'string'),
- 'port' => $request->getData('dbport', 'int'),
- 'database' => $request->getData('dbdatabase', 'string'),
- 'login' => $request->getData('dblogin', 'string'),
- 'password' => $request->getData('dbpassword', 'string'),
+ 'host' => $request->getDataString('dbhost'),
+ 'port' => $request->getDataInt('dbport'),
+ 'database' => $request->getDataString('dbdatabase'),
+ 'login' => $request->getDataString('dblogin'),
+ 'password' => $request->getDataString('dbpassword'),
]);
}
$importer = new \Modules\Exchange\Interface\Importer(
$this->app->dbPool->get(),
$remoteConnection,
- new L11nManager($this->app->appName)
+ new L11nManager()
);
break;
@@ -214,8 +214,8 @@ final class ApiController extends Controller
/** @var \Modules\Media\Models\Collection $collection */
$collection = $this->app->moduleManager->get('Media')->createMediaCollectionFromMedia(
- (string) ($request->getData('name') ?? ''),
- (string) ($request->getData('description') ?? ''),
+ $request->getDataString('name') ?? '',
+ $request->getDataString('description') ?? '',
$files,
$request->header->account
);
@@ -227,7 +227,7 @@ final class ApiController extends Controller
return;
}
- $collection->setPath('/Modules/Media/Files/Modules/Exchange/Interface/' . ((string) ($request->getData('title') ?? '')));
+ $collection->setPath('/Modules/Media/Files/Modules/Exchange/Interface/' . ($request->getDataString('title') ?? ''));
$collection->setVirtualPath('/Modules/Exchange/Interface');
$this->createModel($request->header->account, $collection, CollectionMapper::class, 'collection', $request->getOrigin());
@@ -251,11 +251,11 @@ final class ApiController extends Controller
private function createInterfaceFromRequest(RequestAbstract $request, int $collectionId) : InterfaceManager
{
$interface = new InterfaceManager();
- $interface->title = (string) ($request->getData('title') ?? '');
- $interface->hasExport = (bool) ($request->getData('export') ?? false);
- $interface->hasImport = (bool) ($request->getData('import') ?? false);
- $interface->website = (string) ($request->getData('website') ?? '');
- $interface->version = (string) ($request->getData('version') ?? '');
+ $interface->title = $request->getDataString('title') ?? '';
+ $interface->hasExport = $request->getDataBool('export') ?? false;
+ $interface->hasImport = $request->getDataBool('import') ?? false;
+ $interface->website = $request->getDataString('website') ?? '';
+ $interface->version = $request->getDataString('version') ?? '';
$interface->createdBy = new NullAccount($request->header->account);
if ($collectionId > 0) {
@@ -353,7 +353,7 @@ final class ApiController extends Controller
$exporter = new \Modules\Exchange\Interface\Exporter(
$this->app->dbPool->get(),
new NullConnection(),
- new L11nManager($this->app->appName)
+ new L11nManager()
);
break;
@@ -426,9 +426,9 @@ final class ApiController extends Controller
private function createSettingFromRequest(RequestAbstract $request) : ExchangeSetting
{
$setting = new ExchangeSetting();
- $setting->title = (string) ($request->getData('title') ?? '');
- $setting->exchange = (int) ($request->getData('id') ?? 0);
- $setting->setData(\json_decode((string) ($request->getData('data') ?? '{}'), true));
+ $setting->title = $request->getDataString('title') ?? '';
+ $setting->exchange = $request->getDataInt('id') ?? 0;
+ $setting->setData($request->getDataJson('data'));
return $setting;
}
diff --git a/Controller/BackendController.php b/Controller/BackendController.php
index beb097c..3d9621a 100755
--- a/Controller/BackendController.php
+++ b/Controller/BackendController.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -25,7 +25,7 @@ use phpOMS\Views\View;
* Exchange controller class.
*
* @package Modules\Exchange
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
* @codeCoverageIgnore
@@ -52,11 +52,11 @@ final class BackendController extends Controller
if ($request->getData('ptype') === 'p') {
$view->setData('logs',
- ExchangeLogMapper::getAll()->where('id', (int) ($request->getData('id') ?? 0), '<')->limit(25)->execute()
+ ExchangeLogMapper::getAll()->where('id', $request->getDataInt('id') ?? 0, '<')->limit(25)->execute()
);
} elseif ($request->getData('ptype') === 'n') {
$view->setData('logs',
- ExchangeLogMapper::getAll()->where('id', (int) ($request->getData('id') ?? 0), '>')->limit(25)->execute()
+ ExchangeLogMapper::getAll()->where('id', $request->getDataInt('id') ?? 0, '>')->limit(25)->execute()
);
} else {
$view->setData('logs',
diff --git a/Controller/Controller.php b/Controller/Controller.php
index f47b137..bf82d2b 100755
--- a/Controller/Controller.php
+++ b/Controller/Controller.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -20,7 +20,7 @@ use phpOMS\Module\ModuleAbstract;
* Exchange controller class.
*
* @package Modules\Exchange
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/Interfaces/GSD/Import/AccountImport.php b/Interfaces/GSD/Import/AccountImport.php
deleted file mode 100755
index 6b5b1d3..0000000
--- a/Interfaces/GSD/Import/AccountImport.php
+++ /dev/null
@@ -1,27 +0,0 @@
-importCostCenter($start, $end);
- $this->importCostObject($start, $end);
- $this->importCustomer($start, $end);
- $this->importSupplier($start, $end);
- $this->importArticle($start, $end);
- $this->importAccount($start, $end);
- $this->importInvoice($start, $end);
- $this->importPosting($start, $end);
- $this->importBatchPosting($start, $end);
- }
-
- /**
- * Import data from request
- *
- * @param RequestAbstract $request Request
- *
- * @return array
- *
- * @since 1.0.0
- */
- public function importFromRequest(RequestAbstract $request) : array
- {
- $start = new \DateTime($request->getData('start') ?? 'now');
- $end = new \DateTime($request->getData('end') ?? 'now');
-
- $this->remote = ConnectionFactory::create([
- 'db' => (string) ($request->getData('db') ?? ''),
- 'host' => (string) ($request->getData('host') ?? ''),
- 'port' => (int) ($request->getData('port') ?? 0),
- 'database' => (string) ($request->getData('database') ?? ''),
- 'login' => (string) ($request->getData('login') ?? ''),
- 'password' => (string) ($request->getData('password') ?? ''),
- 'datetimeformat' => (string) ($request->getData('datetimeformat') ?? 'Y-m-d H:i:s'),
- ]);
-
- $this->remote->connect();
-
- $this->account = $request->header->account;
-
- if ($this->remote->getStatus() !== DatabaseStatus::OK) {
- return [];
- }
-
- if (((bool) ($request->getData('customers') ?? false))) {
- $this->importCustomer($start, $end);
- }
-
- if (((bool) ($request->getData('suppliers') ?? false))) {
- $this->importSupplier($start, $end);
- }
-
- if (((bool) ($request->getData('accounts') ?? false))) {
- $this->importAccount($start, $end);
- }
-
- if (((bool) ($request->getData('costcenters') ?? false))) {
- $this->importCostCenter($start, $end);
- }
-
- if (((bool) ($request->getData('costobjects') ?? false))) {
- $this->importCostObject($start, $end);
- }
-
- if (((bool) ($request->getData('articles') ?? false))) {
- $this->importArticle($start, $end, $request->getFiles()['articles_backend'] ?? []);
- }
-
- if (((bool) ($request->getData('invoices') ?? false))) {
- $this->importInvoice($start, $end);
- }
-
- return [];
- }
-
- /**
- * Import cost centers
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importCostCenter(\DateTime $start, \DateTime $end) : void
- {
- /** @var GSDCostCenter[] $costCenters */
- $costCenters = GSDCostCenterMapper::getAll($this->remote)
- ->where('createdAt', $start, '>=')
- ->where('createdAt', $end, '<=')
- ->execute();
-
- foreach ($costCenters as $cc) {
- $obj = new CostCenter();
- $obj->code = $cc->getCostCenter();
- $obj->l11n->name = \trim($cc->description, " ,\t");
-
- CostCenterMapper::create()->execute($obj);
- }
- }
-
- /**
- * Import cost objects
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importCostObject(\DateTime $start, \DateTime $end) : void
- {
- /** @var GSDCostObject[] $costObjects */
- $costObjects = GSDCostObjectMapper::getAll($this->remote)
- ->where('createdAt', $start, '>=')
- ->where('createdAt', $end, '<=')
- ->execute();
-
- foreach ($costObjects as $co) {
- $obj = new CostObject();
- $obj->code = $co->getCostObject();
- $obj->l11n->name = \trim($co->description, " ,\t");
-
- CostObjectMapper::create()->execute($obj);
- }
- }
-
- /**
- * Import customers
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importCustomer(\DateTime $start, \DateTime $end) : void
- {
- /** @var GSDCustomer[] $customers */
- $customers = GSDCustomerMapper::getAll($this->remote)
- ->where('createdAt', $start, '>=')
- ->where('createdAt', $end, '<=')
- ->execute();
-
- foreach ($customers as $customer) {
- $account = new Account();
- $account->name1 = \trim($customer->addr->name1, " ,\t");
-
- $a = \trim($customer->addr->name2, " ,\t");
- $b = \trim($customer->addr->name3, " ,\t");
- $account->name2 = \trim($a . ' ' . $b);
-
- $profile = new Profile($account);
-
- $obj = new Client();
- $obj->number = \trim($customer->number, "., \t");
- $obj->profile = $profile;
-
- $addr = new Address();
- $addr->address = \trim($customer->addr->street, ", \t");
- $addr->postal = \trim($customer->addr->zip, ",. \t");
- $addr->city = \trim($customer->addr->city, ",. \t");
- $addr->setCountry(ISO3166TwoEnum::_DEU);
- $obj->mainAddress = $addr;
-
- if (!empty(\trim($customer->addr->phone, ",. \t"))) {
- $phone = new ContactElement();
- $phone->setType(ContactType::PHONE);
- $phone->setSubtype(0);
- $phone->content = \trim($customer->addr->phone, ",. \t");
- $obj->addContactElement($phone);
- }
-
- if (!empty(\trim($customer->addr->website, ",. \t"))) {
- $website = new ContactElement();
- $website->setType(ContactType::WEBSITE);
- $website->setSubtype(0);
- $website->content = \trim($customer->addr->website, ",. \t");
- $obj->addContactElement($website);
- }
-
- if (!empty(\trim($customer->addr->fax, ",. \t"))) {
- $fax = new ContactElement();
- $fax->setType(ContactType::FAX);
- $fax->setSubtype(0);
- $fax->content = \trim($customer->addr->fax, ",. \t");
- $obj->addContactElement($fax);
- }
-
- if (!empty(\trim($customer->addr->email, ",. \t"))) {
- $email = new ContactElement();
- $email->setType(ContactType::EMAIL);
- $email->setSubtype(0);
- $email->content = \trim($customer->addr->email, ",. \t");
- $obj->addContactElement($email);
- }
-
- ClientMapper::create()->execute($obj);
- }
- }
-
- /**
- * Import suppliers
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importSupplier(\DateTime $start, \DateTime $end) : void
- {
- /** @var GSDSupplier[] $suppliers */
- $suppliers = GSDSupplierMapper::getAll($this->remote)
- ->where('createdAt', $start, '>=')
- ->where('createdAt', $end, '<=')
- ->execute();
-
- foreach ($suppliers as $supplier) {
- $account = new Account();
- $account->name1 = \trim($supplier->addr->name1, " ,\t");
-
- $a = \trim($supplier->addr->name2, " ,\t");
- $b = \trim($supplier->addr->name3, " ,\t");
- $account->name2 = \trim($a . ' ' . $b);
-
- $profile = new Profile($account);
-
- $obj = new Supplier();
- $obj->number = \trim($supplier->number, "., \t");
- $obj->profile = $profile;
-
- $addr = new Address();
- $addr->address = \trim($supplier->addr->street, ", \t");
- $addr->postal = \trim($supplier->addr->zip, ",. \t");
- $addr->city = \trim($supplier->addr->city, ",. \t");
- $addr->setCountry(ISO3166TwoEnum::_DEU);
- $obj->mainAddress = $addr;
-
- if (!empty(\trim($supplier->addr->phone, ",. \t"))) {
- $phone = new ContactElement();
- $phone->setType(ContactType::PHONE);
- $phone->setSubtype(0);
- $phone->content = \trim($supplier->addr->phone, ",. \t");
- $obj->addContactElement($phone);
- }
-
- if (!empty(\trim($supplier->addr->website, ",. \t"))) {
- $website = new ContactElement();
- $website->setType(ContactType::WEBSITE);
- $website->setSubtype(0);
- $website->content = \trim($supplier->addr->website, ",. \t");
- $obj->addContactElement($website);
- }
-
- if (!empty(\trim($supplier->addr->fax, ",. \t"))) {
- $fax = new ContactElement();
- $fax->setType(ContactType::FAX);
- $fax->setSubtype(0);
- $fax->content = \trim($supplier->addr->fax, ",. \t");
- $obj->addContactElement($fax);
- }
-
- if (!empty(\trim($supplier->addr->email, ",. \t"))) {
- $email = new ContactElement();
- $email->setType(ContactType::EMAIL);
- $email->setSubtype(0);
- $email->content = \trim($supplier->addr->email, ",. \t");
- $obj->addContactElement($email);
- }
-
- SupplierMapper::create()->execute($obj);
- }
- }
-
- /**
- * Import accounts
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importAccount(\DateTime $start, \DateTime $end) : void
- {
- }
-
- /**
- * Import articles
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- * @param array $files Article images
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importArticle(\DateTime $start, \DateTime $end, array $files = []) : void
- {
- /** @var GSDArticle[] $articles */
- $articles = GSDArticleMapper::getAll($this->remote)
- ->where('createdAt', $start, '>=')
- ->where('createdAt', $end, '<=')
- ->execute();
-
- $itemL11nType = $this->createItemL11nTypes();
- $itemAttrType = $this->createItemAttributeTypes();
- $itemAttrValue = $this->createItemAttributeValues($itemAttrType);
-
- $images = [];
- $imagePath = Controller::FILE_PATH . '/Modules/ItemManagement/Articles/Images';
-
- /** @var Media[] $media */
- $media = [];
- if (!empty($files)) {
- if (!\is_dir($imagePath)) {
- \mkdir($imagePath, 0755, true);
- }
-
- $jpgOld = Directory::listByExtension($imagePath, 'jpg');
- $pngOld = Directory::listByExtension($imagePath, 'png');
- $imagesOld = \array_merge($jpgOld, $pngOld);
-
- Zip::unpack($files['tmp_name'], $imagePath);
-
- $jpg = Directory::listByExtension($imagePath, 'jpg');
- $png = Directory::listByExtension($imagePath, 'png');
- $images = \array_merge($jpg, $png);
- $images = \array_diff($images, $imagesOld);
-
- /** @var string[] $images */
- /** @var string $image */
- foreach ($images as $image) {
- $number = (int) \explode('.', $image)[0];
-
- $media[$number] = new Media();
- $media[$number]->name = (string) $number;
- $media[$number]->type = null;
- $media[$number]->setPath('/Modules/Media/Files/Modules/ItemManagement/Articles/Images/' . $image);
- $media[$number]->setVirtualPath('/Modules/ItemManagement/Articles/Images');
- $media[$number]->extension = \explode('.', $image)[1];
- $media[$number]->size = (int) \filesize($imagePath . '/' . $image);
- $media[$number]->createdBy = new NullAccount($this->account);
-
- MediaMapper::create()->execute($media[$number]);
- }
- }
-
- //$itemAttrType['segment'] = new ItemAttributeType();
- //$itemAttrType['productgroup'] = new ItemAttributeType();
- //$itemAttrType['devaluation'] = new ItemAttributeType();
-
- foreach ($articles as $article) {
- $number = (int) \trim($article->number, ",. \t");
-
- $obj = new Item();
- $obj->number = (string) $number;
-
- // German Language
- $obj->addL11n(new ItemL11n(
- $itemL11nType['name1'],
- \trim($article->name1, " ,\t"),
- ISO639x1Enum::_DE
- ));
-
- $obj->addL11n(new ItemL11n(
- $itemL11nType['name2'],
- \trim($article->name2, " ,\t"),
- ISO639x1Enum::_DE
- ));
-
- $obj->addL11n(new ItemL11n(
- $itemL11nType['info'],
- \trim($article->infoSales, " ,\t"),
- ISO639x1Enum::_DE
- ));
-
- // English Language
- $obj->addL11n(new ItemL11n(
- $itemL11nType['name1'],
- empty($t = \trim($article->name1Eng, " ,\t"))
- ? \trim($article->name1, " ,\t")
- : $t,
- ISO639x1Enum::_EN
- ));
-
- $obj->addL11n(new ItemL11n(
- $itemL11nType['name2'],
- empty($t = \trim($article->name2Eng, " ,\t"))
- ? \trim($article->name2, " ,\t")
- : $t,
- ISO639x1Enum::_EN
- ));
-
- if (isset($media[$number])) {
- $obj->addFile($media[$number]);
- }
-
- ItemMapper::create()->execute($obj);
- }
- }
-
- /**
- * Create and get item l11n types
- *
- * @return ItemL11nType[]
- *
- * @since 1.0.0
- */
- private function createItemL11nTypes() : array
- {
- /** @var array{name1:ItemL11nType, name2:ItemL11nType, info:ItemL11nType} $itemL11nType */
- $itemL11nType = [];
-
- if (($itemL11nType['name1'] = ItemL11nTypeMapper::get()->where('title', 'name1')->execute()) instanceof NullItemL11nType) {
- $itemL11nType['name1'] = new ItemL11nType('name1');
- ItemL11nTypeMapper::create()->execute($itemL11nType['name1']);
- }
-
- if (($itemL11nType['name2'] = ItemL11nTypeMapper::get()->where('title', 'name2')->execute()) instanceof NullItemL11nType) {
- $itemL11nType['name2'] = new ItemL11nType('name2');
- ItemL11nTypeMapper::create()->execute($itemL11nType['name2']);
- }
-
- if (($itemL11nType['info'] = ItemL11nTypeMapper::get()->where('title', 'info')->execute()) instanceof NullItemL11nType) {
- $itemL11nType['info'] = new ItemL11nType('info');
- ItemL11nTypeMapper::create()->execute($itemL11nType['info']);
- }
-
- /** @var array{name1:ItemL11nType, name2:ItemL11nType, info:ItemL11nType} $itemL11nType */
- return $itemL11nType;
- }
-
- /**
- * Create and get item attribute types
- *
- * @return array
- *
- * @since 1.0.0
- */
- private function createItemAttributeTypes() : array
- {
- $itemAttrType = [];
-
- if (($itemAttrType['tradegroup'] = ItemAttributeTypeMapper::get()->where('name', 'tradegroup')->execute()) instanceof NullItemAttributeType) {
- $itemAttrType['tradegroup'] = new ItemAttributeType('tradegroup');
- ItemAttributeTypeMapper::create()->execute($itemAttrType['tradegroup']);
-
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['tradegroup']->getId(), 'Trade Group', ISO639x1Enum::_EN));
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['tradegroup']->getId(), 'Handelsgruppe', ISO639x1Enum::_DE));
- }
-
- if (($itemAttrType['exportcontrolgroup'] = ItemAttributeTypeMapper::get()->where('name', 'exportcontrolgroup')->execute()) instanceof NullItemAttributeType) {
- $itemAttrType['exportcontrolgroup'] = new ItemAttributeType('exportcontrolgroup');
- ItemAttributeTypeMapper::create()->execute($itemAttrType['exportcontrolgroup']);
-
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['exportcontrolgroup']->getId(), 'Export Control Group', ISO639x1Enum::_EN));
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['exportcontrolgroup']->getId(), 'Exportkontrollgruppe', ISO639x1Enum::_DE));
- }
-
- if (($itemAttrType['medicalgroup'] = ItemAttributeTypeMapper::get()->where('name', 'medicalgroup')->execute()) instanceof NullItemAttributeType) {
- $itemAttrType['medicalgroup'] = new ItemAttributeType('medicalgroup');
- ItemAttributeTypeMapper::create()->execute($itemAttrType['medicalgroup']);
-
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['medicalgroup']->getId(), 'Medical Device Group', ISO639x1Enum::_EN));
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['medicalgroup']->getId(), 'Medezinproduktklasse', ISO639x1Enum::_DE));
- }
-
- if (($itemAttrType['customsnumber'] = ItemAttributeTypeMapper::get()->where('name', 'customsnumber')->execute()) instanceof NullItemAttributeType) {
- $itemAttrType['customsnumber'] = new ItemAttributeType('customsnumber');
- ItemAttributeTypeMapper::create()->execute($itemAttrType['customsnumber']);
-
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['customsnumber']->getId(), 'Customs Number', ISO639x1Enum::_EN));
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['customsnumber']->getId(), 'Zolltarifnummer', ISO639x1Enum::_DE));
- }
-
- if (($itemAttrType['unnumber'] = ItemAttributeTypeMapper::get()->where('name', 'unnumber')->execute()) instanceof NullItemAttributeType) {
- $itemAttrType['unnumber'] = new ItemAttributeType('unnumber');
- ItemAttributeTypeMapper::create()->execute($itemAttrType['unnumber']);
-
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['unnumber']->getId(), 'UN-Number', ISO639x1Enum::_EN));
- ItemAttributeTypeL11nMapper::create()->execute(new BaseStringL11n($itemAttrType['unnumber']->getId(), 'UN-Nummer', ISO639x1Enum::_DE));
- }
-
- return $itemAttrType;
- }
-
- /**
- * Create and get item attribute values
- *
- * @param ItemAttributeType[] $itemAttrType Attribute types
- *
- * @return ItemAttributeValue[]
- *
- * @since 1.0.0
- */
- private function createItemAttributeValues(array $itemAttrType) : array
- {
- $itemAttrValue = [];
-
- return $itemAttrValue;
- }
-
- /**
- * Import invoices
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importInvoice(\DateTime $start, \DateTime $end) : void
- {
- }
-
- /**
- * Import postings
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importPosting(\DateTime $start, \DateTime $end) : void
- {
- }
-
- /**
- * Import batch postings
- *
- * @param \DateTime $start Start time (inclusive)
- * @param \DateTime $end End time (inclusive)
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function importBatchPosting(\DateTime $start, \DateTime $end) : void
- {
- }
-}
diff --git a/Interfaces/GSD/Lang/de.lang.php b/Interfaces/GSD/Lang/de.lang.php
deleted file mode 100755
index 329ffac..0000000
--- a/Interfaces/GSD/Lang/de.lang.php
+++ /dev/null
@@ -1,27 +0,0 @@
- 'Anlagevermögen',
- 'Accounts' => 'Konten',
- 'Articles' => 'Artikel',
- 'CostCenters' => 'Kostenstellen',
- 'CostObjects' => 'Kostenträger',
- 'Customers' => 'Kunden',
- 'Invoices' => 'Rechnungen',
- 'Options' => 'Optionen',
- 'Postings' => 'Buchungen',
- 'Stocks' => 'Lager',
- 'Suppliers' => 'Lieferanten',
-];
diff --git a/Interfaces/GSD/Lang/en.lang.php b/Interfaces/GSD/Lang/en.lang.php
deleted file mode 100755
index 3e8e012..0000000
--- a/Interfaces/GSD/Lang/en.lang.php
+++ /dev/null
@@ -1,27 +0,0 @@
- 'Assets',
- 'Accounts' => 'Accounts',
- 'Articles' => 'Articles',
- 'CostCenters' => 'Cost Centers',
- 'CostObjects' => 'Cost Objects',
- 'Customers' => 'Customers',
- 'Invoices' => 'Invoices',
- 'Options' => 'Options',
- 'Postings' => 'Postings',
- 'Stocks' => 'Stocks',
- 'Suppliers' => 'Suppliers',
-];
diff --git a/Interfaces/GSD/Model/Account.php b/Interfaces/GSD/Model/Account.php
deleted file mode 100755
index 0d275ec..0000000
--- a/Interfaces/GSD/Model/Account.php
+++ /dev/null
@@ -1,27 +0,0 @@
-createdAt = new \DateTimeImmutable('now');
- }
-}
diff --git a/Interfaces/GSD/Model/GSDAddressMapper.php b/Interfaces/GSD/Model/GSDAddressMapper.php
deleted file mode 100755
index 60e45b8..0000000
--- a/Interfaces/GSD/Model/GSDAddressMapper.php
+++ /dev/null
@@ -1,75 +0,0 @@
-
- * @since 1.0.0
- */
- public const COLUMNS = [
- 'Nummer' => ['name' => 'Nummer', 'type' => 'int', 'internal' => 'id'],
- 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
- 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
- 'Name1' => ['name' => 'Name1', 'type' => 'string', 'internal' => 'name1'],
- 'Name2' => ['name' => 'Name2', 'type' => 'string', 'internal' => 'name2'],
- 'Name3' => ['name' => 'Name3', 'type' => 'string', 'internal' => 'name3'],
- 'Ort' => ['name' => 'Ort', 'type' => 'string', 'internal' => 'city'],
- 'PLZ' => ['name' => 'PLZ', 'type' => 'string', 'internal' => 'zip'],
- 'Strasse' => ['name' => 'Strasse', 'type' => 'string', 'internal' => 'street'],
- 'Land' => ['name' => 'Land', 'type' => 'string', 'internal' => 'country'],
- 'Telefon' => ['name' => 'Telefon', 'type' => 'string', 'internal' => 'phone'],
- 'Fax' => ['name' => 'Fax', 'type' => 'string', 'internal' => 'fax'],
- 'EMail' => ['name' => 'EMail', 'type' => 'string', 'internal' => 'email'],
- 'InternetAdresse' => ['name' => 'InternetAdresse', 'type' => 'string', 'internal' => 'website'],
- ];
-
- /**
- * Primary table.
- *
- * @var string
- * @since 1.0.0
- */
- public const TABLE = 'Adressen';
-
- /**
- * Created at.
- *
- * @var string
- * @since 1.0.0
- */
- public const CREATED_AT = 'row_create_time';
-
- /**
- * Primary field name.
- *
- * @var string
- * @since 1.0.0
- */
- public const PRIMARYFIELD = 'Nummer';
-}
diff --git a/Interfaces/GSD/Model/GSDArticle.php b/Interfaces/GSD/Model/GSDArticle.php
deleted file mode 100755
index 15ecf15..0000000
--- a/Interfaces/GSD/Model/GSDArticle.php
+++ /dev/null
@@ -1,148 +0,0 @@
-createdAt = new \DateTimeImmutable('now');
- }
-}
diff --git a/Interfaces/GSD/Model/GSDArticleMapper.php b/Interfaces/GSD/Model/GSDArticleMapper.php
deleted file mode 100755
index 0bd3ddb..0000000
--- a/Interfaces/GSD/Model/GSDArticleMapper.php
+++ /dev/null
@@ -1,112 +0,0 @@
-
- * @since 1.0.0
- */
- public const COLUMNS = [
- 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'],
- 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
- 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
- 'Artikelnummer' => ['name' => 'Artikelnummer', 'type' => 'string', 'internal' => 'number'],
- 'Auslaufartikel' => ['name' => 'Auslaufartikel', 'type' => 'bool', 'internal' => 'isDiscontinued'],
- '_Artikelsperre' => ['name' => '_Artikelsperre', 'type' => 'bool', 'internal' => 'isBlocked'],
- 'ManuelleChargenEntnahme' => ['name' => 'ManuelleChargenEntnahme', 'type' => 'bool', 'internal' => 'manualLotUse'],
- 'Chargenverwaltung' => ['name' => 'Chargenverwaltung', 'type' => 'string', 'internal' => 'lotManagement'],
- 'Seriennummernvergabe' => ['name' => 'Seriennummernvergabe', 'type' => 'bool', 'internal' => 'hasSN'],
- '_Minusbestand' => ['name' => '_Minusbestand', 'type' => 'bool', 'internal' => 'negativeStock'],
- '_Exportartikel' => ['name' => '_Exportartikel', 'type' => 'bool', 'internal' => 'exportItem'],
- '_DrittlandArtikel' => ['name' => '_DrittlandArtikel', 'type' => 'bool', 'internal' => 'nonEUItem'],
- '_DualUse' => ['name' => '_DualUse', 'type' => 'bool', 'internal' => 'dualUse'],
- 'EkEinheit' => ['name' => 'EkEinheit', 'type' => 'string', 'internal' => 'purchaseUnit'],
- 'Gewicht' => ['name' => 'Gewicht', 'type' => 'float', 'internal' => 'weight'],
- 'Hoehe' => ['name' => 'Hoehe', 'type' => 'float', 'internal' => 'height'],
- 'Laenge' => ['name' => 'Laenge', 'type' => 'float', 'internal' => 'length'],
- 'Volumen' => ['name' => 'Volumen', 'type' => 'float', 'internal' => 'volume'],
- 'Mindestbestand' => ['name' => 'Mindestbestand', 'type' => 'float', 'internal' => 'minimalStock'],
- 'BeschaffungszeitWochen' => ['name' => 'BeschaffungszeitWochen', 'type' => 'int', 'internal' => 'leadTimeWeeks'],
- 'BeschaffungszeitTage' => ['name' => 'BeschaffungszeitTage', 'type' => 'int', 'internal' => 'leadTimeDays'],
- '_InfoVerkauf' => ['name' => '_InfoVerkauf', 'type' => 'string', 'internal' => 'infoSales'],
- '_InfoEinkauf' => ['name' => '_InfoEinkauf', 'type' => 'string', 'internal' => 'infoPurchase'],
- '_LagerInfo' => ['name' => '_LagerInfo', 'type' => 'string', 'internal' => 'infoWarehouse'],
- 'WebShop' => ['name' => 'WebShop', 'type' => 'int', 'internal' => 'inShop'],
- 'Artikelbezeichnung' => ['name' => 'Artikelbezeichnung', 'type' => 'string', 'internal' => 'name1'],
- '_Artikelbezeichnung2' => ['name' => '_Artikelbezeichnung2', 'type' => 'string', 'internal' => 'name2'],
- '_Englisch1' => ['name' => '_Englisch1', 'type' => 'string', 'internal' => 'name1Eng'],
- '_Englisch2' => ['name' => '_Englisch2', 'type' => 'string', 'internal' => 'name2Eng'],
- 'EUWarengruppe' => ['name' => 'EUWarengruppe', 'type' => 'string', 'internal' => 'EUitemgroup'],
- 'zolltarifnr' => ['name' => 'zolltarifnr', 'type' => 'string', 'internal' => 'customsId'],
- '_UNNummer' => ['name' => '_UNNummer', 'type' => 'string', 'internal' => 'unnumber'],
- '_Pruefabteilung' => ['name' => '_Pruefabteilung', 'type' => 'string', 'internal' => 'inspectionDepartment'],
- '_MedizinProduktklasse' => ['name' => '_MedizinProduktklasse', 'type' => 'string', 'internal' => 'medicinProductClass'],
- '_Sparte' => ['name' => '_Sparte', 'type' => 'string', 'internal' => 'sectionGroup'],
- '_Umsatzgruppe' => ['name' => '_Umsatzgruppe', 'type' => 'string', 'internal' => 'salesGroup'],
- '_Segment' => ['name' => '_Segment', 'type' => 'string', 'internal' => 'segment'],
- '_Produktgruppe' => ['name' => '_Produktgruppe', 'type' => 'int', 'internal' => 'productGroup'],
- 'Erloeskennzeichen' => ['name' => 'Erloeskennzeichen', 'type' => 'string', 'internal' => 'earningsIndicator'],
- 'Kostenkennzeichen' => ['name' => 'Kostenkennzeichen', 'type' => 'string', 'internal' => 'costsIndicator'],
- '_GewichtWeissblech' => ['name' => '_GewichtWeissblech', 'type' => 'float', 'internal' => 'weightTinplate'],
- '_GewichtSonstigeVerbunde' => ['name' => '_GewichtSonstigeVerbunde', 'type' => 'float', 'internal' => 'weightOtherComposites'],
- '_GewichtSonstiges' => ['name' => '_GewichtSonstiges', 'type' => 'float', 'internal' => 'weightOther'],
- '_GewichtPET' => ['name' => '_GewichtPET', 'type' => 'float', 'internal' => 'weightPET'],
- '_GewichtPapier' => ['name' => '_GewichtPapier', 'type' => 'float', 'internal' => 'weightPaper'],
- '_GewichtNaturmaterialien' => ['name' => '_GewichtNaturmaterialien', 'type' => 'float', 'internal' => 'weightNatureProducts'],
- '_GewichtKunststoff' => ['name' => '_GewichtKunststoff', 'type' => 'float', 'internal' => 'weightAcrylics'],
- '_GewichtKartonverbunde' => ['name' => '_GewichtKartonverbunde', 'type' => 'float', 'internal' => 'weightCarton'],
- '_GewichtGlas' => ['name' => '_GewichtGlas', 'type' => 'float', 'internal' => 'weightGlas'],
- '_GewichtAluminium' => ['name' => '_GewichtAluminium', 'type' => 'float', 'internal' => 'weightAluminium'],
- '_GewichtBrutto' => ['name' => '_GewichtBrutto', 'type' => 'float', 'internal' => 'weightGross'],
- ];
-
- /**
- * Primary table.
- *
- * @var string
- * @since 1.0.0
- */
- public const TABLE = 'Artikel';
-
- /**
- * Created at.
- *
- * @var string
- * @since 1.0.0
- */
- public const CREATED_AT = 'row_create_time';
-
- /**
- * Primary field name.
- *
- * @var string
- * @since 1.0.0
- */
- public const PRIMARYFIELD = 'row_id';
-}
diff --git a/Interfaces/GSD/Model/GSDCostCenter.php b/Interfaces/GSD/Model/GSDCostCenter.php
deleted file mode 100755
index 8e561a9..0000000
--- a/Interfaces/GSD/Model/GSDCostCenter.php
+++ /dev/null
@@ -1,148 +0,0 @@
-createdAt = new \DateTimeImmutable('now');
- }
-
- /**
- * @return \DateTimeImmutable
- *
- * @since 1.0.0
- */
- public function getCreatedAt() : \DateTimeImmutable
- {
- return $this->createdAt ?? new \DateTimeImmutable();
- }
-
- /**
- * Set cost center
- *
- * @param string $costCenter Cost center
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setCostCenter(string $costCenter) : void
- {
- $this->costCenter = $costCenter;
- }
-
- /**
- * Get cost center
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getCostCenter() : string
- {
- return $this->costCenter;
- }
-
- /**
- * Get id
- *
- * @return int
- *
- * @since 1.0.0
- */
- public function getId() : int
- {
- return $this->id;
- }
-
- /**
- * {@inheritdoc}
- */
- public function toArray() : array
- {
- return [
- 'id' => $this->id,
- 'createdBy' => $this->createdBy,
- 'createdAt' => $this->createdAt,
- 'description' => $this->description,
- 'costcenter' => $this->costCenter,
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function jsonSerialize() : mixed
- {
- return $this->toArray();
- }
-}
diff --git a/Interfaces/GSD/Model/GSDCostCenterMapper.php b/Interfaces/GSD/Model/GSDCostCenterMapper.php
deleted file mode 100755
index b673384..0000000
--- a/Interfaces/GSD/Model/GSDCostCenterMapper.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- * @since 1.0.0
- */
- public const COLUMNS = [
- 'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
- 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
- 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
- 'KST' => ['name' => 'KST', 'type' => 'string', 'internal' => 'costCenter'],
- 'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
- ];
-
- /**
- * Primary table.
- *
- * @var string
- * @since 1.0.0
- */
- public const TABLE = 'FiKostenstellen';
-
- /**
- * Created at.
- *
- * @var string
- * @since 1.0.0
- */
- public const CREATED_AT = 'row_create_time';
-
- /**
- * Primary field name.
- *
- * @var string
- * @since 1.0.0
- */
- public const PRIMARYFIELD = 'ROW_ID';
-}
diff --git a/Interfaces/GSD/Model/GSDCostObject.php b/Interfaces/GSD/Model/GSDCostObject.php
deleted file mode 100755
index de6ba64..0000000
--- a/Interfaces/GSD/Model/GSDCostObject.php
+++ /dev/null
@@ -1,148 +0,0 @@
-createdAt = new \DateTimeImmutable('now');
- }
-
- /**
- * @return \DateTimeImmutable
- *
- * @since 1.0.0
- */
- public function getCreatedAt() : \DateTimeImmutable
- {
- return $this->createdAt ?? new \DateTimeImmutable();
- }
-
- /**
- * Set cost object
- *
- * @param string $costObject Cost object
- *
- * @return void
- *
- * @since 1.0.0
- */
- public function setCostObject(string $costObject) : void
- {
- $this->costObject = $costObject;
- }
-
- /**
- * Get cost object
- *
- * @return string
- *
- * @since 1.0.0
- */
- public function getCostObject() : string
- {
- return $this->costObject;
- }
-
- /**
- * Get id
- *
- * @return int
- *
- * @since 1.0.0
- */
- public function getId() : int
- {
- return $this->id;
- }
-
- /**
- * {@inheritdoc}
- */
- public function toArray() : array
- {
- return [
- 'id' => $this->id,
- 'createdBy' => $this->createdBy,
- 'createdAt' => $this->createdAt,
- 'description' => $this->description,
- 'costObject' => $this->costObject,
- ];
- }
-
- /**
- * {@inheritdoc}
- */
- public function jsonSerialize() : mixed
- {
- return $this->toArray();
- }
-}
diff --git a/Interfaces/GSD/Model/GSDCostObjectMapper.php b/Interfaces/GSD/Model/GSDCostObjectMapper.php
deleted file mode 100755
index a589b17..0000000
--- a/Interfaces/GSD/Model/GSDCostObjectMapper.php
+++ /dev/null
@@ -1,66 +0,0 @@
-
- * @since 1.0.0
- */
- public const COLUMNS = [
- 'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
- 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
- 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
- 'KTR' => ['name' => 'KTR', 'type' => 'string', 'internal' => 'costObject'],
- 'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
- ];
-
- /**
- * Primary table.
- *
- * @var string
- * @since 1.0.0
- */
- public const TABLE = 'FiKostentraeger';
-
- /**
- * Created at.
- *
- * @var string
- * @since 1.0.0
- */
- public const CREATED_AT = 'row_create_time';
-
- /**
- * Primary field name.
- *
- * @var string
- * @since 1.0.0
- */
- public const PRIMARYFIELD = 'ROW_ID';
-}
diff --git a/Interfaces/GSD/Model/GSDCustomer.php b/Interfaces/GSD/Model/GSDCustomer.php
deleted file mode 100755
index f6424dd..0000000
--- a/Interfaces/GSD/Model/GSDCustomer.php
+++ /dev/null
@@ -1,95 +0,0 @@
-addr = new GSDAddress();
- $this->createdAt = new \DateTimeImmutable('now');
- }
-}
diff --git a/Interfaces/GSD/Model/GSDCustomerMapper.php b/Interfaces/GSD/Model/GSDCustomerMapper.php
deleted file mode 100755
index 34c6517..0000000
--- a/Interfaces/GSD/Model/GSDCustomerMapper.php
+++ /dev/null
@@ -1,104 +0,0 @@
-
- * @since 1.0.0
- */
- public const COLUMNS = [
- 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'],
- 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
- 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
- 'Kundennummer' => ['name' => 'Kundennummer', 'type' => 'string', 'internal' => 'number'],
- 'Kundentyp' => ['name' => 'Kundentyp', 'type' => 'string', 'internal' => 'customerType'],
- 'Konto' => ['name' => 'Konto', 'type' => 'int', 'internal' => 'account'],
- '_MatGuthabenKonto' => ['name' => '_MatGuthabenKonto', 'type' => 'int', 'internal' => 'materialAccount'],
- '_Rechtsform' => ['name' => '_Rechtsform', 'type' => 'int', 'internal' => 'legalType'],
- 'Sammelkonto' => ['name' => 'Sammelkonto', 'type' => 'int', 'internal' => 'accountsReceivableAccount'],
- 'Erloeskennzeichen' => ['name' => 'Erloeskennzeichen', 'type' => 'string', 'internal' => 'earningsIndicator'],
- 'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'],
- 'KreditLimitintern' => ['name' => 'KreditLimitintern', 'type' => 'float', 'internal' => 'creditlimit'],
- 'EGUstId' => ['name' => 'EGUstId', 'type' => 'string', 'internal' => 'egustid'],
- 'Steuernummer' => ['name' => 'Steuernummer', 'type' => 'string', 'internal' => 'taxid'],
- 'BIC' => ['name' => 'BIC', 'type' => 'string', 'internal' => 'bic'],
- 'IBAN' => ['name' => 'IBAN', 'type' => 'string', 'internal' => 'iban'],
- 'MandatsRef' => ['name' => 'MandatsRef', 'type' => 'string', 'internal' => 'bankRef'],
- 'Verkaeufer' => ['name' => 'Verkaeufer', 'type' => 'string', 'internal' => 'salesRep'],
- 'AdressId' => ['name' => 'AdressId', 'type' => 'int', 'internal' => 'addr'],
- 'Auftragssperre' => ['name' => 'Auftragssperre', 'type' => 'bool', 'internal' => 'isLocked'],
- '_Papierkorb' => ['name' => '_Papierkorb', 'type' => 'bool', 'internal' => 'isBlocked'],
- 'Auslauf' => ['name' => 'Auslauf', 'type' => 'bool', 'internal' => 'isDiscontinued'],
- 'Mahnsperre' => ['name' => 'Mahnsperre', 'type' => 'bool', 'internal' => 'reminderBlock'],
- 'Sammelrechnung' => ['name' => 'Sammelrechnung', 'type' => 'bool', 'internal' => 'isMonthlyInvoice'],
- '_Partnernummer1' => ['name' => '_Partnernummer1', 'type' => 'string', 'internal' => 'partner/1'],
- '_Partnernummer2' => ['name' => '_Partnernummer2', 'type' => 'string', 'internal' => 'partner/2'],
- '_Partnernummer3' => ['name' => '_Partnernummer3', 'type' => 'string', 'internal' => 'partner/3'],
- '_Partnernummer4' => ['name' => '_Partnernummer4', 'type' => 'string', 'internal' => 'partner/4'],
- '_Partnernummer5' => ['name' => '_Partnernummer5', 'type' => 'string', 'internal' => 'partner/5'],
- '_Partnernummer6' => ['name' => '_Partnernummer6', 'type' => 'string', 'internal' => 'partner/6'],
- ];
-
- /**
- * Has one relation.
- *
- * @var array
- * @since 1.0.0
- */
- public const OWNS_ONE = [
- 'addr' => [
- 'mapper' => GSDAddressMapper::class,
- 'external' => 'AdressId',
- ],
- ];
-
- /**
- * Primary table.
- *
- * @var string
- * @since 1.0.0
- */
- public const TABLE = 'Kunden';
-
- /**
- * Created at.
- *
- * @var string
- * @since 1.0.0
- */
- public const CREATED_AT = 'row_create_time';
-
- /**
- * Primary field name.
- *
- * @var string
- * @since 1.0.0
- */
- public const PRIMARYFIELD = 'row_id';
-}
diff --git a/Interfaces/GSD/Model/GSDSupplier.php b/Interfaces/GSD/Model/GSDSupplier.php
deleted file mode 100755
index 4fa2d2b..0000000
--- a/Interfaces/GSD/Model/GSDSupplier.php
+++ /dev/null
@@ -1,59 +0,0 @@
-addr = new GSDAddress();
- $this->createdAt = new \DateTimeImmutable('now');
- }
-}
diff --git a/Interfaces/GSD/Model/GSDSupplierMapper.php b/Interfaces/GSD/Model/GSDSupplierMapper.php
deleted file mode 100755
index f039c7d..0000000
--- a/Interfaces/GSD/Model/GSDSupplierMapper.php
+++ /dev/null
@@ -1,84 +0,0 @@
-
- * @since 1.0.0
- */
- public const COLUMNS = [
- 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'],
- 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
- 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
- 'LieferantenNummer' => ['name' => 'LieferantenNummer', 'type' => 'string', 'internal' => 'number'],
- 'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'],
- 'Auftragssperre' => ['name' => 'Auftragssperre', 'type' => 'string', 'internal' => 'deliveryStatus'],
- 'Steuernummer' => ['name' => 'Steuernummer', 'type' => 'string', 'internal' => 'taxid'],
- 'BIC' => ['name' => 'BIC', 'type' => 'string', 'internal' => 'bic'],
- 'IBAN' => ['name' => 'IBAN', 'type' => 'string', 'internal' => 'iban'],
- 'AdressId' => ['name' => 'AdressId', 'type' => 'int', 'internal' => 'addr'],
- ];
-
- /**
- * Has one relation.
- *
- * @var array
- * @since 1.0.0
- */
- public const OWNS_ONE = [
- 'addr' => [
- 'mapper' => GSDAddressMapper::class,
- 'external' => 'AdressId',
- ],
- ];
-
- /**
- * Primary table.
- *
- * @var string
- * @since 1.0.0
- */
- public const TABLE = 'Lieferanten';
-
- /**
- * Created at.
- *
- * @var string
- * @since 1.0.0
- */
- public const CREATED_AT = 'row_create_time';
-
- /**
- * Primary field name.
- *
- * @var string
- * @since 1.0.0
- */
- public const PRIMARYFIELD = 'row_id';
-}
diff --git a/Interfaces/GSD/Model/Invoice.php b/Interfaces/GSD/Model/Invoice.php
deleted file mode 100755
index de393ae..0000000
--- a/Interfaces/GSD/Model/Invoice.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
\ No newline at end of file
diff --git a/Interfaces/GSD/interface.json b/Interfaces/GSD/interface.json
deleted file mode 100755
index bb6bc3c..0000000
--- a/Interfaces/GSD/interface.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "name": "GSD",
- "version": "1.0.0",
- "website": "",
- "path": "GSD",
- "export": false,
- "import": true
-}
\ No newline at end of file
diff --git a/Interfaces/Intrexx/Import/PromotionImport.php b/Interfaces/Intrexx/Import/PromotionImport.php
deleted file mode 100755
index 999c0cf..0000000
--- a/Interfaces/Intrexx/Import/PromotionImport.php
+++ /dev/null
@@ -1,27 +0,0 @@
-getData('nav')->render();
$value) : ++$count;
- $url = \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/exchange/export/profile?{?}&id=' . $value->getId()); ?>
+ $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/export/profile?{?}&id=' . $value->getId()); ?>
| = $this->printHtml($value->title); ?>
diff --git a/Theme/Backend/exchange-export.tpl.php b/Theme/Backend/exchange-export.tpl.php
index 084fea2..f5023aa 100755
--- a/Theme/Backend/exchange-export.tpl.php
+++ b/Theme/Backend/exchange-export.tpl.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/Theme/Backend/exchange-import-list.tpl.php b/Theme/Backend/exchange-import-list.tpl.php
index e37c3fc..ea4173a 100755
--- a/Theme/Backend/exchange-import-list.tpl.php
+++ b/Theme/Backend/exchange-import-list.tpl.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -39,7 +39,7 @@ echo $this->getData('nav')->render();
|
$value) : ++$count;
- $url = \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/exchange/import/profile?{?}&id=' . $value->getId()); ?>
+ $url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/import/profile?{?}&id=' . $value->getId()); ?>
| = $this->printHtml($value->title); ?>
diff --git a/Theme/Backend/exchange-import.tpl.php b/Theme/Backend/exchange-import.tpl.php
index 14f5874..af98b5d 100755
--- a/Theme/Backend/exchange-import.tpl.php
+++ b/Theme/Backend/exchange-import.tpl.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/Theme/Backend/exchange-log-list.tpl.php b/Theme/Backend/exchange-log-list.tpl.php
index 883dec0..9c65379 100755
--- a/Theme/Backend/exchange-log-list.tpl.php
+++ b/Theme/Backend/exchange-log-list.tpl.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -102,7 +102,7 @@ echo $this->getData('nav')->render(); ?>
|
$value) :
++$count;
- $url = UriFactory::build('{/lang}/{/app}/admin/exchange/log?{?}&id=' . $value->getId());
+ $url = UriFactory::build('{/base}/admin/exchange/log?{?}&id=' . $value->getId());
?>
| = $value->getId(); ?>
diff --git a/Theme/Backend/exchange-log.tpl.php b/Theme/Backend/exchange-log.tpl.php
index 24c729f..dbf9b30 100755
--- a/Theme/Backend/exchange-log.tpl.php
+++ b/Theme/Backend/exchange-log.tpl.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -30,7 +30,7 @@ echo $this->getData('nav')->render();
| | = $this->getHtml('Type'); ?> | = $log->getType(); ?>
| | = $this->getHtml('Subtype'); ?> | = $log->subtype; ?>
| | = $this->getHtml('Created'); ?> | = $log->createdAt->format('Y-m-d'); ?>
- | | = $this->getHtml('Creator'); ?> | = $log->createdBy->name1; ?>
+ | | = $this->getHtml('Creator'); ?> | = $log->createdBy->name1; ?>
| | = $log->message; ?>
diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php
index 3502fb9..e95902b 100755
--- a/tests/Admin/AdminTest.php
+++ b/tests/Admin/AdminTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Autoloader.php b/tests/Autoloader.php
index d032623..d08f1b7 100755
--- a/tests/Autoloader.php
+++ b/tests/Autoloader.php
@@ -6,7 +6,7 @@
*
* @package Modules/tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -20,7 +20,7 @@ namespace tests;
* Autoloader class.
*
* @package tests
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/tests/Controller/ApiControllerTest.php b/tests/Controller/ApiControllerTest.php
index 066191b..a2a29d7 100755
--- a/tests/Controller/ApiControllerTest.php
+++ b/tests/Controller/ApiControllerTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Interfaces/OMS/Export/LanguageExport.php b/tests/Interfaces/OMS/Export/LanguageExport.php
index 75ac404..2384c0b 100755
--- a/tests/Interfaces/OMS/Export/LanguageExport.php
+++ b/tests/Interfaces/OMS/Export/LanguageExport.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange\Interfaces\OMS\Exporter
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Interfaces/OMS/Exporter.php b/tests/Interfaces/OMS/Exporter.php
index e21f490..b7a6522 100755
--- a/tests/Interfaces/OMS/Exporter.php
+++ b/tests/Interfaces/OMS/Exporter.php
@@ -6,7 +6,7 @@
*
* @package Interfaces
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -24,7 +24,7 @@ use phpOMS\Utils\StringUtils;
* OMS export class
*
* @package Modules\Exchange\Models\Interfaces\OMS
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
diff --git a/tests/Interfaces/OMS/Import/LanguageImport.php b/tests/Interfaces/OMS/Import/LanguageImport.php
index e56441c..b54a426 100755
--- a/tests/Interfaces/OMS/Import/LanguageImport.php
+++ b/tests/Interfaces/OMS/Import/LanguageImport.php
@@ -6,7 +6,7 @@
*
* @package Modules\Exchange\Interfaces\OMS\Import
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Interfaces/OMS/Importer.php b/tests/Interfaces/OMS/Importer.php
index c6b0554..b981bc0 100755
--- a/tests/Interfaces/OMS/Importer.php
+++ b/tests/Interfaces/OMS/Importer.php
@@ -6,7 +6,7 @@
*
* @package Interfaces
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
@@ -27,7 +27,7 @@ use phpOMS\Message\RequestAbstract;
* OMS import class
*
* @package Modules\Exchange\Models\Interfaces\OMS
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @link https://jingga.app
* @since 1.0.0
*/
@@ -75,14 +75,14 @@ final class Importer extends ImporterAbstract
$this->l11n->loadLanguage($request->header->l11n->getLanguage(), 'Exchange', $lang);
- if ($request->getData('db') !== null) {
+ if ($request->hasData('db')) {
$this->remote = ConnectionFactory::create([
'db' => (string) ($request->getData('db')),
- 'host' => (string) ($request->getData('host') ?? ''),
- 'port' => (int) ($request->getData('port') ?? 0),
- 'database' => (string) ($request->getData('database') ?? ''),
- 'login' => (string) ($request->getData('login') ?? ''),
- 'password' => (string) ($request->getData('password') ?? ''),
+ 'host' => $request->getDataString('host') ?? '',
+ 'port' => $request->getDataInt('port') ?? 0,
+ 'database' => $request->getDataString('database') ?? '',
+ 'login' => $request->getDataString('login') ?? '',
+ 'password' => $request->getDataString('password') ?? '',
'datetimeformat' => (string) ($request->getData('datetimeformat') ?? 'Y-m-d H:i:s'),
]);
@@ -191,7 +191,7 @@ final class Importer extends ImporterAbstract
. " *\n"
. " * @package Modules\Localization\n"
. " * @copyright Dennis Eichhorn\n"
- . " * @license OMS License 1.0\n"
+ . " * @license OMS License 2.0\n"
. " * @version 1.0.0\n"
. " * @link https://jingga.app\n"
. " */\n"
diff --git a/tests/Interfaces/OMS/Lang/en.lang.php b/tests/Interfaces/OMS/Lang/en.lang.php
index 00a11c0..0961b17 100755
--- a/tests/Interfaces/OMS/Lang/en.lang.php
+++ b/tests/Interfaces/OMS/Lang/en.lang.php
@@ -8,7 +8,7 @@ declare(strict_types=1);
*
* @package Modules\Exchange
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Interfaces/OMS/export.tpl.php b/tests/Interfaces/OMS/export.tpl.php
index ec9ddc1..bfc2efd 100755
--- a/tests/Interfaces/OMS/export.tpl.php
+++ b/tests/Interfaces/OMS/export.tpl.php
@@ -6,7 +6,7 @@
*
* @package Template
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Interfaces/OMS/import.tpl.php b/tests/Interfaces/OMS/import.tpl.php
index 7920064..0f062d8 100755
--- a/tests/Interfaces/OMS/import.tpl.php
+++ b/tests/Interfaces/OMS/import.tpl.php
@@ -6,7 +6,7 @@
*
* @package Template
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Models/ExchangeLogTest.php b/tests/Models/ExchangeLogTest.php
index 059d8c0..0a87d7c 100755
--- a/tests/Models/ExchangeLogTest.php
+++ b/tests/Models/ExchangeLogTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Models/ExporterAbstractTest.php b/tests/Models/ExporterAbstractTest.php
index a1d940c..1411998 100755
--- a/tests/Models/ExporterAbstractTest.php
+++ b/tests/Models/ExporterAbstractTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Models/ImporterAbstractTest.php b/tests/Models/ImporterAbstractTest.php
index 7b5eac9..8c54683 100755
--- a/tests/Models/ImporterAbstractTest.php
+++ b/tests/Models/ImporterAbstractTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Models/InterfaceManagerTest.php b/tests/Models/InterfaceManagerTest.php
index 34d6d58..11b6267 100755
--- a/tests/Models/InterfaceManagerTest.php
+++ b/tests/Models/InterfaceManagerTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Models/NullExchangeLogTest.php b/tests/Models/NullExchangeLogTest.php
index 9ae2cd9..30e265a 100755
--- a/tests/Models/NullExchangeLogTest.php
+++ b/tests/Models/NullExchangeLogTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
diff --git a/tests/Models/NullInterfaceManagerTest.php b/tests/Models/NullInterfaceManagerTest.php
index f174cc4..bc6576c 100755
--- a/tests/Models/NullInterfaceManagerTest.php
+++ b/tests/Models/NullInterfaceManagerTest.php
@@ -6,7 +6,7 @@
*
* @package tests
* @copyright Dennis Eichhorn
- * @license OMS License 1.0
+ * @license OMS License 2.0
* @version 1.0.0
* @link https://jingga.app
*/
| |