Andrew Keeling Posted February 9, 2021 Share Posted February 9, 2021 Hello, I have successfully created an Invoice from my retail website using the API Calls. However, although the invoice looks 100% correct on the image, the VAT Breakdown does not appear correctly. When I manually EDIT this invoice and "Make No Changes, Just SAVE" - it then corrects the VAT Breakdown. For UK, I see we cannot post the Tax Analysis to force the breakdown and, as I can see, all correct fields are being posted (Note, the invoice image is correct - Just the VAT Breakdown is incorrect). Please see attached images BEFORE (Straight after API creation) and AFTER (Straight after an "EDIT / SAVE, no changes). Appreciate any help or pointers. Thanks Andrew Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 10, 2021 Share Posted February 10, 2021 Hi Andrew, thank you for your question. Do you have the request body you are sending in the sales_invoices POST request please? Alternatively, it may be worth comparing GET responses for the invoice before and after the UI edit. Tools such as JSON diff are ideal for pointing out differences in the values. Thanks Mark Link to comment Share on other sites More sharing options...
Andrew Keeling Posted February 10, 2021 Author Share Posted February 10, 2021 (edited) Hi Mark, Thanks for the reply. Please see the request body attached. For info, I already had compared the before/after responses via GET and the only significant difference I could see was the tax_analysis group which does show the correction as expected.. Based on that, I thought I'd try and pass that tax_analysis directly as part of the body but it responds that it is not allowed for UK instance. Hope this helps, Thanks Andrew TEST_INV.TXT Edited February 10, 2021 by Andrew Keeling Slight Adjustment to attachment Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 10, 2021 Share Posted February 10, 2021 Thanks for the request info Andrew. It looks as if there is a problem with the unit_price_includes_tax attribute and it is seeing the total amount as the net amount. Once the invoice is edited, the net values are re-calculated to show the correct value in the breakdown. If you know the tax amount before you send the request, one option would be for you to set the correct net amount, tax_amount and total_amount for the item line and set the unit_price_includes_tax to false. It's not necessary to set the invoice net, tax and total either as it is calculated from the line items. I'll log the issue with the unit_price_includes_tax calc and will update you as soon as I know the outcome. Regards Mark 1 Link to comment Share on other sites More sharing options...
Andrew Keeling Posted February 10, 2021 Author Share Posted February 10, 2021 Hi Mark, Thanks, I did try as you suggest with the value and attribute set to false. My only problem with that is the application I am populating the data from calculates the VAT in a slightly different way to how SAGE does it in that scenario and I get a different VAT result. So I really need a field on the unit_price_includes_tax calc please. Many thanks Andrew Link to comment Share on other sites More sharing options...
Steel, Mark Posted February 11, 2021 Share Posted February 11, 2021 Hi Andrew I've logged this with our engineering squad with an internal (sage) reference of AC-5814. The issue is only with the UI displaying the VAT breakdown. The Vat amounts that appear on the VAT return are correctly accounted for. I'll be in touch as soon as we have an update for you. Regards Mark 1 Link to comment Share on other sites More sharing options...
Andrew Keeling Posted February 11, 2021 Author Share Posted February 11, 2021 (edited) Thanks Mark Edited February 11, 2021 by Andrew Keeling Typo Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now