I have strange problem with VAT in Magento 2.4.3-p1.
After migration from M1 I have empty VAT in checkout process.
I have correct settings in ‘Tax Rules’ and ‘Tax Zones and Rates’.
My products have correct selected ‘Tax class’.
I have all settings in Configuration – Tax same as in old Magento1 instance.
But in checkout I see VAT = 0.00.
How can I debug it most easily and effective and find an error?
2
Answers
I debugged a method getStoreRate from vendormagentomodule-taxModelCalculation.php and find that I lost rate tax for customers group. When I reset it from admin panel and rebuided an index I saw correct VAT value in checkout. That's all
Configuring Value Added Tax (VAT) from Magento 2 backend is a great solution to solve the conflict of the different VAT calculations, namely the store is located in different regions and the type of goods you provide are products, materials, or services.
First, you need to debug the configuration settings:
Configure Product Tax Class
Configure Customer Tax Class
Set Up Tax Zones and Rates
Configure Tax Rules – Stores > Tax > Manage Tax Rules
Enable and configure VAT ID validation
1: Stores > Settings > Configuration.
2: If necessary, set the Store View for the configuration.
3: In the left panel, expand Customers and choose Customer Configuration.
4: Expand the Create New Account Options section.
5: Set Enable Automatic Assignment to Customer Group to Yes and complete the
fields as needed.
Set your VAT ID and location country
Make sure the configuration is done and set up.
country and check the VAT result.
That’s it