diff --git a/www/pages/shopimporter_shopware6.php b/www/pages/shopimporter_shopware6.php index 87f8ed0c..3d639e1b 100644 --- a/www/pages/shopimporter_shopware6.php +++ b/www/pages/shopimporter_shopware6.php @@ -38,6 +38,9 @@ class Shopimporter_Shopware6 extends ShopimporterBase public $propertyOption; public $shopwareDefaultSalesChannel; public $shopwareMediaFolder; + + private $normalTaxId; + private $reducedTaxId; public $protocol; /** @var bool */ @@ -586,6 +589,8 @@ class Shopimporter_Shopware6 extends ShopimporterBase $this->propertyOption = $einstellungen['felder']['shopwarePropertyOption']; $this->shopwareDefaultSalesChannel = $einstellungen['felder']['shopwareDefaultSalesChannel']; $this->shopwareMediaFolder = $einstellungen['felder']['shopwareMediaFolder']; + $this->normalTaxId = $einstellungen['felder']['normalTaxId']; + $this->reducedTaxId = $einstellungen['felder']['reducedTaxId']; $query = sprintf('SELECT `steuerfreilieferlandexport` FROM `shopexport` WHERE `id` = %d', $this->shopid); $this->taxationByDestinationCountry = !empty($this->app->DB->Select($query)); @@ -669,6 +674,16 @@ class Shopimporter_Shopware6 extends ShopimporterBase 'size' => 40, 'default' => 'Product Media' ], + 'normalTaxId' => [ + 'typ' => 'text', + 'bezeichnung' => '{|TaxId für Steuersatz "normal"|}', + 'size' => 40, + ], + 'reducedTaxId' => [ + 'typ' => 'text', + 'bezeichnung' => '{|TaxId für Steuersatz "ermäßigt"|}', + 'size' => 40, + ], 'statesToFetch' => [ 'typ' => 'text', 'bezeichnung' => '{|Abzuholender Bestellstatus|}:', @@ -927,7 +942,12 @@ class Shopimporter_Shopware6 extends ShopimporterBase $quantity = $this->getCorrectedStockFromAvailable($active, (int)$quantity, $articleInfo); $taxRate = (float)$article['steuersatz']; - $taxId = $this->getTaxIdByRate($taxRate); + if (!empty($this->normalTaxId) && $article['umsatzsteuer'] == 'normal') + $taxId = $this->normalTaxId; + else if (!empty($this->reducedTaxId) && $article['umsatzsteuer'] == 'ermäßigt') + $taxId = $this->reducedTaxId; + else + $taxId = $this->getTaxIdByRate($taxRate); $mediaToAdd = $this->mediaToExport($article, $articleIdShopware);