VAT Rounding - Sales Invoices pushed via API


Just in the process of migrating from Non-Vat Reg to Vat registered and having a few teething problems.

We are using the Quickfile API to push invoices from our website to QF.

Noticed a deferential in VAT between our website and QF. It appears on face value, that QF rounds to 2 decimal places, whereas our website rounds to 3 decimal places.

All figures in our website are Gross. Tested the above on a friend’s version of Sage 50, and if you raise a simple sales invoice in Sage, using the ‘Calculate Net’ function it also appears to round the VAT to 3 decimal places.

The example given is a Gross figure of £30.17, whereby the VAT is £5.028. Sage and our website round to £5.03 whereas QF round down to £5.02

Can you offer any guidance?

Many thanks Andy & Tom


Thank you for sharing this - I will mention to my colleague to see if there is anything that can be done

Thanks Beth, look forward to your response.


Ok, the feedback I have had is that QuickFile does only round to 2dp there is nothing that can be changed with this, but you should be able to specify the exact VAT amount in the call. - The Tax1 has an optional field for Tax amount

Hope this helps

Hi Beth, we have looked at the API and we still believe there is a problem at your end, please allow me to explain. The API only allows us to push across the Net Value and VAT Value on a line by line basis.

I have a real-world working example where we have a conflict (discrepancy) between the actual VAT and how QF is calculating/totalling the VAT. (As an aside all our figures in our website are currently gross, however as per the API we send the line figures across as Net. (See Below)

INVOICE:00001 (As per Website Invoice)

Line 1 (Pack of Screws) = £25.22 (Gross) - £4.20 (Vat) = £21.02 (Net)
Line 2 (Postage) = £4.95 (Gross) – £0.82 (VAT) = £4.13 (Net)
Invoice VAT Total = £5.03
Invoice Total Gross = £30.17

INVOICE:00001 (As per Quickfile Invoice)

Line 1 (Pack of Screws) = £21.02 (Net)
Line 2 (Postage) = £4.13 (Net)
Invoice VAT Total = £5.02
Invoice Total Gross = £30.17

INVOICE: 00001 (As per Calculator)

Line 1 (Pack of Screws) = £25.22 (Gross) / 6 = £4.2033333 (£4.20 ) VAT
Line 2 (Postage) = £4.95 (Gross) / 6 = £0.825 (£0.83) VAT
Invoice VAT Total = £5.03
Invoice Total Gross = £30.17

Is there any way we can remedy this at your end with your development team, as it seems other accounts packages (sage) and websites just like ours will round up, true the rules of basic maths rather than round down. It seems only QF that rounds down creating a discrepancy between the correct VAT total, which has implications for the VAT return.

Is there a technical solution please?

Many thanks in advance for your help and support with this one. Kind Regards Andy & Tom


I will pass this on for you, and hopefully get an answer to you asap.


Per those figures it’s your website that is, if not wrong, at least misleading. It looks like the website invoice is displaying the individual line VAT values as 2 decimal places but calculating the total to at least 3dp. And with the values in this specific case the total is rounding the opposite way to the lines. QuickFile calculates the VAT to 2dp at the line level and then sums those values, which is where the discrepancy arises.

Both approaches are equally valid according to §17.5.1 of the HMRC vat guide though if you’re rounding the line vat to a tenth of a penny it’s a bit odd not to display it to the same granularity.

If you’re not sending the QuickFile invoice document to your customers then the simplest fix would be just to make the invoice in QuickFile a single line with the totals from the web system.

Hi Ian,

Thanks for the response, please can I clarify, by way of single line, are you suggesting just pushing the total, net, vat and gross figure for the whole invoice?

Many Thanks


Yes, as long as you’re happy to record the whole lot under one nominal code (typically general sales).

If you ever got inspected by the VAT man then your web invoicing system is the master record. As long as the totals are transferred accurately you’d be going to the web system anyway to drill down to the details.

Hi Ian, thanks for the response, once again!

Unfortunately, we can’t do that as our accounting and processes are pretty granular as we sell old vintage stock alongside new stock and thus we need specific nominal codes for different stock groups & services including postage.

If anything we are getting more granular with the way we report in the business, especially as sales increase rather than the other way around and as we don’t have fancy stock management systems, our accounts package is perfect for helping value stock at the end of the year, using granular nominal codes for old vintage stock compared to that of fast selling new stock.

Mmmm OK, I will have a chat with our developer Tom and take a view, in the meantime if you have any other thoughts, then please feel free to share. I think one of our problems, having read the HMRC documentation is we are calculating the VAT from the Gross figures, which isn’t helping and then there is the consideration surrounding the decimal places that need addressing.

Once again thanks for your time.

This topic was automatically closed after 7 days. New replies are no longer allowed.