New VAT handling implemented

An ecommerce software that wants to be internationally accepted has to fit the requirements of many tax systems. In Germany we have a VAT rate for food and a VAT rate for non food (due to some lobby work and political corruption it is far more complicated). The VAT is country wide and so it´s calculation is straightforward. Business customers with a special tax code do not pay VAT. For them prices without VAT are important as they shop.

In comparison with Germany the VAT in the USA is very difficult to calculate, because it depends on the ZIP area a customers lives in. Furthermore, the tax rate of a ZIP area might change daily. For that reason a web service that delivers the VAT for a ZIP area is required.

For our current projects we have to fit the needs of germans and other europeans. For that reason we did some changes lately. A product has two different attributes for prices: PriceGross and PriceNet. This way a shop owner can offer nice prices for both price types. If you only substract the tax from a price it will look like "8.53" which is an ugly figure.

For each customer class (admin, b2b, b2c, anonymous) a price type gross or net can be configured in the backend. The method getTax() from the class SilvercartTax can be decorated. This would be the right place to implement a webservice that returns the US tax rate. We did not implement that ourselves yet, because we do not have US customers but this is subject to change.