diff --git a/src/Application/views/admin/de/config_lang.php b/src/Application/views/admin/de/config_lang.php
index 9a1058f..ff83590 100644
--- a/src/Application/views/admin/de/config_lang.php
+++ b/src/Application/views/admin/de/config_lang.php
@@ -24,7 +24,11 @@ $aLang = array(
'charset' => 'UTF-8',
'SHOP_MODULE_GROUP_d3xrechnung' => 'Einstellungen',
'SHOP_MODULE_d3xrechnung_PATH_GENERATOR' => 'URL Generator xRechnung',
+ 'HELP_SHOP_MODULE_d3xrechnung_PATH_GENERATOR' => 'Beispiel: https://xrechnung.DOMAIN.TLD/xrechnung.php',
'SHOP_MODULE_d3xrechnung_HTACCESS_USER' => '.htaccess - User',
'SHOP_MODULE_d3xrechnung_HTACCESS_PASSWORD' => '.htaccess - Password',
- 'SHOP_MODULE_d3xrechnung_EXPORT_FOLDER' => 'Order für Export, Beispiel: export/xml (eventuell Unterordner anlegen und beschreibbar machen!)',
+ 'SHOP_MODULE_d3xrechnung_EXPORT_FOLDER' => 'Order für Export',
+ 'HELP_SHOP_MODULE_d3xrechnung_EXPORT_FOLDER' => 'Beispiel: export/xml
eventuell Unterordner anlegen und beschreibbar machen!',
+ 'SHOP_MODULE_d3xrechnung_BT_ORDERFIELDS' => 'Zuordnung Felder aus oxorder zu bestimmten BT-Felder',
+ 'HELP_SHOP_MODULE_d3xrechnung_BT_ORDERFIELDS' => 'Beispiel: BT13 => oxremark',
);
\ No newline at end of file
diff --git a/src/metadata.php b/src/metadata.php
index d6183df..2197867 100644
--- a/src/metadata.php
+++ b/src/metadata.php
@@ -74,6 +74,12 @@ Der Pfad und Zugangsschutz zum Generator wird in der Konfiguration des Moduls hi
'type' => 'str',
'value' => 'export/xml'
],
+ [
+ 'group' => 'd3xrechnung',
+ 'name' => 'd3xrechnung_BT_ORDERFIELDS',
+ 'type' => 'aarr',
+ 'value' => ''
+ ],
],
'blocks' => array(
array(
diff --git a/src/public/connect.php b/src/public/connect.php
index 30fa2b8..b5107ce 100644
--- a/src/public/connect.php
+++ b/src/public/connect.php
@@ -97,10 +97,25 @@ MSQL;
$OXID = $aParameter['OXID'];
$sTable = Registry::get(TableViewNameGenerator::class)->getViewName('oxorder');
$Db = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
- $sQuery = "SELECT * FROM ".$sTable." WHERE OXID= ?";
+ $sSqlAdd = $this->getAddOrderFieldsSql();
+ $sQuery = "SELECT * {$sSqlAdd} FROM ".$sTable." WHERE OXID= ?";
+
return $Db->getRow($sQuery,[$OXID]);
}
+ public function getAddOrderFieldsSql()
+ {
+ $myConfig = Registry::getConfig();
+ $aFields = $myConfig->getConfigParam("d3xrechnung_BT_ORDERFIELDS");
+ $sFields = '';
+ foreach ($aFields as $Key => $Field)
+ {
+ $sFields .=', '.$Field. ' AS '.strtoupper($Key);
+ }
+
+ return $sFields;
+ }
+
/**
* @param array $aParameter