diff --git a/class/datanorm.class.php b/class/datanorm.class.php
index 50c1148..c224eb0 100755
--- a/class/datanorm.class.php
+++ b/class/datanorm.class.php
@@ -975,13 +975,13 @@ class Datanorm extends CommonObject
// P;A format - multiple articles per line
// Format: P;A;ArtNr;PreisKz;Preis;PE;Zuschlag;x;x;x;ArtNr2;...
- // PE is the price unit code from DATPREIS (may differ from A-record!)
+ // Rabattkennzeichen aus DATPREIS (wird gespeichert aber nicht fuer price_unit verwendet)
if ($recordType === 'P' && isset($parts[1]) && $parts[1] === 'A') {
$i = 2;
while ($i < count($parts) - 2) {
$articleNumber = trim($parts[$i] ?? '');
$priceRaw = trim($parts[$i + 2] ?? '0');
- $datpreisPeCode = (int)trim($parts[$i + 3] ?? '0'); // PE code from DATPREIS
+ $datpreisPeCode = (int)trim($parts[$i + 3] ?? '0'); // Rabattkennzeichen (nicht PE!)
$metalSurchargeRaw = trim($parts[$i + 4] ?? '0');
$price = (float)$priceRaw / 100; // Convert cents to euros
$metalSurcharge = (float)$metalSurchargeRaw / 100; // Convert cents to euros
@@ -1000,7 +1000,7 @@ class Datanorm extends CommonObject
// Simple format: P;ArtNr;PreisKz;Preis;PE;...
$articleNumber = trim($parts[1] ?? '');
$priceRaw = trim($parts[3] ?? '0');
- $datpreisPeCode = (int)trim($parts[4] ?? '0'); // PE code if available
+ $datpreisPeCode = (int)trim($parts[4] ?? '0'); // Rabattkennzeichen (nicht PE!)
if (strpos($priceRaw, ',') === false && strpos($priceRaw, '.') === false) {
$price = (float)$priceRaw / 100;
diff --git a/core/modules/modImportZugferd.class.php b/core/modules/modImportZugferd.class.php
index bc1da66..e315554 100755
--- a/core/modules/modImportZugferd.class.php
+++ b/core/modules/modImportZugferd.class.php
@@ -76,7 +76,7 @@ class modImportZugferd extends DolibarrModules
$this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@importzugferd'
// Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z'
- $this->version = '3.8';
+ $this->version = '4.0';
// Url to the file with your last numberversion of this module
//$this->url_last_version = 'http://www.example.com/versionmodule.txt';
diff --git a/import.php b/import.php
index 39ced3f..abee0da 100755
--- a/import.php
+++ b/import.php
@@ -2356,10 +2356,12 @@ if ($action == 'edit' && $import->id > 0) {
// Line items
print '
';
- print '