[-] BO: display vat number field should not depends of the vatnumber module #PSCFV-9672
This commit is contained in:
@@ -27,13 +27,7 @@
|
||||
|
||||
{block name="label"}
|
||||
{if $input.name == 'vat_number'}
|
||||
{if $vat == 'is_applicable'}
|
||||
<div id="vat_area" style="display: visible">
|
||||
{else if $vat == 'management'}
|
||||
<div id="vat_area" style="display: hidden">
|
||||
{else}
|
||||
<div style="display: none;">
|
||||
{/if}
|
||||
<div id="vat_area" style="display: visible">
|
||||
{/if}
|
||||
|
||||
{if $input.type == 'text_customer' && !isset($customer)}
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user