From 12e7e3a44a6b457ede4ad63bc558e086b5bf9f9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Thu, 4 Jul 2013 17:00:27 +0200 Subject: [PATCH] [-] BO: display vat number field should not depends of the vatnumber module #PSCFV-9672 --- .../controllers/addresses/helpers/form/form.tpl | 8 +------- controllers/admin/AdminAddressesController.php | 11 ----------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl index ef3c911b2..2b70dfdc8 100644 --- a/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/addresses/helpers/form/form.tpl @@ -27,13 +27,7 @@ {block name="label"} {if $input.name == 'vat_number'} - {if $vat == 'is_applicable'} -
- {else if $vat == 'management'} -
- {else} -
- {/if} +
{/if} {if $input.type == 'text_customer' && !isset($customer)} diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index 9ab026776..cc411b8eb 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -152,18 +152,7 @@ class AdminAddressesControllerCore extends AdminController $token_customer = Tools::getAdminToken('AdminCustomers'.(int)(Tab::getIdFromClassName('AdminCustomers')).(int)$this->context->employee->id); } - // @todo in 1.4, this include was done before the class declaration - // We should use a hook now - if (Configuration::get('VATNUMBER_MANAGEMENT') && file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php')) - include_once(_PS_MODULE_DIR_.'vatnumber/vatnumber.php'); - if (Configuration::get('VATNUMBER_MANAGEMENT')) - if (file_exists(_PS_MODULE_DIR_.'vatnumber/vatnumber.php') && VatNumber::isApplicable(Configuration::get('PS_COUNTRY_DEFAULT'))) - $vat = 'is_applicable'; - else - $vat = 'management'; - $this->tpl_form_vars = array( - 'vat' => isset($vat) ? $vat : null, 'customer' => isset($customer) ? $customer : null, 'tokenCustomer' => isset ($token_customer) ? $token_customer : null );