VAT ID if salution is not "company"

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
abhaya
Posts: 1
Joined: 06 Jan 2019, 13:39

VAT ID if salution is not "company"

Post by abhaya » 06 Jan 2019, 13:41

I am wondering why this code is in aimeos.js ?
It makes no sense, since company can be sole trader and use only name and surname in EU.

Code: Select all

/* Initial state: Hide VAT ID if salution is not "company" */
		$(".checkout-standard-address .form-list .salutation select").each(function(idx, elem) {
			if($(elem).val() !== "company") {
				$(this).parents(".form-list").find(".company,.vatid").hide();
			}
		});

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: VAT ID if salution is not "company"

Post by aimeos » 07 Jan 2019, 12:27

Usually, only companies have VAT IDs and even single persons need a business to get a VAT ID. Thus, it's hidden if the salutation is for a person to keep the address form small. You can overwrite the JS easily if you have different requirements.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply