diff --git a/www/pages/shopimporter_presta.php b/www/pages/shopimporter_presta.php index 7ee9eae2..69149240 100644 --- a/www/pages/shopimporter_presta.php +++ b/www/pages/shopimporter_presta.php @@ -203,10 +203,10 @@ class Shopimporter_Presta extends ShopimporterBase $cart['bestelldatum'] = strval($order->date_add); $carrier = $this->prestaRequest('GET', "carriers/$order->id_carrier"); - $cart['lieferung'] = strval($carrier->name); + $cart['lieferung'] = strval($carrier->carrier->name); $customer = $this->prestaRequest('GET', "customers/$order->id_customer"); - $cart['email'] = strval($customer->email); + $cart['email'] = strval($customer->customer->email); $invoiceAddress = $this->prestaRequest('GET', "addresses/$order->id_address_invoice"); $invoiceAddress = $invoiceAddress->address; @@ -263,6 +263,14 @@ class Shopimporter_Presta extends ShopimporterBase } } + $taxes = []; + $this->app->erp->RunHook('getTaxRatesFromShopOrder', 2, $taxedCountry, $taxes); + + if (isset($taxes['normal']) && $taxes['normal'] > 0) + $cart['steuersatz_normal'] = $taxes['normal']; + if (isset($taxes['ermaessigt']) && $taxes['ermaessigt'] > 0) + $cart['steuersatz_ermaessigt'] = $taxes['ermaessigt']; + $cart['articlelist'] = []; foreach ($order->associations->order_rows->order_row as $order_row) { diff --git a/www/pages/steuersaetze.php b/www/pages/steuersaetze.php index 88830761..7cc77d71 100644 --- a/www/pages/steuersaetze.php +++ b/www/pages/steuersaetze.php @@ -1,4 +1,4 @@ - +*/ +?> app->DB->SelectArr( sprintf( - "SELECT DISTINCT `satz` + "SELECT DISTINCT `type`, `satz` FROM `steuersaetze` WHERE `aktiv` = 1 AND (`country_code` = '%s' OR (`bezeichnung` = '%s' AND `country_code` = ''))", @@ -163,7 +163,7 @@ class Steuersaetze { ); if(!empty($taxes)) { foreach($taxes as $rates) { - $ret[] = $rates['satz']; + $ret[$rates['type']] = $rates['satz']; } }