Question

\Magento\Customer\Api\Data\CustomerInterface has method getTaxvat() and \Magento\Customer\Api\Data\AddressInterface has method getVatId(). Do they store the same data? What is the difference?

Was it helpful?

Solution

They do not store the same data.

Customer address has a VAT ID field that is stored to the vat_id field in customer_address_entity table.

Customer entity on the other hand has a different Tax/Vat field that is used for example when customer is registering and he is put to certain customer group. This is stored in the taxvat field in customer_entity table.

OTHER TIPS

The VAT ID is a proof that the company is registered for VAT and identifies the company for VAT related transactions, usually, it’s in the form GB 12345678, where GB is the country 2 letter ISO code. You can read more about this here.

The TAX ID identifies the company to the inland revenue, which is separate from VAT related transactions.

Even if in some countries they are practically the same numbers, keep in mind that they serve different purposes.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top