diff --git a/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl b/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl index 420c44ca4..d416d2a07 100644 --- a/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl +++ b/admin/themes/default/template/controllers/addresses/helpers/form/form.tpl @@ -26,10 +26,6 @@ {extends file="helpers/form/form.tpl"} {block name="label"} - {if $input.name == 'vat_number'} -
- {/if} - {if $input.type == 'text_customer' && !isset($customer)} {else} @@ -92,7 +88,4 @@ {else} {$smarty.block.parent} {/if} - {if $input.name == 'vat_number'} -
- {/if} {/block} diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index 010dcf4a8..5b56539c6 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -781,7 +781,6 @@ abstract class PaymentModuleCore extends Module '{delivery_phone}' => ($delivery->phone) ? $delivery->phone : $delivery->phone_mobile, '{delivery_other}' => $delivery->other, '{invoice_company}' => $invoice->company, - '{invoice_vat_number}' => $invoice->vat_number, '{invoice_firstname}' => $invoice->firstname, '{invoice_lastname}' => $invoice->lastname, '{invoice_address2}' => $invoice->address2, diff --git a/controllers/admin/AdminAddressesController.php b/controllers/admin/AdminAddressesController.php index ce37b1743..0c503b10f 100644 --- a/controllers/admin/AdminAddressesController.php +++ b/controllers/admin/AdminAddressesController.php @@ -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', 'vat_number', 'dni'); + $this->required_fields = array('company', 'address2', 'postcode', 'other', 'phone', 'phone_mobile', 'dni'); $this->table = 'address'; $this->className = 'Address'; $this->lang = false; @@ -217,13 +217,6 @@ 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)) && diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php index db3e30745..55b3d0f51 100644 --- a/controllers/front/AddressController.php +++ b/controllers/front/AddressController.php @@ -45,7 +45,6 @@ class AddressControllerCore extends FrontController { parent::setMedia(); $this->addJS(array( - _THEME_JS_DIR_.'tools/vatManagement.js', _THEME_JS_DIR_.'tools/statesManagement.js', _PS_JS_DIR_.'validate.js' )); diff --git a/controllers/front/AddressesController.php b/controllers/front/AddressesController.php index 661c6cef8..27e81f944 100644 --- a/controllers/front/AddressesController.php +++ b/controllers/front/AddressesController.php @@ -85,7 +85,6 @@ class AddressesControllerCore extends FrontController $addresses_style = array( 'company' => 'address_company', - 'vat_number' => 'address_company', 'firstname' => 'address_name', 'lastname' => 'address_name', 'address1' => 'address_address1', diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index 97999bc9a..8b19076d3 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -66,7 +66,6 @@ class AuthControllerCore extends FrontController $this->addJqueryPlugin('typewatch'); $this->addJS(array( - _THEME_JS_DIR_.'tools/vatManagement.js', _THEME_JS_DIR_.'tools/statesManagement.js', _THEME_JS_DIR_.'authentication.js', _PS_JS_DIR_.'validate.js' diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php index 1c0227326..a4660529c 100644 --- a/controllers/front/OrderOpcController.php +++ b/controllers/front/OrderOpcController.php @@ -345,7 +345,6 @@ class OrderOpcControllerCore extends ParentOrderController } $this->addJS(array( - _THEME_JS_DIR_.'tools/vatManagement.js', _THEME_JS_DIR_.'tools/statesManagement.js', _THEME_JS_DIR_.'order-carrier.js', _PS_JS_DIR_.'validate.js' @@ -597,7 +596,6 @@ class OrderOpcControllerCore extends ParentOrderController 'company' => Tools::htmlentitiesUTF8($address_delivery->company), 'lastname' => Tools::htmlentitiesUTF8($address_delivery->lastname), 'firstname' => Tools::htmlentitiesUTF8($address_delivery->firstname), - 'vat_number' => Tools::htmlentitiesUTF8($address_delivery->vat_number), 'dni' => Tools::htmlentitiesUTF8($address_delivery->dni), 'address1' => Tools::htmlentitiesUTF8($address_delivery->address1), 'postcode' => Tools::htmlentitiesUTF8($address_delivery->postcode), @@ -613,7 +611,6 @@ class OrderOpcControllerCore extends ParentOrderController 'company_invoice' => Tools::htmlentitiesUTF8($address_invoice->company), 'lastname_invoice' => Tools::htmlentitiesUTF8($address_invoice->lastname), 'firstname_invoice' => Tools::htmlentitiesUTF8($address_invoice->firstname), - 'vat_number_invoice' => Tools::htmlentitiesUTF8($address_invoice->vat_number), 'dni_invoice' => Tools::htmlentitiesUTF8($address_invoice->dni), 'address1_invoice' => Tools::htmlentitiesUTF8($address_invoice->address1), 'address2_invoice' => Tools::htmlentitiesUTF8($address_invoice->address2), @@ -627,7 +624,6 @@ class OrderOpcControllerCore extends ParentOrderController 'invoice_company' => Tools::htmlentitiesUTF8($address_invoice->company), 'invoice_lastname' => Tools::htmlentitiesUTF8($address_invoice->lastname), 'invoice_firstname' => Tools::htmlentitiesUTF8($address_invoice->firstname), - 'invoice_vat_number' => Tools::htmlentitiesUTF8($address_invoice->vat_number), 'invoice_dni' => Tools::htmlentitiesUTF8($address_invoice->dni), 'invoice_address' => $this->context->cart->id_address_invoice !== $this->context->cart->id_address_delivery, 'invoice_address1' => Tools::htmlentitiesUTF8($address_invoice->address1), diff --git a/pdf/invoice.summary-tab.tpl b/pdf/invoice.summary-tab.tpl index 064af953a..8f3fdae04 100644 --- a/pdf/invoice.summary-tab.tpl +++ b/pdf/invoice.summary-tab.tpl @@ -28,19 +28,11 @@ {l s='Invoice Date' pdf='true'} {l s='Order Reference' pdf='true'} {l s='Order date' pdf='true'} - {if $addresses.invoice->vat_number} - {l s='VAT Number' pdf='true'} - {/if} {$title|escape:'html':'UTF-8'} {dateFormat date=$order->invoice_date full=0} {$order->getUniqReference()} {dateFormat date=$order->date_add full=0} - {if $addresses.invoice->vat_number} - - {$addresses.invoice->vat_number} - - {/if} diff --git a/pdf/order-slip.summary-tab.tpl b/pdf/order-slip.summary-tab.tpl index cf82fa7ea..b729ee6a8 100644 --- a/pdf/order-slip.summary-tab.tpl +++ b/pdf/order-slip.summary-tab.tpl @@ -27,17 +27,9 @@ {l s='Order Reference' pdf='true'} {l s='Order Date' pdf='true'} - {if $addresses.invoice->vat_number} - {l s='VAT Number' pdf='true'} - {/if} {$order->getUniqReference()} {dateFormat date=$order->date_add full=0} - {if $addresses.invoice->vat_number} - - {$addresses.invoice->vat_number} - - {/if} diff --git a/themes/hotel-reservation-theme/address.tpl b/themes/hotel-reservation-theme/address.tpl index 6fa832478..4244145fe 100644 --- a/themes/hotel-reservation-theme/address.tpl +++ b/themes/hotel-reservation-theme/address.tpl @@ -54,16 +54,6 @@ {/if} - {if $field_name eq 'vat_number'} -
-
-
- - -
-
-
- {/if} {if $field_name eq 'dni'} {assign var="dniExist" value=true}
diff --git a/themes/hotel-reservation-theme/authentication.tpl b/themes/hotel-reservation-theme/authentication.tpl index fe3f3dd81..3d3bce37f 100644 --- a/themes/hotel-reservation-theme/authentication.tpl +++ b/themes/hotel-reservation-theme/authentication.tpl @@ -192,14 +192,7 @@
- {elseif $field_name eq "vat_number"} - - {elseif $field_name eq "dni"} + {elseif $field_name eq "dni"} {assign var='dniExist' value=true}
@@ -290,13 +283,6 @@
- {elseif $field_name eq "vat_number"} - {elseif $field_name eq "dni"} {assign var=dniExist value=true}
@@ -551,13 +537,6 @@

{/if} - {elseif $field_name eq "vat_number"} - {elseif $field_name eq "firstname"}

diff --git a/themes/hotel-reservation-theme/js/order-opc.js b/themes/hotel-reservation-theme/js/order-opc.js index 7ef710bf4..728a14494 100644 --- a/themes/hotel-reservation-theme/js/order-opc.js +++ b/themes/hotel-reservation-theme/js/order-opc.js @@ -839,8 +839,6 @@ function saveAddress(type) var params = 'firstname=' + encodeURIComponent($('#firstname' + (type == 'invoice' ? '_invoice' : '')).val()) + '&lastname=' + encodeURIComponent($('#lastname' + (type == 'invoice' ? '_invoice' : '')).val()) + '&'; if ($('#company' + (type == 'invoice' ? '_invoice' : '')).length) params += 'company=' + encodeURIComponent($('#company' + (type == 'invoice' ? '_invoice' : '')).val()) + '&'; - if ($('#vat_number' + (type == 'invoice' ? '_invoice' : '')).length) - params += 'vat_number='+encodeURIComponent($('#vat_number' + (type == 'invoice' ? '_invoice' : '')).val()) + '&'; if ($('#dni' + (type == 'invoice' ? '_invoice' : '')).length) params += 'dni=' + encodeURIComponent($('#dni' + (type == 'invoice' ? '_invoice' : '')).val())+'&'; if ($('#address1' + (type == 'invoice' ? '_invoice' : '')).length) diff --git a/themes/hotel-reservation-theme/js/tools/statesManagement.js b/themes/hotel-reservation-theme/js/tools/statesManagement.js index a97bfd4d9..a38bb793f 100644 --- a/themes/hotel-reservation-theme/js/tools/statesManagement.js +++ b/themes/hotel-reservation-theme/js/tools/statesManagement.js @@ -68,8 +68,6 @@ function bindCheckbox() if ($('#invoice_address:checked').length > 0) { $('#opc_invoice_address').slideDown('slow'); - if ($('#company_invoice').val() == '') - $('#vat_number_block_invoice').hide(); if (typeof bindUniform !=='undefined') bindUniform(); } diff --git a/themes/hotel-reservation-theme/js/tools/vatManagement.js b/themes/hotel-reservation-theme/js/tools/vatManagement.js deleted file mode 100644 index f7a083524..000000000 --- a/themes/hotel-reservation-theme/js/tools/vatManagement.js +++ /dev/null @@ -1,45 +0,0 @@ -/* -* 2007-2017 PrestaShop -* -* NOTICE OF LICENSE -* -* This source file is subject to the Academic Free License (AFL 3.0) -* that is bundled with this package in the file LICENSE.txt. -* It is also available through the world-wide-web at this URL: -* http://opensource.org/licenses/afl-3.0.php -* If you did not receive a copy of the license and are unable to -* obtain it through the world-wide-web, please send an email -* to license@prestashop.com so we can send you a copy immediately. -* -* DISCLAIMER -* -* Do not edit or add to this file if you wish to upgrade PrestaShop to newer -* versions in the future. If you wish to customize PrestaShop for your -* needs please refer to http://www.prestashop.com for more information. -* -* @author PrestaShop SA -* @copyright 2007-2017 PrestaShop SA -* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) -* International Registered Trademark & Property of PrestaShop SA -*/ - -$(document).ready(function() { - vat_number(); - $(document).on('input', '#company, #company_invoice', function(){ - vat_number(); - }); -}); - -function vat_number() { - if ($('#company').length && ($('#company').val() != '')) { - $('#vat_number, #vat_number_block').show(); - } else { - $('#vat_number, #vat_number_block').hide(); - } - - if ($('#company_invoice').length && ($('#company_invoice').val() != '')) { - $('#vat_number_block_invoice').show(); - } else { - $('#vat_number_block_invoice').hide(); - } -} diff --git a/themes/hotel-reservation-theme/order-opc-new-account-advanced.tpl b/themes/hotel-reservation-theme/order-opc-new-account-advanced.tpl index 495285734..4a83ca90d 100644 --- a/themes/hotel-reservation-theme/order-opc-new-account-advanced.tpl +++ b/themes/hotel-reservation-theme/order-opc-new-account-advanced.tpl @@ -157,13 +157,6 @@

- {elseif $field_name eq "vat_number"} - {elseif $field_name eq "dni"} {assign var='dniExist' value=true}
@@ -276,13 +269,6 @@
- {elseif $field_name eq "vat_number"} - {elseif $field_name eq "dni"} {assign var='dniExist' value=true}
diff --git a/themes/hotel-reservation-theme/order-opc-new-account.tpl b/themes/hotel-reservation-theme/order-opc-new-account.tpl index 8e4f81950..6c0ebdb61 100644 --- a/themes/hotel-reservation-theme/order-opc-new-account.tpl +++ b/themes/hotel-reservation-theme/order-opc-new-account.tpl @@ -189,13 +189,6 @@
- {elseif $field_name eq "vat_number"} - {elseif $field_name eq "dni"} {assign var='dniExist' value=true}
@@ -286,13 +279,6 @@
- {elseif $field_name eq "vat_number"} - {elseif $field_name eq "dni"} {assign var='dniExist' value=true}
diff --git a/themes/hotel-reservation-theme/order-payment-advanced.tpl b/themes/hotel-reservation-theme/order-payment-advanced.tpl index b19268d62..2341d7e98 100644 --- a/themes/hotel-reservation-theme/order-payment-advanced.tpl +++ b/themes/hotel-reservation-theme/order-payment-advanced.tpl @@ -24,7 +24,6 @@ *} {if !isset($addresses_style)} {$addresses_style.company = 'address_company'} - {$addresses_style.vat_number = 'address_company'} {$addresses_style.firstname = 'address_name'} {$addresses_style.lastname = 'address_name'} {$addresses_style.address1 = 'address_address1'} diff --git a/themes/hotel-reservation-theme/shopping-cart.tpl b/themes/hotel-reservation-theme/shopping-cart.tpl index ff67712af..3629d795c 100644 --- a/themes/hotel-reservation-theme/shopping-cart.tpl +++ b/themes/hotel-reservation-theme/shopping-cart.tpl @@ -229,7 +229,6 @@ {* Will be deleted for 1.5 version and more *} {if !isset($addresses_style)} {$addresses_style.company = 'address_company'} - {$addresses_style.vat_number = 'address_company'} {$addresses_style.firstname = 'address_name'} {$addresses_style.lastname = 'address_name'} {$addresses_style.address1 = 'address_address1'}