diff --git a/classes/tax/TaxRulesGroup.php b/classes/tax/TaxRulesGroup.php index ea597bab7..469b6c641 100644 --- a/classes/tax/TaxRulesGroup.php +++ b/classes/tax/TaxRulesGroup.php @@ -53,22 +53,15 @@ class TaxRulesGroupCore extends ObjectModel protected static $_taxes = array(); - public static function getTaxRulesGroups($only_active = true, $multiShop = false) + public static function getTaxRulesGroups($only_active = true) { - if ((bool)$multiShop) { - return Db::getInstance()->executeS(' - SELECT * + return Db::getInstance()->executeS(' + SELECT DISTINCT g.id_tax_rules_group, g.name, g.active FROM `'._DB_PREFIX_.'tax_rules_group` g' .Shop::addSqlAssociation('tax_rules_group', 'g') .($only_active ? ' WHERE g.`active` = 1' : '').' ORDER BY name ASC'); - } else { - return Db::getInstance()->executeS(' - SELECT * - FROM `'._DB_PREFIX_.'tax_rules_group` g' - .($only_active ? ' WHERE g.`active` = 1' : '').' - ORDER BY name ASC'); - } + } /** diff --git a/controllers/admin/AdminProductsController.php b/controllers/admin/AdminProductsController.php index 0f3a5216c..2fe0243a7 100644 --- a/controllers/admin/AdminProductsController.php +++ b/controllers/admin/AdminProductsController.php @@ -2993,7 +2993,7 @@ class AdminProductsControllerCore extends AdminController $data->assign(array( 'link' => $this->context->link, 'currency' => $currency = $this->context->currency, - 'tax_rules_groups' => TaxRulesGroup::getTaxRulesGroups(true, true), + 'tax_rules_groups' => TaxRulesGroup::getTaxRulesGroups(true), 'taxesRatesByGroup' => TaxRulesGroup::getAssociatedTaxRatesByIdCountry($this->context->country->id), 'ecotaxTaxRate' => Tax::getProductEcotaxRate(), 'tax_exclude_taxe_option' => Tax::excludeTaxeOption(),