I am creating invoices via the API which typically have a number of line items. Xero occasionally calculates the total with 1p different to what I am expecting.
What makes this really strange is if I open up the invoice in Xero and click edit... Xero changes it's mind and calculates the total correctly. The problem seems to occur when the line item has a discount. I have a line item with unit price £2,120.44 with a 10% discount. In the created invoice Xero calculates the amount as £1,908.39 which is rounding down from 1908.396. If I click edit the amount changes to £1,908.40 which is rounding up as expected.
This seems to be a bug where it's behaving inconsistently :-(