diff --git a/Admin/Installer.php b/Admin/Installer.php index ea03fd4..fcc36ab 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -39,13 +39,14 @@ final class Installer extends InstallerAbstract { parent::install($dbPool, $info, $cfgHandler); - $interfaces = Directory::list(__DIR__ . '/../Interfaces', '.*interface\.json'); + /* + $interfaces = Directory::list(__DIR__ . '/../Interfaces', '.*interface\.json', true); foreach ($interfaces as $interface) { $exchange = new InterfaceManager(__DIR__ . '/../Interfaces/' . $interface); $exchange->load(); InterfaceManagerMapper::create($exchange); - } + }*/ } } diff --git a/Interfaces/GSD/Importer.php b/Interfaces/GSD/Importer.php index 50fba94..5c02fc2 100755 --- a/Interfaces/GSD/Importer.php +++ b/Interfaces/GSD/Importer.php @@ -19,6 +19,7 @@ use Modules\Accounting\Models\CostCenterMapper; use Modules\Accounting\Models\CostObject; use Modules\Accounting\Models\CostObjectMapper; use Modules\Admin\Models\Account; +use Modules\Admin\Models\Address; use Modules\ClientManagement\Models\Client; use Modules\ClientManagement\Models\ClientMapper; use Modules\Exchange\Interfaces\GSD\Model\GSDArticleMapper; @@ -37,6 +38,26 @@ use phpOMS\DataStorage\Database\Connection\ConnectionFactory; use phpOMS\DataStorage\Database\DatabaseStatus; use phpOMS\DataStorage\Database\DataMapperAbstract; use phpOMS\Message\RequestAbstract; +use phpOMS\Localization\ISO639x1Enum; +use Modules\Exchange\Interfaces\GSD\Model\GSDArticle; +use Modules\Exchange\Interfaces\GSD\Model\GSDCostCenter; +use Modules\Exchange\Interfaces\GSD\Model\GSDCostObject; +use Modules\Exchange\Interfaces\GSD\Model\GSDCustomer; +use Modules\Exchange\Interfaces\GSD\Model\GSDSupplier; +use Modules\ItemManagement\Models\ItemAttributeTypeL11n; +use Modules\ItemManagement\Models\ItemL11n; +use Modules\ItemManagement\Models\ItemL11nType; +use Modules\ItemManagement\Models\ItemL11nTypeMapper; +use Modules\ItemManagement\Models\ItemAttributeType; +use Modules\ItemManagement\Models\ItemAttributeTypeL11nMapper; +use Modules\ItemManagement\Models\ItemAttributeTypeMapper; +use Modules\ItemManagement\Models\NullItemAttributeType; +use Modules\ItemManagement\Models\NullItemL11nType; +use Modules\Profile\Models\ContactElement; +use Modules\Profile\Models\ContactElementMapper; +use Modules\Profile\Models\ProfileMapper; +use phpOMS\Localization\ISO3166TwoEnum; +use Modules\Profile\Models\ContactType; /** * GSD import class @@ -156,6 +177,7 @@ final class Importer extends ImporterAbstract $query->where('FiKostenstellen_3.row_create_time', '>=', $start->format('Y-m-d H:i:s')) ->andWhere('FiKostenstellen_3.row_create_time', '<=', $end->format('Y-m-d H:i:s')); + /** @var GSDCostCenter[] $costCenters */ $costCenters = GSDCostCenterMapper::getAllByQuery($query); DataMapperAbstract::setConnection($this->local); @@ -186,6 +208,7 @@ final class Importer extends ImporterAbstract $query->where('FiKostentraeger_3.row_create_time', '>=', $start->format('Y-m-d H:i:s')) ->andWhere('FiKostentraeger_3.row_create_time', '<=', $end->format('Y-m-d H:i:s')); + /** @var GSDCostObject[] $costObjects */ $costObjects = GSDCostObjectMapper::getAllByQuery($query); DataMapperAbstract::setConnection($this->local); @@ -216,22 +239,64 @@ final class Importer extends ImporterAbstract $query->where('Kunden_3.row_create_time', '>=', $start->format('Y-m-d H:i:s')) ->andWhere('Kunden_3.row_create_time', '<=', $end->format('Y-m-d H:i:s')); + /** @var GSDCustomer[] $customers */ $customers = GSDCustomerMapper::getAllByQuery($query); DataMapperAbstract::setConnection($this->local); foreach ($customers as $customer) { - $obj = new Client(); - $obj->setNumber(\trim($customer->getNumber())); - $account = new Account(); - $account->setName1(\trim($customer->getAddress()->getName1(), " ,\t")); - $account->setName2(\trim($customer->getAddress()->getName2(), " ,\t")); - $account->setName3(\trim($customer->getAddress()->getName3(), " ,\t")); + $account->setName1(\trim($customer->addr->name1, " ,\t")); + + $a = \trim($customer->addr->name2, " ,\t"); + $b = \trim($customer->addr->name3, " ,\t"); + $account->setName2(\trim($a . ' ' . $b)); $profile = new Profile($account); + + $obj = new Client(); + $obj->setNumber(\trim($customer->number)); $obj->setProfile($profile); + $addr = new Address(); + $addr->setAddress(\trim($customer->addr->street, ", \t")); + $addr->setPostal(\trim($customer->addr->zip, ",. \t")); + $addr->setCity(\trim($customer->addr->city, ",. \t")); + $addr->setCountry(ISO3166TwoEnum::_DEU); + $obj->setMainAddress($addr); + + if (!empty(\trim($customer->addr->phone, ",. \t"))) { + $phone = new ContactElement(); + $phone->setType(ContactType::PHONE); + $phone->setSubtype(0); + $phone->setContent(\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->setContent(\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->setContent(\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->setContent(\trim($customer->addr->email, ",. \t")); + $obj->addContactElement($email); + } + ClientMapper::create($obj); } } @@ -253,22 +318,64 @@ final class Importer extends ImporterAbstract $query->where('Lieferanten_3.row_create_time', '>=', $start->format('Y-m-d H:i:s')) ->andWhere('Lieferanten_3.row_create_time', '<=', $end->format('Y-m-d H:i:s')); + /** @var GSDSupplier[] $suppliers */ $suppliers = GSDSupplierMapper::getAllByQuery($query); DataMapperAbstract::setConnection($this->local); foreach ($suppliers as $supplier) { - $obj = new Supplier(); - $obj->setNumber($supplier->getNumber()); - $account = new Account(); - $account->setName1(\trim($supplier->getAddress()->getName1(), " ,\t")); - $account->setName2(\trim($supplier->getAddress()->getName2(), " ,\t")); - $account->setName3(\trim($supplier->getAddress()->getName3(), " ,\t")); + $account->setName1(\trim($supplier->addr->name1, " ,\t")); + + $a = \trim($supplier->addr->name2, " ,\t"); + $b = \trim($supplier->addr->name3, " ,\t"); + $account->setName2(\trim($a . ' ' . $b)); $profile = new Profile($account); + + $obj = new Supplier(); + $obj->setNumber(\trim($supplier->number)); $obj->setProfile($profile); + $addr = new Address(); + $addr->setAddress(\trim($supplier->addr->street, ", \t")); + $addr->setPostal(\trim($supplier->addr->zip, ",. \t")); + $addr->setCity(\trim($supplier->addr->city, ",. \t")); + $addr->setCountry(ISO3166TwoEnum::_DEU); + $obj->setMainAddress($addr); + + if (!empty(\trim($supplier->addr->phone, ",. \t"))) { + $phone = new ContactElement(); + $phone->setType(ContactType::PHONE); + $phone->setSubtype(0); + $phone->setContent(\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->setContent(\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->setContent(\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->setContent(\trim($supplier->addr->email, ",. \t")); + $obj->addContactElement($email); + } + SupplierMapper::create($obj); } } @@ -304,18 +411,164 @@ final class Importer extends ImporterAbstract $query->where('Artikel_3.row_create_time', '>=', $start->format('Y-m-d H:i:s')) ->andWhere('Artikel_3.row_create_time', '<=', $end->format('Y-m-d H:i:s')); + /** @var GSDArticle[] $articles */ $articles = GSDArticleMapper::getAllByQuery($query); DataMapperAbstract::setConnection($this->local); + $itemL11nType = $this->createItemL11nTypes(); + + $itemAttrType = $this->createItemAttributeTypes(); + $itemAttrValue = $this->createItemAttributeValues($itemAttrType); + + //$itemAttrType['segment'] = new ItemAttributeType(); + //$itemAttrType['productgroup'] = new ItemAttributeType(); + //$itemAttrType['devaluation'] = new ItemAttributeType(); + foreach ($articles as $article) { $obj = new Item(); - $obj->setNumber($article->getNumber()); + $obj->setNumber($article->number); + + // German Language + $obj->addL11n(new ItemL11n( + $itemL11nType['name1']->getId(), + \trim($article->name1, " ,\t"), + ISO639x1Enum::_DE + )); + + $obj->addL11n(new ItemL11n( + $itemL11nType['name2']->getId(), + \trim($article->name2, " ,\t"), + ISO639x1Enum::_DE + )); + + $obj->addL11n(new ItemL11n( + $itemL11nType['info']->getId(), + \trim($article->infoSales, " ,\t"), + ISO639x1Enum::_DE + )); + + // English Language + $obj->addL11n(new ItemL11n( + $itemL11nType['name1']->getId(), + empty($t = \trim($article->name1Eng, " ,\t")) + ? \trim($article->name1, " ,\t") + : $t, + ISO639x1Enum::_EN + )); + + $obj->addL11n(new ItemL11n( + $itemL11nType['name2']->getId(), + empty($t = \trim($article->name2Eng, " ,\t")) + ? \trim($article->name2, " ,\t") + : $t, + ISO639x1Enum::_EN + )); ItemMapper::create($obj); } } + /** + * Create and get item l11n types + * + * @return ItemL11nType[] + * + * @since 1.0.0 + */ + private function createItemL11nTypes() : array + { + $itemL11nType = []; + + if (($itemL11nType['name1'] = ItemL11nTypeMapper::getBy('name1', 'itemmgmt_attr_type_name')) instanceof NullItemL11nType) { + $itemL11nType['name1'] = new ItemL11nType('name1'); + ItemL11nTypeMapper::create($itemL11nType['name1']); + } + + if (($itemL11nType['name2'] = ItemL11nTypeMapper::getBy('name2', 'itemmgmt_attr_type_name')) instanceof NullItemL11nType) { + $itemL11nType['name2'] = new ItemL11nType('name2'); + ItemL11nTypeMapper::create($itemL11nType['name2']); + } + + if (($itemL11nType['info'] = ItemL11nTypeMapper::getBy('info', 'itemmgmt_attr_type_name')) instanceof NullItemL11nType) { + $itemL11nType['info'] = new ItemL11nType('info'); + ItemL11nTypeMapper::create($itemL11nType['info']); + } + + return $itemL11nType; + } + + /** + * Create and get item attribute types + * + * @return ItemAttributeType[] + * + * @since 1.0.0 + */ + private function createItemAttributeTypes() : array + { + $itemAttrType = []; + + // @todo check if attr. types already exist, if yes don't create, just save them in here. + if (($itemAttrType['tradegroup'] = ItemAttributeTypeMapper::getBy('tradegroup', 'name')) instanceof NullItemAttributeType) { + $itemAttrType['tradegroup'] = new ItemAttributeType('tradegroup'); + ItemAttributeTypeMapper::create($itemAttrType['tradegroup']); + + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['tradegroup']->getId(), 'Trade Group', ISO639x1Enum::_EN)); + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['tradegroup']->getId(), 'Handelsgruppe', ISO639x1Enum::_DE)); + } + + if (($itemAttrType['exportcontrolgroup'] = ItemAttributeTypeMapper::getBy('exportcontrolgroup', 'name')) instanceof NullItemAttributeType) { + $itemAttrType['exportcontrolgroup'] = new ItemAttributeType('exportcontrolgroup'); + ItemAttributeTypeMapper::create($itemAttrType['exportcontrolgroup']); + + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['exportcontrolgroup']->getId(), 'Export Control Group', ISO639x1Enum::_EN)); + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['exportcontrolgroup']->getId(), 'Exportkontrollgruppe', ISO639x1Enum::_DE)); + } + + if (($itemAttrType['medicalgroup'] = ItemAttributeTypeMapper::getBy('medicalgroup', 'name')) instanceof NullItemAttributeType) { + $itemAttrType['medicalgroup'] = new ItemAttributeType('medicalgroup'); + ItemAttributeTypeMapper::create($itemAttrType['medicalgroup']); + + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['medicalgroup']->getId(), 'Medical Device Group', ISO639x1Enum::_EN)); + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['medicalgroup']->getId(), 'Medezinproduktklasse', ISO639x1Enum::_DE)); + } + + if (($itemAttrType['customsnumber'] = ItemAttributeTypeMapper::getBy('customsnumber', 'name')) instanceof NullItemAttributeType) { + $itemAttrType['customsnumber'] = new ItemAttributeType('customsnumber'); + ItemAttributeTypeMapper::create($itemAttrType['customsnumber']); + + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['customsnumber']->getId(), 'Customs Number', ISO639x1Enum::_EN)); + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['customsnumber']->getId(), 'Zolltarifnummer', ISO639x1Enum::_DE)); + } + + if (($itemAttrType['unnumber'] = ItemAttributeTypeMapper::getBy('unnumber', 'name')) instanceof NullItemAttributeType) { + $itemAttrType['unnumber'] = new ItemAttributeType('unnumber'); + ItemAttributeTypeMapper::create($itemAttrType['unnumber']); + + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['unnumber']->getId(), 'UN-Number', ISO639x1Enum::_EN)); + ItemAttributeTypeL11nMapper::create(new ItemAttributeTypeL11n($itemAttrType['unnumber']->getId(), 'UN-Nummer', ISO639x1Enum::_DE)); + } + + return $itemAttrType; + } + + /** + * Create and get item attribute values + * + * @param ItemAttributeType[] $itemAttributeType Attribute types + * + * @return ItemAttributeValue[] + * + * @since 1.0.0 + */ + private function createItemAttributeValues(array $itemAttrType) : array + { + $itemAttrValue = []; + + return $itemAttrType; + } + /** * Import invoices * diff --git a/Interfaces/GSD/Model/GSDAddress.php b/Interfaces/GSD/Model/GSDAddress.php index caf0bcf..3638479 100755 --- a/Interfaces/GSD/Model/GSDAddress.php +++ b/Interfaces/GSD/Model/GSDAddress.php @@ -24,117 +24,20 @@ namespace Modules\Exchange\Interfaces\GSD\Model; */ class GSDAddress { - /** - * ID. - * - * @var int - * @sicne 1.0.0 - */ - protected int $id = 0; - - /** - * Name1. - * - * @var string - * @sicne 1.0.0 - */ - private string $name1 = ''; - - /** - * Name2. - * - * @var string - * @sicne 1.0.0 - */ - private string $name2 = ''; - - /** - * Name3. - * - * @var string - * @sicne 1.0.0 - */ - private string $name3 = ''; - - /** - * City. - * - * @var string - * @sicne 1.0.0 - */ - private string $city = ''; - - /** - * Country. - * - * @var string - * @sicne 1.0.0 - */ - private string $country = ''; - - /** - * Postal code. - * - * @var string - * @sicne 1.0.0 - */ - private string $zip = ''; - - /** - * street. - * - * @var string - * @sicne 1.0.0 - */ - private string $street = ''; - - /** - * Phone. - * - * @var string - * @sicne 1.0.0 - */ - private string $phone = ''; - - /** - * FAX. - * - * @var string - * @sicne 1.0.0 - */ - private string $fax = ''; - - /** - * Email. - * - * @var string - * @sicne 1.0.0 - */ - private string $email = ''; - - /** - * Website. - * - * @var string - * @sicne 1.0.0 - */ - private string $website = ''; - - /** - * Creator. - * - * @var int - * @since 1.0.0 - */ - protected int $createdBy = 0; - - /** - * Created. - * - * @var \DateTimeImmutable - * @since 1.0.0 - */ - protected \DateTimeImmutable $createdAt; + public int $id = 0; + public string $name1 = ''; + public string $name2 = ''; + public string $name3 = ''; + public string $city = ''; + public string $country = ''; + public string $zip = ''; + public string $street = ''; + public string $phone = ''; + public string $fax = ''; + public string $email = ''; + public string $website = ''; + public int $createdBy = 0; + public \DateTimeImmutable $createdAt; /** * Construct. @@ -145,136 +48,4 @@ class GSDAddress { $this->createdAt = new \DateTimeImmutable('now'); } - - /** - * Get name1 - * - * @return string - * - * @since 1.0.0 - */ - public function getName1() : string - { - return $this->name1; - } - - /** - * Get name1 - * - * @return string - * - * @since 1.0.0 - */ - public function getName2() : string - { - return $this->name2; - } - - /** - * Get name3 - * - * @return string - * - * @since 1.0.0 - */ - public function getName3() : string - { - return $this->name3; - } - - /** - * Get city - * - * @return string - * - * @since 1.0.0 - */ - public function getCity() : string - { - return $this->city; - } - - /** - * Get postal/sip - * - * @return string - * - * @since 1.0.0 - */ - public function getZip() : string - { - return $this->zip; - } - - /** - * Get street - * - * @return string - * - * @since 1.0.0 - */ - public function getStreet() : string - { - return $this->street; - } - - /** - * Get country - * - * @return string - * - * @since 1.0.0 - */ - public function getCountry() : string - { - return $this->country; - } - - /** - * Get phone - * - * @return string - * - * @since 1.0.0 - */ - public function getPhone() : string - { - return $this->phone; - } - - /** - * Get email - * - * @return string - * - * @since 1.0.0 - */ - public function getEmail() : string - { - return $this->email; - } - - /** - * Get fax - * - * @return string - * - * @since 1.0.0 - */ - public function getFax() : string - { - return $this->fax; - } - - /** - * Get website - * - * @return string - * - * @since 1.0.0 - */ - public function getWebsite() : string - { - return $this->website; - } } diff --git a/Interfaces/GSD/Model/GSDAddressMapper.php b/Interfaces/GSD/Model/GSDAddressMapper.php index a5675c0..024d4f7 100755 --- a/Interfaces/GSD/Model/GSDAddressMapper.php +++ b/Interfaces/GSD/Model/GSDAddressMapper.php @@ -33,20 +33,20 @@ final class GSDAddressMapper extends DataMapperAbstract * @since 1.0.0 */ protected static array $columns = [ - 'AdressRowId' => ['name' => 'AdressRowId', '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], - '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'], + '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'], ]; /** @@ -55,7 +55,7 @@ final class GSDAddressMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static string $table = 'KUNDENADRESSE'; + protected static string $table = 'Adressen'; /** * Created at. @@ -71,5 +71,5 @@ final class GSDAddressMapper extends DataMapperAbstract * @var string * @since 1.0.0 */ - protected static string $primaryField = 'AdressRowId'; + protected static string $primaryField = 'Nummer'; } diff --git a/Interfaces/GSD/Model/GSDArticle.php b/Interfaces/GSD/Model/GSDArticle.php index 4a72b76..f829583 100755 --- a/Interfaces/GSD/Model/GSDArticle.php +++ b/Interfaces/GSD/Model/GSDArticle.php @@ -24,117 +24,73 @@ namespace Modules\Exchange\Interfaces\GSD\Model; */ class GSDArticle { - /** - * ID. - * - * @var int - * @since 1.0.0 - */ - protected int $id = 0; + public int $id = 0; + public int $createdBy = 0; + public \DateTimeImmutable $createdAt; - /** - * Creator. - * - * @var int - * @since 1.0.0 - */ - protected int $createdBy = 0; + public bool $isDiscontinued = false; + public bool $isBlocked = false; - /** - * Created. - * - * @var \DateTimeImmutable - * @since 1.0.0 - */ - protected \DateTimeImmutable $createdAt; + public string $number = ''; + public string $infoSales = ''; + public string $infoPurchase = ''; + public string $infoWarehouse = ''; - /** - * Article number. - * - * @var string - * @since 1.0.0 - */ - private string $number = ''; + public string $name1 = ''; + public string $name2 = ''; + public string $name1Eng = ''; + public string $name2Eng = ''; - /** - * Article information - * - * @var string - * @since 1.0.0 - */ - private string $info = ''; + public int $status = 0; + public string $lotManagement = ''; + public bool $hasSN = false; - /** - * Name1. - * - * @var string - * @since 1.0.0 - */ - private string $name1 = ''; + public float $weight = 0.0; + public float $height = 0.0; + public float $length = 0.0; + public float $volume = 0.0; - /** - * Name2 - * - * @var string - * @since 1.0.0 - */ - private string $name2 = ''; + public string $purchaseUnit = ''; + public bool $manualLotUse = true; + public int $leadTimeWeeks = 0; + public int $leadTimeDays = 0; + public int $leadTime = 0; + public float $minimalStock = 0.0; + public bool $negativeStock = false; - /** - * English name1. - * - * @var string - * @since 1.0.0 - */ - private string $name1Eng = ''; + public string $customsId = ''; + public string $unnumber = ''; + public string $EUitemgroup = ''; + public string $inspectionDepartment = ''; + public string $medicinProductClass = ''; - /** - * English name2 - * - * @var string - * @since 1.0.0 - */ - private string $name2Eng = ''; + public bool $exportItem = false; + public bool $nonEUItem = false; + public bool $dualUse = false; + public int $inShop = 0; - /** - * Activity status - * - * @var int - * @since 1.0.0 - */ - private int $status = 0; + public string $sectionGroup = ''; // Sparte + public string $salesGroup = ''; // Umsatzgruppe + public string $segment = ''; // Segment + public int $productGroup = 0; - /** - * Lot type (can also be none) - * - * @var int - * @since 1.0.0 - */ - private int $lotType = 0; + public string $earningsIndicator = ''; + public string $costsIndicator = ''; - /** - * Weight - * - * @var float - * @since 1.0.0 - */ - private float $weight = 0.0; + public float $weightTinplate = 0.0; // Weissblech + public float $weightOtherComposites = 0.0; // Sonstige Verbunde + public float $weightOther = 0.0; // Sonstiges + public float $weightPET = 0.0; // PET + public float $weightPaper = 0.0; + public float $weightNatureProducts = 0.0; + public float $weightAcrylics = 0.0; + public float $weightCarton = 0.0; + public float $weightGlas = 0.0; + public float $weightAluminium = 0.0; + public float $weightGross = 0.0; + public float $weightNet = 0.0; - /** - * Lead time in days - * - * @var int - * @since 1.0.0 - */ - private int $leadTime = 0; - - /** - * EU item group - * - * @var string - * @since 1.0.0 - */ - private string $EUitemgroup = ''; + public array $prices = []; // @todo implement from [Preise] where ParentID = 1, 2, 4??? for sales price and ParentType = 2 for purchase price? /** * Constructor. @@ -145,136 +101,4 @@ class GSDArticle { $this->createdAt = new \DateTimeImmutable('now'); } - - /** - * Get article number - * - * @return string - * - * @since 1.0.0 - */ - public function getNumber() : string - { - return $this->number; - } - - /** - * Get article information text - * - * @return string - * - * @since 1.0.0 - */ - public function getInfo() : string - { - return $this->info; - } - - /** - * Get name1 - * - * @return string - * - * @since 1.0.0 - */ - public function getName1() : string - { - return $this->name1; - } - - /** - * Get name2 - * - * @return string - * - * @since 1.0.0 - */ - public function getName2() : string - { - return $this->name2; - } - - /** - * Get englisch name1 - * - * @return string - * - * @since 1.0.0 - */ - public function getName1Eng() : string - { - return $this->name1Eng; - } - - /** - * Get englisch name2 - * - * @return string - * - * @since 1.0.0 - */ - public function getName2Eng() : string - { - return $this->name2Eng; - } - - /** - * Get status - * - * @return int - * - * @since 1.0.0 - */ - public function getStatus() : int - { - return $this->status; - } - - /** - * Get lot type - * - * @return int - * - * @since 1.0.0 - */ - public function getLotType() : int - { - return $this->lotType; - } - - /** - * Get weight - * - * @return float - * - * @since 1.0.0 - */ - public function getWeight() : float - { - return $this->weight; - } - - /** - * Get lead time (in days) - * - * @return int - * - * @since 1.0.0 - */ - public function getLeadTime() : int - { - return $this->leadTime; - } - - /** - * Get EU item group - * - * @return string - * - * @since 1.0.0 - */ - public function getEUItemGroup() : string - { - return $this->EUitemgroup; - } } diff --git a/Interfaces/GSD/Model/GSDArticleMapper.php b/Interfaces/GSD/Model/GSDArticleMapper.php index 97b7704..db10aef 100755 --- a/Interfaces/GSD/Model/GSDArticleMapper.php +++ b/Interfaces/GSD/Model/GSDArticleMapper.php @@ -33,16 +33,57 @@ final class GSDArticleMapper extends DataMapperAbstract * @since 1.0.0 */ protected static array $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], - 'Artikelnummer' => ['name' => 'Artikelnummer', 'type' => 'string', 'internal' => 'number'], - 'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'], - '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'], + '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'], ]; /** diff --git a/Interfaces/GSD/Model/GSDCustomer.php b/Interfaces/GSD/Model/GSDCustomer.php index 6d67e68..7791d02 100755 --- a/Interfaces/GSD/Model/GSDCustomer.php +++ b/Interfaces/GSD/Model/GSDCustomer.php @@ -30,105 +30,41 @@ class GSDCustomer * @var int * @since 1.0.0 */ - private int $id = 0; + public int $id = 0; + public int $createdBy = 0; + public \DateTimeImmutable $createdAt; + public bool $isBlocked = false; + public bool $isDiscontinued = false; + public bool $isLocked = false; - /** - * Creator. - * - * @var int - * @since 1.0.0 - */ - protected int $createdBy = 0; + public string $number = ''; + public string $customerType = ''; + public GSDAddress $addr; + public string $info = ''; - /** - * Created. - * - * @var \DateTimeImmutable - * @since 1.0.0 - */ - protected \DateTimeImmutable $createdAt; + public int $account = 0; + public int $materialAccount = 0; + public int $accountsReceivableAccount = 0; + public string $earningsIndicator = ''; - /** - * Customer number - * - * @var string - * @since 1.0.0 - */ - private string $number = ''; + public float $creditlimit = 0.0; + public string $egustid = ''; + public string $taxid = ''; + public string $bic = ''; + public string $iban = ''; + public string $bankRef = ''; - /** - * Info text - * - * @var string - * @since 1.0.0 - */ - private string $info = ''; + public string $salesRep = ''; + public bool $isMonthlyInvoice = false; + public bool $reminderBlock = false; + public string $legalType = ''; - /** - * Credit limit - * - * @var float - * @since 1.0.0 - */ - private float $creditlimit = 0.0; + public array $partner = []; - /** - * EGUStId - * - * @var string - * @since 1.0.0 - */ - private string $egustid = ''; + public array $paymentTerms = []; // @todo: implement model/mapper + public array $addresses = []; // @todo: implement + public array $prices = []; // @todo: implement - /** - * VAT id - * - * @var string - * @since 1.0.0 - */ - private string $taxid = ''; - - /** - * BICC - * - * @var string - * @since 1.0.0 - */ - private string $bic = ''; - - /** - * IBAN - * - * @var string - * @sicne 1.0.0 - */ - private string $iban = ''; - - /** - * Address - * - * @var GSDAddress - * @since 1.0.0 - */ - private GSDAddress $addr; - - /** - * Delivery status. - * - * Can invoices get created - * - * @var int - * @since 1.0.0 - */ - private int $deliveryStatus = 0; - - /** - * Sales rep id - * - * @var int - * @since 1.0.0 - */ - private int $salesRep = 0; /** * Construct. @@ -140,124 +76,4 @@ class GSDCustomer $this->addr = new GSDAddress(); $this->createdAt = new \DateTimeImmutable('now'); } - - /** - * Get customer number - * - * @return string - * - * @since 1.0.0 - */ - public function getNumber() : string - { - return $this->number; - } - - /** - * Get information text - * - * @return string - * - * @since 1.0.0 - */ - public function getInfo() : string - { - return $this->info; - } - - /** - * Get credit limit - * - * @return float - * - * @since 1.0.0 - */ - public function getCreditLimit() : float - { - return $this->creditlimit; - } - - /** - * Get EGUStId - * - * @return string - * - * @since 1.0.0 - */ - public function getEGUstId() : string - { - return $this->egustid; - } - - /** - * Get VAT Id - * - * @return string - * - * @since 1.0.0 - */ - public function getTaxId() : string - { - return $this->taxid; - } - - /** - * Get BIC - * - * @return string - * - * @since 1.0.0 - */ - public function getBIC() : string - { - return $this->bic; - } - - /** - * Get IBAN - * - * @return string - * - * @since 1.0.0 - */ - public function getIban() : string - { - return $this->iban; - } - - /** - * Get main address - * - * @return GSDAddress - * - * @since 1.0.0 - */ - public function getAddress() : GSDAddress - { - return $this->addr; - } - - /** - * Get deivery status - * - * @return int - * - * @since 1.0.0 - */ - public function getDeliveryStatus() : int - { - return $this->deliveryStatus; - } - - /** - * Get saes rep - * - * @return int - * - * @since 1.0.0 - */ - public function getSalesRep() : int - { - return $this->salesRep; - } } diff --git a/Interfaces/GSD/Model/GSDCustomerMapper.php b/Interfaces/GSD/Model/GSDCustomerMapper.php index 60d1e9f..776bcbf 100755 --- a/Interfaces/GSD/Model/GSDCustomerMapper.php +++ b/Interfaces/GSD/Model/GSDCustomerMapper.php @@ -33,19 +33,36 @@ final class GSDCustomerMapper extends DataMapperAbstract * @since 1.0.0 */ protected static array $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], - 'Kundennummer' => ['name' => 'Kundennummer', 'type' => 'string', 'internal' => 'number'], - 'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'], - 'Auftragssperre' => ['name' => 'Auftragssperre', 'type' => 'string', 'internal' => 'deliveryStatus'], - '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'], - 'Verkaeufer' => ['name' => 'Verkaeufer', 'type' => 'int', 'internal' => 'salesRep'], - 'AdressId' => ['name' => 'AdressId', 'type' => 'int', 'internal' => 'addr'], + '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'], ]; protected static array $ownsOne = [ diff --git a/Interfaces/GSD/Model/GSDSupplier.php b/Interfaces/GSD/Model/GSDSupplier.php index d3e6fb2..2738a9f 100755 --- a/Interfaces/GSD/Model/GSDSupplier.php +++ b/Interfaces/GSD/Model/GSDSupplier.php @@ -24,87 +24,17 @@ namespace Modules\Exchange\Interfaces\GSD\Model; */ class GSDSupplier { - /** - * ID. - * - * @var int - * @since 1.0.0 - */ - private int $id = 0; - /** - * Creator. - * - * @var int - * @since 1.0.0 - */ - protected $createdBy = 0; - - /** - * Created. - * - * @var \DateTimeImmutable - * @since 1.0.0 - */ - protected \DateTimeImmutable $createdAt; - - /** - * Customer number - * - * @var string - * @since 1.0.0 - */ - private string $number = ''; - - /** - * Info text - * - * @var string - * @since 1.0.0 - */ - private string $info = ''; - - /** - * VAT id - * - * @var string - * @since 1.0.0 - */ - private string $taxid = ''; - - /** - * BICC - * - * @var string - * @since 1.0.0 - */ - private string $bic = ''; - - /** - * IBAN - * - * @var string - * @sicne 1.0.0 - */ - private string $iban = ''; - - /** - * Address - * - * @var GSDAddress - * @since 1.0.0 - */ - private GSDAddress $addr; - - /** - * Delivery status. - * - * Can invoices get created - * - * @var int - * @since 1.0.0 - */ - private int $deliveryStatus = 0; + public int $id = 0; + public $createdBy = 0; + public \DateTimeImmutable $createdAt; + public string $number = ''; + public string $info = ''; + public string $taxid = ''; + public string $bic = ''; + public string $iban = ''; + public GSDAddress $addr; + public int $deliveryStatus = 0; /** * Construct. @@ -116,88 +46,4 @@ class GSDSupplier $this->addr = new GSDAddress(); $this->createdAt = new \DateTimeImmutable('now'); } - - /** - * Get supplier number - * - * @return string - * - * @since 1.0.0 - */ - public function getNumber() : string - { - return $this->number; - } - - /** - * Get information text - * - * @return string - * - * @since 1.0.0 - */ - public function getInfo() : string - { - return $this->info; - } - - /** - * Get VAT Id - * - * @return string - * - * @since 1.0.0 - */ - public function getTaxId() : string - { - return $this->taxid; - } - - /** - * Get BIC - * - * @return string - * - * @since 1.0.0 - */ - public function getBIC() : string - { - return $this->bic; - } - - /** - * Get IBAN - * - * @return string - * - * @since 1.0.0 - */ - public function getIban() : string - { - return $this->iban; - } - - /** - * Get main address - * - * @return GSDAddress - * - * @since 1.0.0 - */ - public function getAddress() : GSDAddress - { - return $this->addr; - } - - /** - * Get deivery status - * - * @return int - * - * @since 1.0.0 - */ - public function getDeliveryStatus() : int - { - return $this->deliveryStatus; - } } diff --git a/Interfaces/GSD/Model/GSDSupplierMapper.php b/Interfaces/GSD/Model/GSDSupplierMapper.php index 93dc1cc..48ce907 100755 --- a/Interfaces/GSD/Model/GSDSupplierMapper.php +++ b/Interfaces/GSD/Model/GSDSupplierMapper.php @@ -42,6 +42,7 @@ final class GSDSupplierMapper extends DataMapperAbstract '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'], ]; protected static array $ownsOne = [ diff --git a/Interfaces/GSD/base.sql b/Interfaces/GSD/base.sql deleted file mode 100755 index 68c69cf..0000000 --- a/Interfaces/GSD/base.sql +++ /dev/null @@ -1,74 +0,0 @@ --- CostCenter -SELECT - ROW_ID, row_create_time, row_create_user, KST, Bezeichnung, Auslaufkennzeichen as Status -FROM FiKostenstellen - --- CostObject -SELECT - ROW_ID, row_create_time, row_create_user, KTR, Bezeichnung -FROM FiKostentraeger - --- Addresses -SELECT - ROW_ID, row_create_user, row_create_time, Name1, Name2, Name3, Ort, Land, Telefon, PLZ, Strasse, Fax, Email, InternetAdresse -FROM Adressen - --- Customer -SELECT - row_id, row_create_time, row_create_user, Kundennummer, Info, Auftragssperre, KreditLimitintern, EGUstId, BIC, IBAN, Verkaeufer, AdressId, Steuernummer -FROM Kunden - --- Supplier -SELECT - row_id, row_create_time, row_create_user, LieferantenNummer, Info, Auftragssperre, EGUstId, BIC, IBAN, AdressId, Steuernummer -FROM Lieferanten - --- Article -SELECT - row_id, row_create_time, row_create_user, Artikelnummer, Info, Artikelbezeichnung, Artikelbezeichnung2, _Englisch1, _Englisch2, ArtikelGruppenId, Auslaufartikel as Status, Chargenverwaltung, Gewicht, BeschaffungszeitTage, EUWarengruppe -FROM Artikel - --- Outbound Invoices -SELECT - ROW_ID, ROW_CREATE_TIME, ROW_CREATE_USER, KundenId, BelegartId, AdressId, Status, Auftragsnummer, Frachtkosten, Versandkosten, ReferenzNummer, Belegnummer, Belegdatum, RechnungsAdressId, LieferAdressId, Sachbearbeiter, Verkaeufer -FROM ArchivBelegkopf - --- Outbound Invoice Elements -SELECT - ROW_ID, ROW_CREATE_TIME, ROW_CREATE_USER, ParentID, ArtikelId, BelegzeilenId, Belegzeilentyp, Rabatt, Einzelpreis, Menge, Belegzeilentext, Steuersatz -FROM ArchivBelegzeilen - --- Stock -SELECT - ROW_ID, row_create_time, row_create_user, ArtikelID, Charge, Lager, Seriennummer, Bestand -FROM Bestaende - --- Warehouse -SELECT - row_id, lagernummer, lagerbezeichnung, AdressID -FROM Lagerstammdaten - --- Stock movement -SELECT - ROW_ID, row_create_time, row_create_user, Charge, Lager, Seriennummer, Belegnummer, Menge, Uhrzeit, Bestand, ArtikelID, PlusMinus, Modus, Wert, Typ -FROM Lagerbewegungsprotokoll - --- Finance Postings -SELECT - ROW_ID, row_create_time, row_create_user, Konto, GegenKonto, BelegNr, Buchungsdatum, Belegdatum, OPNummer, Steuerschluessel, Betrag, Nettobetrag, BuchText, JournalNr, KST, KTR, EGUstID, FremdbelegNr, StapelID, BuchungsID, KontoC, GegenkontoC, Buchungstyp -From FiBuchungsArchiv - --- Finance Accounts -SELECT - ROW_ID, row_create_time, row_create_user, Konto, Bezeichnung, BilanzGuv, Zuordnung, Steuerart, Steuerschluesse, UVAPosition, UVAGrundlage, Saldovortrag, EGStatistik, Auslaufkonto as Status, Aktuell, KSTRechn, KTRRechn, KST, KTR, -FROM FiSachkonten - --- Finance Batch Posting -SELECT - ROW_ID, row_create_time, row_create_user, Buchungsdatum, Buchungsart, BelegNr, BelegDatum, Konto, Betrag, BetragSkontierf, FWBetrag, FremdBelegNr, Buchungstext, Zahlungsbedingung, SkontoTage1, SkontoProz1, SontoTage2, SkontoProz2, SontoTage3, SkontoProz3, Nettotage, EGUstID, Status -FROM FiStapelBuchungen - --- Finance Batch -SELECT - ROW_ID, row_create_time, row_create_user, Status, Stapeltyp, Buchungsart, Datum -FROM FiStapelInfo \ No newline at end of file