Invoice data coming to us via scan services do not always have all the information contained by the original PDF/paper invoice. In such cases, we try to calculate the missing values based on the available data. One extra complication has been that in Sweden and Norway, invoice totals are rounded to the nearest whole currency unit, whereas in other countries the totals are rounded to two decimal places. This has caused discrepancies in our calculations related to “original sum excluding VAT”, and sometimes our Swedish or Norwegian customers have noticed that the original sum excluding VAT does not match the sum shown on the PDF invoice.
The root cause is that we have been calculating the original sum by subtracting the VAT amount from the total sum including VAT. In countries where the sums are rounded to two decimals, this will yield the expected result, but in countries where whole-unit rounding is applied, the subtraction will sometimes cause an “imaginary” number to appear as the total sum excluding VAT. This has now been fixed so that we calculate the original total using subtraction only in countries without whole-unit rounding. In SE and NO, we calculate the from the VAT amount and total including VAT, using our knowledge of VAT rates in those countries. The end result is better most of the time, but it can still cause unexpected results from time to time due to presence of rounding and lack of complete information.