It is important to understand how taxes are calculated because rounding can cause a slight discrepancy when comparing to tax when calculated at the subtotal level.
Before, CloudCart rounded taxes at the invoice level by calculating the taxes on the order's subtotal and then rounding the results.
Now, the tax amounts are rounded at the line-item level. In this case, the total tax value is calculated by applying the tax rate to each line in the order, rounding the result, and then adding these subtotals together to arrive at the total value of the order.
Rounding taxes at the line level improves the calculation of different tax rates and makes it easier to calculate taxes for orders that include taxable and non-taxable products. The taxes in CloudCart are rounded to two decimal places for each tax line.
Suppose a customer places an order for 3 different items, each with a price of €6.99, including a 20% VAT tax. The line item tax for each product is €1.398.
Before, the tax of each line item would be added together, and the total would be rounded. In this example, the added total tax would be €4.194, which would round to €4.19.
Now CloudCart rounds tax amounts at the line-item level, which means the tax amount is rounded for every product individually. The line-item tax amount of €1.398 is rounded to €1.40, which is then added together to get the total. In this case, the tax total would be €4.20.