HOME / COMMUNITY Switch to knowledge base

API Purchase invoices and EC VAT


#1

When adding a purchase invoice via the API the VAT is incorrect. It seems to be getting added twice and then only deducted once. If I click Modify and then Save it puts itself right.

How the invoice looks after creation:
Screenshot%20from%202018-04-06%2012-55-59
How the invoice looks immediately after clicking Modify -> Save
Screenshot%20from%202018-04-06%2012-58-39

The second screenshot is the correct values.


#2

Hello @Nurg

We’ll certainly look into this. Are you able to provide me with a few API details please?

Are you using the XML or JSON endpoint?
Do you have any sample code that you could share with us please?


#3

Hi, JSON.

{
    "PurchaseData": {
        "SupplierID": 1311017,
        "ReceiptDate": "2018-03-29",
        "TermDays": "30",
        "Currency": "GBP",
        "InvoiceDescription": "[P1016] 12 products.",
        "ecVatExempt": true,
        "SupplierReference": "17978",
        "InvoiceLines": [
            {
                "ItemLine": {
                    "ItemNominalCode": "5000",
                    "ItemDescription": "12 items including: 12xFootwear[F]",
                    "SubTotal": 167.4,
                    "VatRate": "20",
                    "VatTotal": "33.48"
                }
            }
        ]
    }
}

#4

Thanks @Nurg

I’ve managed to replicate this and have logged it with our team to investigate.


#5

@Nurg

We’ve released an update which should resolve this issue. Would you mind giving it another go and confirming please?


#6

Hi, tested and appears to be working as expected! Many thanks.


#7

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