VAT calculation formula.
I was playing recently with VAT tax calculations, and am missing something. Say, if we have VAT tax in our country 21%. Registered new VAT tax with 0.21 value. After this I register new product, say for price 18.00EUR and assign registered VAT 21% to the price.
The result given by Drupal Commerce is 21.53EUR, which is not what expected. 21% of 18.00EUR is 3.78EUR, and expected total amount (e.g. VAT included) would be 21.78EUR. Or the other way, if I define price for an item, than price should include 21% VAT. The last is ok, as due to tests, input amount is NET, and taxes are applied on top.
What am I missing? I was trying to figure out tax application formula, but could not find place in UI. Is this done within code?
P.S. I've chosen "Round the half up" for VAT tax type, thus expecting, that if the figure would be 3.775, it would give the result of 3.78. Is this correct?