added vat_number field in address form

This commit is contained in:
Shreesh Arora
2023-03-14 13:52:08 +00:00
parent 1b438d115f
commit 7f64f28612
9 changed files with 93 additions and 4 deletions

View File

@@ -36,7 +36,7 @@ class AdminAddressesControllerCore extends AdminController
{
$this->bootstrap = true;
$this->required_database = true;
$this->required_fields = array('company', 'address2', 'postcode', 'other', 'phone', 'phone_mobile', 'dni');
$this->required_fields = array('company', 'address2', 'postcode', 'other', 'phone', 'phone_mobile', 'vat_number', 'dni');
$this->table = 'address';
$this->className = 'Address';
$this->lang = false;
@@ -217,6 +217,13 @@ class AdminAddressesControllerCore extends AdminController
'col' => '4',
'hint' => $this->l('Invalid characters:').' <>;=#{}'
);
$temp_fields[] = array(
'type' => 'text',
'label' => $this->l('VAT number'),
'col' => '2',
'name' => 'vat_number',
'required' => in_array('vat_number', $required_fields)
);
} elseif ($addr_field_item == 'lastname') {
if (isset($customer) &&
!Tools::isSubmit('submit'.strtoupper($this->table)) &&