When adding products to an invoice, the VAT is calculated on the net price * quantity which can lead to rounding issues.
For example, I sell one particular item for £17 including VAT - so this is stored as £14.17 plus VAT at 20%
If I set the quantity to 1, the gross price appears correctly as 17.
Set the quantity to 2, and the gross price is now £34.01
I understand the mathematics, but when selling quantities including VAT, most consumer facing businesses base it on the selling price (ie in this instance £17 each), not on the net + VAT price.