bug fixes / dbmapper fixes

This commit is contained in:
Dennis Eichhorn 2021-12-19 20:20:39 +01:00
parent 75bfac9774
commit 435a1455fa
11 changed files with 189 additions and 182 deletions

View File

@ -142,9 +142,12 @@ final class ApiController extends Controller
return; return;
} }
$interface = new InterfaceManager( $interfacePath = \realpath(__DIR__ . '/../Interfaces/' . $request->getData('interface') . '/interface.json');
\realpath(__DIR__ . '/../Interfaces/' . $request->getData('interface') . '/interface.json') if ($interfacePath === false) {
); return; // @codeCoverageIgnore
}
$interface = new InterfaceManager($interfacePath);
$interface->load(); $interface->load();
InterfaceManagerMapper::create()->execute($interface); InterfaceManagerMapper::create()->execute($interface);

View File

@ -181,15 +181,11 @@ final class Importer extends ImporterAbstract
*/ */
public function importCostCenter(\DateTime $start, \DateTime $end) : void public function importCostCenter(\DateTime $start, \DateTime $end) : void
{ {
DataMapperFactory::db($this->remote);
$query = GSDCostCenterMapper::getQuery();
$query->where('FiKostenstellen_3.row_create_time', '>=', $start)
->andWhere('FiKostenstellen_3.row_create_time', '<=', $end);
/** @var GSDCostCenter[] $costCenters */ /** @var GSDCostCenter[] $costCenters */
$costCenters = GSDCostCenterMapper::getAllByQuery($query); $costCenters = GSDCostCenterMapper::getAll($this->remote)
->where('createdAt', $start, '>=')
DataMapperFactory::db($this->local); ->where('createdAt', $end, '<=')
->execute();
foreach ($costCenters as $cc) { foreach ($costCenters as $cc) {
$obj = new CostCenter(); $obj = new CostCenter();
@ -212,15 +208,11 @@ final class Importer extends ImporterAbstract
*/ */
public function importCostObject(\DateTime $start, \DateTime $end) : void public function importCostObject(\DateTime $start, \DateTime $end) : void
{ {
DataMapperFactory::db($this->remote);
$query = GSDCostObjectMapper::getQuery();
$query->where('FiKostentraeger_3.row_create_time', '>=', $start)
->andWhere('FiKostentraeger_3.row_create_time', '<=', $end);
/** @var GSDCostObject[] $costObjects */ /** @var GSDCostObject[] $costObjects */
$costObjects = GSDCostObjectMapper::getAllByQuery($query); $costObjects = GSDCostObjectMapper::getAll($this->remote)
->where('createdAt', $start, '>=')
DataMapperFactory::db($this->local); ->where('createdAt', $end, '<=')
->execute();
foreach ($costObjects as $co) { foreach ($costObjects as $co) {
$obj = new CostObject(); $obj = new CostObject();
@ -243,15 +235,11 @@ final class Importer extends ImporterAbstract
*/ */
public function importCustomer(\DateTime $start, \DateTime $end) : void public function importCustomer(\DateTime $start, \DateTime $end) : void
{ {
DataMapperFactory::db($this->remote);
$query = GSDCustomerMapper::getQuery();
$query->where('Kunden_3.row_create_time', '>=', $start)
->andWhere('Kunden_3.row_create_time', '<=', $end);
/** @var GSDCustomer[] $customers */ /** @var GSDCustomer[] $customers */
$customers = GSDCustomerMapper::getAllByQuery($query); $customers = GSDCustomerMapper::getAll($this->remote)
->where('createdAt', $start, '>=')
DataMapperFactory::db($this->local); ->where('createdAt', $end, '<=')
->execute();
foreach ($customers as $customer) { foreach ($customers as $customer) {
$account = new Account(); $account = new Account();
@ -278,7 +266,7 @@ final class Importer extends ImporterAbstract
$phone = new ContactElement(); $phone = new ContactElement();
$phone->setType(ContactType::PHONE); $phone->setType(ContactType::PHONE);
$phone->setSubtype(0); $phone->setSubtype(0);
$phone->setContent(\trim($customer->addr->phone, ",. \t")); $phone->content = \trim($customer->addr->phone, ",. \t");
$obj->addContactElement($phone); $obj->addContactElement($phone);
} }
@ -286,7 +274,7 @@ final class Importer extends ImporterAbstract
$website = new ContactElement(); $website = new ContactElement();
$website->setType(ContactType::WEBSITE); $website->setType(ContactType::WEBSITE);
$website->setSubtype(0); $website->setSubtype(0);
$website->setContent(\trim($customer->addr->website, ",. \t")); $website->content = \trim($customer->addr->website, ",. \t");
$obj->addContactElement($website); $obj->addContactElement($website);
} }
@ -294,7 +282,7 @@ final class Importer extends ImporterAbstract
$fax = new ContactElement(); $fax = new ContactElement();
$fax->setType(ContactType::FAX); $fax->setType(ContactType::FAX);
$fax->setSubtype(0); $fax->setSubtype(0);
$fax->setContent(\trim($customer->addr->fax, ",. \t")); $fax->content = \trim($customer->addr->fax, ",. \t");
$obj->addContactElement($fax); $obj->addContactElement($fax);
} }
@ -302,7 +290,7 @@ final class Importer extends ImporterAbstract
$email = new ContactElement(); $email = new ContactElement();
$email->setType(ContactType::EMAIL); $email->setType(ContactType::EMAIL);
$email->setSubtype(0); $email->setSubtype(0);
$email->setContent(\trim($customer->addr->email, ",. \t")); $email->content = \trim($customer->addr->email, ",. \t");
$obj->addContactElement($email); $obj->addContactElement($email);
} }
@ -322,15 +310,11 @@ final class Importer extends ImporterAbstract
*/ */
public function importSupplier(\DateTime $start, \DateTime $end) : void public function importSupplier(\DateTime $start, \DateTime $end) : void
{ {
DataMapperFactory::db($this->remote);
$query = GSDSupplierMapper::getQuery();
$query->where('Lieferanten_3.row_create_time', '>=', $start)
->andWhere('Lieferanten_3.row_create_time', '<=', $end);
/** @var GSDSupplier[] $suppliers */ /** @var GSDSupplier[] $suppliers */
$suppliers = GSDSupplierMapper::getAllByQuery($query); $suppliers = GSDSupplierMapper::getAll($this->remote)
->where('createdAt', $start, '>=')
DataMapperFactory::db($this->local); ->where('createdAt', $end, '<=')
->execute();
foreach ($suppliers as $supplier) { foreach ($suppliers as $supplier) {
$account = new Account(); $account = new Account();
@ -357,7 +341,7 @@ final class Importer extends ImporterAbstract
$phone = new ContactElement(); $phone = new ContactElement();
$phone->setType(ContactType::PHONE); $phone->setType(ContactType::PHONE);
$phone->setSubtype(0); $phone->setSubtype(0);
$phone->setContent(\trim($supplier->addr->phone, ",. \t")); $phone->content = \trim($supplier->addr->phone, ",. \t");
$obj->addContactElement($phone); $obj->addContactElement($phone);
} }
@ -365,7 +349,7 @@ final class Importer extends ImporterAbstract
$website = new ContactElement(); $website = new ContactElement();
$website->setType(ContactType::WEBSITE); $website->setType(ContactType::WEBSITE);
$website->setSubtype(0); $website->setSubtype(0);
$website->setContent(\trim($supplier->addr->website, ",. \t")); $website->content = \trim($supplier->addr->website, ",. \t");
$obj->addContactElement($website); $obj->addContactElement($website);
} }
@ -373,7 +357,7 @@ final class Importer extends ImporterAbstract
$fax = new ContactElement(); $fax = new ContactElement();
$fax->setType(ContactType::FAX); $fax->setType(ContactType::FAX);
$fax->setSubtype(0); $fax->setSubtype(0);
$fax->setContent(\trim($supplier->addr->fax, ",. \t")); $fax->content = \trim($supplier->addr->fax, ",. \t");
$obj->addContactElement($fax); $obj->addContactElement($fax);
} }
@ -381,7 +365,7 @@ final class Importer extends ImporterAbstract
$email = new ContactElement(); $email = new ContactElement();
$email->setType(ContactType::EMAIL); $email->setType(ContactType::EMAIL);
$email->setSubtype(0); $email->setSubtype(0);
$email->setContent(\trim($supplier->addr->email, ",. \t")); $email->content = \trim($supplier->addr->email, ",. \t");
$obj->addContactElement($email); $obj->addContactElement($email);
} }
@ -416,15 +400,11 @@ final class Importer extends ImporterAbstract
*/ */
public function importArticle(\DateTime $start, \DateTime $end, array $files = []) : void public function importArticle(\DateTime $start, \DateTime $end, array $files = []) : void
{ {
DataMapperFactory::db($this->remote);
$query = GSDArticleMapper::getQuery();
$query->where('Artikel_3.row_create_time', '>=', $start)
->andWhere('Artikel_3.row_create_time', '<=', $end);
/** @var GSDArticle[] $articles */ /** @var GSDArticle[] $articles */
$articles = GSDArticleMapper::getAllByQuery($query); $articles = GSDArticleMapper::getAll($this->remote)
->where('createdAt', $start, '>=')
DataMapperFactory::db($this->local); ->where('createdAt', $end, '<=')
->execute();
$itemL11nType = $this->createItemL11nTypes(); $itemL11nType = $this->createItemL11nTypes();
$itemAttrType = $this->createItemAttributeTypes(); $itemAttrType = $this->createItemAttributeTypes();

View File

@ -33,20 +33,20 @@ final class GSDAddressMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'Nummer' => ['name' => 'Nummer', 'type' => 'int', 'internal' => 'id'], 'Nummer' => ['name' => 'Nummer', 'type' => 'int', 'internal' => 'id'],
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
'Name1' => ['name' => 'Name1', 'type' => 'string', 'internal' => 'name1'], 'Name1' => ['name' => 'Name1', 'type' => 'string', 'internal' => 'name1'],
'Name2' => ['name' => 'Name2', 'type' => 'string', 'internal' => 'name2'], 'Name2' => ['name' => 'Name2', 'type' => 'string', 'internal' => 'name2'],
'Name3' => ['name' => 'Name3', 'type' => 'string', 'internal' => 'name3'], 'Name3' => ['name' => 'Name3', 'type' => 'string', 'internal' => 'name3'],
'Ort' => ['name' => 'Ort', 'type' => 'string', 'internal' => 'city'], 'Ort' => ['name' => 'Ort', 'type' => 'string', 'internal' => 'city'],
'PLZ' => ['name' => 'PLZ', 'type' => 'string', 'internal' => 'zip'], 'PLZ' => ['name' => 'PLZ', 'type' => 'string', 'internal' => 'zip'],
'Strasse' => ['name' => 'Strasse', 'type' => 'string', 'internal' => 'street'], 'Strasse' => ['name' => 'Strasse', 'type' => 'string', 'internal' => 'street'],
'Land' => ['name' => 'Land', 'type' => 'string', 'internal' => 'country'], 'Land' => ['name' => 'Land', 'type' => 'string', 'internal' => 'country'],
'Telefon' => ['name' => 'Telefon', 'type' => 'string', 'internal' => 'phone'], 'Telefon' => ['name' => 'Telefon', 'type' => 'string', 'internal' => 'phone'],
'Fax' => ['name' => 'Fax', 'type' => 'string', 'internal' => 'fax'], 'Fax' => ['name' => 'Fax', 'type' => 'string', 'internal' => 'fax'],
'EMail' => ['name' => 'EMail', 'type' => 'string', 'internal' => 'email'], 'EMail' => ['name' => 'EMail', 'type' => 'string', 'internal' => 'email'],
'InternetAdresse' => ['name' => 'InternetAdresse', 'type' => 'string', 'internal' => 'website'], 'InternetAdresse' => ['name' => 'InternetAdresse', 'type' => 'string', 'internal' => 'website'],
]; ];
/** /**

View File

@ -33,57 +33,57 @@ final class GSDArticleMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'], 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'],
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
'Artikelnummer' => ['name' => 'Artikelnummer', 'type' => 'string', 'internal' => 'number'], 'Artikelnummer' => ['name' => 'Artikelnummer', 'type' => 'string', 'internal' => 'number'],
'Auslaufartikel' => ['name' => 'Auslaufartikel', 'type' => 'bool', 'internal' => 'isDiscontinued'], 'Auslaufartikel' => ['name' => 'Auslaufartikel', 'type' => 'bool', 'internal' => 'isDiscontinued'],
'_Artikelsperre' => ['name' => '_Artikelsperre', 'type' => 'bool', 'internal' => 'isBlocked'], '_Artikelsperre' => ['name' => '_Artikelsperre', 'type' => 'bool', 'internal' => 'isBlocked'],
'ManuelleChargenEntnahme' => ['name' => 'ManuelleChargenEntnahme', 'type' => 'bool', 'internal' => 'manualLotUse'], 'ManuelleChargenEntnahme' => ['name' => 'ManuelleChargenEntnahme', 'type' => 'bool', 'internal' => 'manualLotUse'],
'Chargenverwaltung' => ['name' => 'Chargenverwaltung', 'type' => 'string', 'internal' => 'lotManagement'], 'Chargenverwaltung' => ['name' => 'Chargenverwaltung', 'type' => 'string', 'internal' => 'lotManagement'],
'Seriennummernvergabe' => ['name' => 'Seriennummernvergabe', 'type' => 'bool', 'internal' => 'hasSN'], 'Seriennummernvergabe' => ['name' => 'Seriennummernvergabe', 'type' => 'bool', 'internal' => 'hasSN'],
'_Minusbestand' => ['name' => '_Minusbestand', 'type' => 'bool', 'internal' => 'negativeStock'], '_Minusbestand' => ['name' => '_Minusbestand', 'type' => 'bool', 'internal' => 'negativeStock'],
'_Exportartikel' => ['name' => '_Exportartikel', 'type' => 'bool', 'internal' => 'exportItem'], '_Exportartikel' => ['name' => '_Exportartikel', 'type' => 'bool', 'internal' => 'exportItem'],
'_DrittlandArtikel' => ['name' => '_DrittlandArtikel', 'type' => 'bool', 'internal' => 'nonEUItem'], '_DrittlandArtikel' => ['name' => '_DrittlandArtikel', 'type' => 'bool', 'internal' => 'nonEUItem'],
'_DualUse' => ['name' => '_DualUse', 'type' => 'bool', 'internal' => 'dualUse'], '_DualUse' => ['name' => '_DualUse', 'type' => 'bool', 'internal' => 'dualUse'],
'EkEinheit' => ['name' => 'EkEinheit', 'type' => 'string', 'internal' => 'purchaseUnit'], 'EkEinheit' => ['name' => 'EkEinheit', 'type' => 'string', 'internal' => 'purchaseUnit'],
'Gewicht' => ['name' => 'Gewicht', 'type' => 'float', 'internal' => 'weight'], 'Gewicht' => ['name' => 'Gewicht', 'type' => 'float', 'internal' => 'weight'],
'Hoehe' => ['name' => 'Hoehe', 'type' => 'float', 'internal' => 'height'], 'Hoehe' => ['name' => 'Hoehe', 'type' => 'float', 'internal' => 'height'],
'Laenge' => ['name' => 'Laenge', 'type' => 'float', 'internal' => 'length'], 'Laenge' => ['name' => 'Laenge', 'type' => 'float', 'internal' => 'length'],
'Volumen' => ['name' => 'Volumen', 'type' => 'float', 'internal' => 'volume'], 'Volumen' => ['name' => 'Volumen', 'type' => 'float', 'internal' => 'volume'],
'Mindestbestand' => ['name' => 'Mindestbestand', 'type' => 'float', 'internal' => 'minimalStock'], 'Mindestbestand' => ['name' => 'Mindestbestand', 'type' => 'float', 'internal' => 'minimalStock'],
'BeschaffungszeitWochen' => ['name' => 'BeschaffungszeitWochen', 'type' => 'int', 'internal' => 'leadTimeWeeks'], 'BeschaffungszeitWochen' => ['name' => 'BeschaffungszeitWochen', 'type' => 'int', 'internal' => 'leadTimeWeeks'],
'BeschaffungszeitTage' => ['name' => 'BeschaffungszeitTage', 'type' => 'int', 'internal' => 'leadTimeDays'], 'BeschaffungszeitTage' => ['name' => 'BeschaffungszeitTage', 'type' => 'int', 'internal' => 'leadTimeDays'],
'_InfoVerkauf' => ['name' => '_InfoVerkauf', 'type' => 'string', 'internal' => 'infoSales'], '_InfoVerkauf' => ['name' => '_InfoVerkauf', 'type' => 'string', 'internal' => 'infoSales'],
'_InfoEinkauf' => ['name' => '_InfoEinkauf', 'type' => 'string', 'internal' => 'infoPurchase'], '_InfoEinkauf' => ['name' => '_InfoEinkauf', 'type' => 'string', 'internal' => 'infoPurchase'],
'_LagerInfo' => ['name' => '_LagerInfo', 'type' => 'string', 'internal' => 'infoWarehouse'], '_LagerInfo' => ['name' => '_LagerInfo', 'type' => 'string', 'internal' => 'infoWarehouse'],
'WebShop' => ['name' => 'WebShop', 'type' => 'int', 'internal' => 'inShop'], 'WebShop' => ['name' => 'WebShop', 'type' => 'int', 'internal' => 'inShop'],
'Artikelbezeichnung' => ['name' => 'Artikelbezeichnung', 'type' => 'string', 'internal' => 'name1'], 'Artikelbezeichnung' => ['name' => 'Artikelbezeichnung', 'type' => 'string', 'internal' => 'name1'],
'_Artikelbezeichnung2' => ['name' => '_Artikelbezeichnung2', 'type' => 'string', 'internal' => 'name2'], '_Artikelbezeichnung2' => ['name' => '_Artikelbezeichnung2', 'type' => 'string', 'internal' => 'name2'],
'_Englisch1' => ['name' => '_Englisch1', 'type' => 'string', 'internal' => 'name1Eng'], '_Englisch1' => ['name' => '_Englisch1', 'type' => 'string', 'internal' => 'name1Eng'],
'_Englisch2' => ['name' => '_Englisch2', 'type' => 'string', 'internal' => 'name2Eng'], '_Englisch2' => ['name' => '_Englisch2', 'type' => 'string', 'internal' => 'name2Eng'],
'EUWarengruppe' => ['name' => 'EUWarengruppe', 'type' => 'string', 'internal' => 'EUitemgroup'], 'EUWarengruppe' => ['name' => 'EUWarengruppe', 'type' => 'string', 'internal' => 'EUitemgroup'],
'zolltarifnr' => ['name' => 'zolltarifnr', 'type' => 'string', 'internal' => 'customsId'], 'zolltarifnr' => ['name' => 'zolltarifnr', 'type' => 'string', 'internal' => 'customsId'],
'_UNNummer' => ['name' => '_UNNummer', 'type' => 'string', 'internal' => 'unnumber'], '_UNNummer' => ['name' => '_UNNummer', 'type' => 'string', 'internal' => 'unnumber'],
'_Pruefabteilung' => ['name' => '_Pruefabteilung', 'type' => 'string', 'internal' => 'inspectionDepartment'], '_Pruefabteilung' => ['name' => '_Pruefabteilung', 'type' => 'string', 'internal' => 'inspectionDepartment'],
'_MedizinProduktklasse' => ['name' => '_MedizinProduktklasse', 'type' => 'string', 'internal' => 'medicinProductClass'], '_MedizinProduktklasse' => ['name' => '_MedizinProduktklasse', 'type' => 'string', 'internal' => 'medicinProductClass'],
'_Sparte' => ['name' => '_Sparte', 'type' => 'string', 'internal' => 'sectionGroup'], '_Sparte' => ['name' => '_Sparte', 'type' => 'string', 'internal' => 'sectionGroup'],
'_Umsatzgruppe' => ['name' => '_Umsatzgruppe', 'type' => 'string', 'internal' => 'salesGroup'], '_Umsatzgruppe' => ['name' => '_Umsatzgruppe', 'type' => 'string', 'internal' => 'salesGroup'],
'_Segment' => ['name' => '_Segment', 'type' => 'string', 'internal' => 'segment'], '_Segment' => ['name' => '_Segment', 'type' => 'string', 'internal' => 'segment'],
'_Produktgruppe' => ['name' => '_Produktgruppe', 'type' => 'int', 'internal' => 'productGroup'], '_Produktgruppe' => ['name' => '_Produktgruppe', 'type' => 'int', 'internal' => 'productGroup'],
'Erloeskennzeichen' => ['name' => 'Erloeskennzeichen', 'type' => 'string', 'internal' => 'earningsIndicator'], 'Erloeskennzeichen' => ['name' => 'Erloeskennzeichen', 'type' => 'string', 'internal' => 'earningsIndicator'],
'Kostenkennzeichen' => ['name' => 'Kostenkennzeichen', 'type' => 'string', 'internal' => 'costsIndicator'], 'Kostenkennzeichen' => ['name' => 'Kostenkennzeichen', 'type' => 'string', 'internal' => 'costsIndicator'],
'_GewichtWeissblech' => ['name' => '_GewichtWeissblech', 'type' => 'float', 'internal' => 'weightTinplate'], '_GewichtWeissblech' => ['name' => '_GewichtWeissblech', 'type' => 'float', 'internal' => 'weightTinplate'],
'_GewichtSonstigeVerbunde' => ['name' => '_GewichtSonstigeVerbunde', 'type' => 'float', 'internal' => 'weightOtherComposites'], '_GewichtSonstigeVerbunde' => ['name' => '_GewichtSonstigeVerbunde', 'type' => 'float', 'internal' => 'weightOtherComposites'],
'_GewichtSonstiges' => ['name' => '_GewichtSonstiges', 'type' => 'float', 'internal' => 'weightOther'], '_GewichtSonstiges' => ['name' => '_GewichtSonstiges', 'type' => 'float', 'internal' => 'weightOther'],
'_GewichtPET' => ['name' => '_GewichtPET', 'type' => 'float', 'internal' => 'weightPET'], '_GewichtPET' => ['name' => '_GewichtPET', 'type' => 'float', 'internal' => 'weightPET'],
'_GewichtPapier' => ['name' => '_GewichtPapier', 'type' => 'float', 'internal' => 'weightPaper'], '_GewichtPapier' => ['name' => '_GewichtPapier', 'type' => 'float', 'internal' => 'weightPaper'],
'_GewichtNaturmaterialien' => ['name' => '_GewichtNaturmaterialien', 'type' => 'float', 'internal' => 'weightNatureProducts'], '_GewichtNaturmaterialien' => ['name' => '_GewichtNaturmaterialien', 'type' => 'float', 'internal' => 'weightNatureProducts'],
'_GewichtKunststoff' => ['name' => '_GewichtKunststoff', 'type' => 'float', 'internal' => 'weightAcrylics'], '_GewichtKunststoff' => ['name' => '_GewichtKunststoff', 'type' => 'float', 'internal' => 'weightAcrylics'],
'_GewichtKartonverbunde' => ['name' => '_GewichtKartonverbunde', 'type' => 'float', 'internal' => 'weightCarton'], '_GewichtKartonverbunde' => ['name' => '_GewichtKartonverbunde', 'type' => 'float', 'internal' => 'weightCarton'],
'_GewichtGlas' => ['name' => '_GewichtGlas', 'type' => 'float', 'internal' => 'weightGlas'], '_GewichtGlas' => ['name' => '_GewichtGlas', 'type' => 'float', 'internal' => 'weightGlas'],
'_GewichtAluminium' => ['name' => '_GewichtAluminium', 'type' => 'float', 'internal' => 'weightAluminium'], '_GewichtAluminium' => ['name' => '_GewichtAluminium', 'type' => 'float', 'internal' => 'weightAluminium'],
'_GewichtBrutto' => ['name' => '_GewichtBrutto', 'type' => 'float', 'internal' => 'weightGross'], '_GewichtBrutto' => ['name' => '_GewichtBrutto', 'type' => 'float', 'internal' => 'weightGross'],
]; ];
/** /**

View File

@ -33,11 +33,11 @@ final class GSDCostCenterMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'], 'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], '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], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
'KST' => ['name' => 'KST', 'type' => 'string', 'internal' => 'costCenter'], 'KST' => ['name' => 'KST', 'type' => 'string', 'internal' => 'costCenter'],
'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'], 'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
]; ];
/** /**

View File

@ -33,11 +33,11 @@ final class GSDCostObjectMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'], 'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], '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], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
'KTR' => ['name' => 'KTR', 'type' => 'string', 'internal' => 'costObject'], 'KTR' => ['name' => 'KTR', 'type' => 'string', 'internal' => 'costObject'],
'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'], 'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
]; ];
/** /**

View File

@ -33,36 +33,36 @@ final class GSDCustomerMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'], 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'],
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'], 'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt'],
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
'Kundennummer' => ['name' => 'Kundennummer', 'type' => 'string', 'internal' => 'number'], 'Kundennummer' => ['name' => 'Kundennummer', 'type' => 'string', 'internal' => 'number'],
'Kundentyp' => ['name' => 'Kundentyp', 'type' => 'string', 'internal' => 'customerType'], 'Kundentyp' => ['name' => 'Kundentyp', 'type' => 'string', 'internal' => 'customerType'],
'Konto' => ['name' => 'Konto', 'type' => 'int', 'internal' => 'account'], 'Konto' => ['name' => 'Konto', 'type' => 'int', 'internal' => 'account'],
'_MatGuthabenKonto' => ['name' => '_MatGuthabenKonto', 'type' => 'int', 'internal' => 'materialAccount'], '_MatGuthabenKonto' => ['name' => '_MatGuthabenKonto', 'type' => 'int', 'internal' => 'materialAccount'],
'_Rechtsform' => ['name' => '_Rechtsform', 'type' => 'int', 'internal' => 'legalType'], '_Rechtsform' => ['name' => '_Rechtsform', 'type' => 'int', 'internal' => 'legalType'],
'Sammelkonto' => ['name' => 'Sammelkonto', 'type' => 'int', 'internal' => 'accountsReceivableAccount'], 'Sammelkonto' => ['name' => 'Sammelkonto', 'type' => 'int', 'internal' => 'accountsReceivableAccount'],
'Erloeskennzeichen' => ['name' => 'Erloeskennzeichen', 'type' => 'string', 'internal' => 'earningsIndicator'], 'Erloeskennzeichen' => ['name' => 'Erloeskennzeichen', 'type' => 'string', 'internal' => 'earningsIndicator'],
'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'], 'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'],
'KreditLimitintern' => ['name' => 'KreditLimitintern', 'type' => 'float', 'internal' => 'creditlimit'], 'KreditLimitintern' => ['name' => 'KreditLimitintern', 'type' => 'float', 'internal' => 'creditlimit'],
'EGUstId' => ['name' => 'EGUstId', 'type' => 'string', 'internal' => 'egustid'], 'EGUstId' => ['name' => 'EGUstId', 'type' => 'string', 'internal' => 'egustid'],
'Steuernummer' => ['name' => 'Steuernummer', 'type' => 'string', 'internal' => 'taxid'], 'Steuernummer' => ['name' => 'Steuernummer', 'type' => 'string', 'internal' => 'taxid'],
'BIC' => ['name' => 'BIC', 'type' => 'string', 'internal' => 'bic'], 'BIC' => ['name' => 'BIC', 'type' => 'string', 'internal' => 'bic'],
'IBAN' => ['name' => 'IBAN', 'type' => 'string', 'internal' => 'iban'], 'IBAN' => ['name' => 'IBAN', 'type' => 'string', 'internal' => 'iban'],
'MandatsRef' => ['name' => 'MandatsRef', 'type' => 'string', 'internal' => 'bankRef'], 'MandatsRef' => ['name' => 'MandatsRef', 'type' => 'string', 'internal' => 'bankRef'],
'Verkaeufer' => ['name' => 'Verkaeufer', 'type' => 'string', 'internal' => 'salesRep'], 'Verkaeufer' => ['name' => 'Verkaeufer', 'type' => 'string', 'internal' => 'salesRep'],
'AdressId' => ['name' => 'AdressId', 'type' => 'int', 'internal' => 'addr'], 'AdressId' => ['name' => 'AdressId', 'type' => 'int', 'internal' => 'addr'],
'Auftragssperre' => ['name' => 'Auftragssperre', 'type' => 'bool', 'internal' => 'isLocked'], 'Auftragssperre' => ['name' => 'Auftragssperre', 'type' => 'bool', 'internal' => 'isLocked'],
'_Papierkorb' => ['name' => '_Papierkorb', 'type' => 'bool', 'internal' => 'isBlocked'], '_Papierkorb' => ['name' => '_Papierkorb', 'type' => 'bool', 'internal' => 'isBlocked'],
'Auslauf' => ['name' => 'Auslauf', 'type' => 'bool', 'internal' => 'isDiscontinued'], 'Auslauf' => ['name' => 'Auslauf', 'type' => 'bool', 'internal' => 'isDiscontinued'],
'Mahnsperre' => ['name' => 'Mahnsperre', 'type' => 'bool', 'internal' => 'reminderBlock'], 'Mahnsperre' => ['name' => 'Mahnsperre', 'type' => 'bool', 'internal' => 'reminderBlock'],
'Sammelrechnung' => ['name' => 'Sammelrechnung', 'type' => 'bool', 'internal' => 'isMonthlyInvoice'], 'Sammelrechnung' => ['name' => 'Sammelrechnung', 'type' => 'bool', 'internal' => 'isMonthlyInvoice'],
'_Partnernummer1' => ['name' => '_Partnernummer1', 'type' => 'string', 'internal' => 'partner/1'], '_Partnernummer1' => ['name' => '_Partnernummer1', 'type' => 'string', 'internal' => 'partner/1'],
'_Partnernummer2' => ['name' => '_Partnernummer2', 'type' => 'string', 'internal' => 'partner/2'], '_Partnernummer2' => ['name' => '_Partnernummer2', 'type' => 'string', 'internal' => 'partner/2'],
'_Partnernummer3' => ['name' => '_Partnernummer3', 'type' => 'string', 'internal' => 'partner/3'], '_Partnernummer3' => ['name' => '_Partnernummer3', 'type' => 'string', 'internal' => 'partner/3'],
'_Partnernummer4' => ['name' => '_Partnernummer4', 'type' => 'string', 'internal' => 'partner/4'], '_Partnernummer4' => ['name' => '_Partnernummer4', 'type' => 'string', 'internal' => 'partner/4'],
'_Partnernummer5' => ['name' => '_Partnernummer5', 'type' => 'string', 'internal' => 'partner/5'], '_Partnernummer5' => ['name' => '_Partnernummer5', 'type' => 'string', 'internal' => 'partner/5'],
'_Partnernummer6' => ['name' => '_Partnernummer6', 'type' => 'string', 'internal' => 'partner/6'], '_Partnernummer6' => ['name' => '_Partnernummer6', 'type' => 'string', 'internal' => 'partner/6'],
]; ];
/** /**
@ -73,8 +73,8 @@ final class GSDCustomerMapper extends DataMapperFactory
*/ */
public const OWNS_ONE = [ public const OWNS_ONE = [
'addr' => [ 'addr' => [
'mapper' => GSDAddressMapper::class, 'mapper' => GSDAddressMapper::class,
'external' => 'AdressId', 'external' => 'AdressId',
], ],
]; ];

View File

@ -33,16 +33,16 @@ final class GSDSupplierMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'], 'row_id' => ['name' => 'row_id', 'type' => 'int', 'internal' => 'id'],
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], '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], 'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
'LieferantenNummer' => ['name' => 'LieferantenNummer', 'type' => 'string', 'internal' => 'number'], 'LieferantenNummer' => ['name' => 'LieferantenNummer', 'type' => 'string', 'internal' => 'number'],
'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'], 'Info' => ['name' => 'Info', 'type' => 'string', 'internal' => 'info'],
'Auftragssperre' => ['name' => 'Auftragssperre', 'type' => 'string', 'internal' => 'deliveryStatus'], 'Auftragssperre' => ['name' => 'Auftragssperre', 'type' => 'string', 'internal' => 'deliveryStatus'],
'Steuernummer' => ['name' => 'Steuernummer', 'type' => 'string', 'internal' => 'taxid'], 'Steuernummer' => ['name' => 'Steuernummer', 'type' => 'string', 'internal' => 'taxid'],
'BIC' => ['name' => 'BIC', 'type' => 'string', 'internal' => 'bic'], 'BIC' => ['name' => 'BIC', 'type' => 'string', 'internal' => 'bic'],
'IBAN' => ['name' => 'IBAN', 'type' => 'string', 'internal' => 'iban'], 'IBAN' => ['name' => 'IBAN', 'type' => 'string', 'internal' => 'iban'],
'AdressId' => ['name' => 'AdressId', 'type' => 'int', 'internal' => 'addr'], 'AdressId' => ['name' => 'AdressId', 'type' => 'int', 'internal' => 'addr'],
]; ];
/** /**
@ -53,8 +53,8 @@ final class GSDSupplierMapper extends DataMapperFactory
*/ */
public const OWNS_ONE = [ public const OWNS_ONE = [
'addr' => [ 'addr' => [
'mapper' => GSDAddressMapper::class, 'mapper' => GSDAddressMapper::class,
'external' => 'AdressId', 'external' => 'AdressId',
], ],
]; ];

View File

@ -1,4 +1,16 @@
<?php declare(strict_types=1); <?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Template
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
$lang = $this->getData('lang'); $lang = $this->getData('lang');
?> ?>

View File

@ -1,4 +1,16 @@
<?php declare(strict_types=1); <?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Template
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
$lang = $this->getData('lang'); $lang = $this->getData('lang');
?> ?>

View File

@ -34,14 +34,14 @@ final class ExchangeLogMapper extends DataMapperFactory
* @since 1.0.0 * @since 1.0.0
*/ */
public const COLUMNS = [ public const COLUMNS = [
'exchange_log_id' => ['name' => 'exchange_log_id', 'type' => 'int', 'internal' => 'id'], 'exchange_log_id' => ['name' => 'exchange_log_id', 'type' => 'int', 'internal' => 'id'],
'exchange_log_message' => ['name' => 'exchange_log_message', 'type' => 'string', 'internal' => 'message'], 'exchange_log_message' => ['name' => 'exchange_log_message', 'type' => 'string', 'internal' => 'message'],
'exchange_log_fields' => ['name' => 'exchange_log_fields', 'type' => 'Json', 'internal' => 'fields'], 'exchange_log_fields' => ['name' => 'exchange_log_fields', 'type' => 'Json', 'internal' => 'fields'],
'exchange_log_type' => ['name' => 'exchange_log_type', 'type' => 'int', 'internal' => 'type'], 'exchange_log_type' => ['name' => 'exchange_log_type', 'type' => 'int', 'internal' => 'type'],
'exchange_log_subtype' => ['name' => 'exchange_log_subtype', 'type' => 'string', 'internal' => 'subtype'], 'exchange_log_subtype' => ['name' => 'exchange_log_subtype', 'type' => 'string', 'internal' => 'subtype'],
'exchange_log_created_at' => ['name' => 'exchange_log_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true], 'exchange_log_created_at' => ['name' => 'exchange_log_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
'exchange_log_created_by' => ['name' => 'exchange_log_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true], 'exchange_log_created_by' => ['name' => 'exchange_log_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
'exchange_log_exchange' => ['name' => 'exchange_log_exchange', 'type' => 'int', 'internal' => 'exchange'], 'exchange_log_exchange' => ['name' => 'exchange_log_exchange', 'type' => 'int', 'internal' => 'exchange'],
]; ];
/** /**
@ -76,12 +76,12 @@ final class ExchangeLogMapper extends DataMapperFactory
*/ */
public const BELONGS_TO = [ public const BELONGS_TO = [
'createdBy' => [ 'createdBy' => [
'mapper' => AccountMapper::class, 'mapper' => AccountMapper::class,
'external' => 'exchange_log_created_by', 'external' => 'exchange_log_created_by',
], ],
'exchange' => [ 'exchange' => [
'mapper' => InterfaceManagerMapper::class, 'mapper' => InterfaceManagerMapper::class,
'external' => 'exchange_log_exchange', 'external' => 'exchange_log_exchange',
], ],
]; ];
} }