// duplication of tax_rules_group on adminproducts with multishop

This commit is contained in:
Rémi Gaillard
2013-08-22 10:53:50 +02:00
parent 099baaef70
commit 907d81c32e
2 changed files with 5 additions and 12 deletions
+4 -11
View File
@@ -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');
}
}
/**
@@ -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(),