My Products
Help
Jochem Hoogesteijn
CONTRIBUTOR *

Error message when sending journal entry from Klippa to Visma.net: Error creating supplierInvoice

by Jochem Hoogesteijn

In our pre-accountancy tool (Klippa SpendControl) we send a journal entry to Visma.net via your API. However, we encounter the below described error. 

- Used API Endpoint URL: https://integration.visma.net/API/controller/api/v1/supplierInvoice

- Method: POST

- Body: this contains private information of the Klippa user, which I do not share with regards to privacy. Unfortunately, my CTO can not reproduce the error using our own Visma.net environment. If needed, we can share the body in private with a Visma developer (instead of in this open issue).

- Response body: {"message":"VismaId: 72dad68e-185a-4a72-b336-b452a30d3923. Error creating supplierInvoice. Do you want the system to recalculate the amount(s) in the 'Cost' column?"}

 

Can you help us with this? Looking forward to your response.

 

Best regards,
Jochem Hoogesteijn

9 REPLIES 9
Yıldırım
VISMA

by Yıldırım (Updated ‎08-01-2021 14:59 by Yıldırım VISMA )

Hello, 

 

  1. Please create a supplier invoice by using the same values sent via API,  in the UI and send us a print screen.
  2. Apparently "Validate Vat Totals on Entry" is enabled in your financials company. 
    Please disable it if it's not in use. If you'd like to send validation value (should be equal to the document's VAT total), then the following field should be included in the json.

<Supplier Ledger Preferences: ScreenId=AP101000>
validate_Vat.jpg
Endpoint DTO Schemas can be found at  https://integration.visma.net/API-index

 

...
"vatAmount": {
"value": 0
},
...

 

 

3- Check what is the "VAT Calculation Mode" set on the used Supplier's Card.
supplier_card.png

4-Please also control if the desired supplier's General Ledgers Accounts are correctly set. 
Go to the specific supplier in the UI (ScreenId=AP303000) > Go to "General Ledger Accounts" Tab > Make sure (*) Mandatory accounts are filled.
Supplier_GL.png

Thanks.

Jochem Hoogesteijn
CONTRIBUTOR *

We tried setting the vatAmount field, and got the following error: Error creating supplierInvoice. Field VAT Amount is not editable.

 

Also, where can we find the option: Validate Vat Totals on Entry, this way, we can try it in our own environment. 

Best, Jochem

Yıldırım
VISMA

by Yıldırım (Updated ‎08-01-2021 11:34 by Yıldırım VISMA )

@Jochem Hoogesteijn wrote:

Also, where can we find the option: Validate Vat Totals on Entry, this way, we can try it in our own environment. 


<Supplier Ledger Preferences: ScreenId=AP101000>
validate_Vat.jpg

Also make sure that "2021" Financial Periods are generated in the Financials ERP UI.
(ScreenId=GL201000):
embeddedimage1610100672830.png

 

Please review other recommended points as well and create a supplier invoice by using the same values sent via API,  in the UI and send us a print screen (developersupport@visma.com)

Jochem Hoogesteijn
CONTRIBUTOR *

by Jochem Hoogesteijn (Updated ‎08-01-2021 13:48 by Jochem Hoogesteijn )

Dear Yildirim,

 

When we enable Validate Vat Totals on Entry in our own environment, I do not get the error, because we do not send a VAT amount, but a VAT code instead. When we do send a VAT amount, the following error appears: 'The VAT amount must be equal to the VAT total''. But this is a totally different error than expected.

 

We are still wondering why 'Do you want the system to recalculate the amount(s) in the 'Cost' column?' appears, as it does not look like an error the API would return....

Hope you can help us further.

Best, Jochem

Accepted solution
Yıldırım
VISMA

by Yıldırım (Updated ‎08-01-2021 14:53 by Yıldırım VISMA )

Hello, 

 

In order to be able to help you , we need to understand the exact setup of the financials company these transactions are sent through.  

Supplier Invoice POST operation usually returns 'Do you want the system to recalculate the amount(s) in the 'Cost' column?   when used Supplier's >  VAT Calculation Mode set : "NET" instead of  "VAT Settings" and payload is missing Financial / Post Period fields, therefore, we've recommended you to include "postPeriod" and "financialPeriod".
Once these fields added you informed us about different series of the errors, meaning there are another company settings related issues these need to be aligned. 

There are certain configurations should be controlled in the Financials ERP therefore please review previous post for those points and follow the instructions shared in API incidents - Troubleshooting and reporting  

In the first place, please manually create a supplier invoice by using the same values sent via API, in the issue occurred Company UI and send us a print screen.(developersupport@visma.com)

We've also sent you information via the web ticket you've created. We're waiting for your feedback to proceed further.

Thanks.

Jochem Hoogesteijn
CONTRIBUTOR *

by Jochem Hoogesteijn

Done, thx!

 

Yıldırım
VISMA

by Yıldırım (Updated ‎07-01-2021 15:50 by Yıldırım VISMA )

Can you please add the following fields & relevant values and retry the operation ? 

 

 

 

JSON HEADER PART
  { 
...
 "postPeriod": {
        "value": "MMYYYY"  //012021
    },
    "financialPeriod": {
        "value": "YYYYMM" //202101
    },
...
}

 

 

 

 

Jochem Hoogesteijn
CONTRIBUTOR *

Thanks, we made the proposed changed and now get this error:

{"message":"Error creating supplierInvoice. Error: Inserting 'Purchase invoice' record raised at least one error. Please review the errors.\r\nThere is no value for this type of account. It can be set in the Suppliers window.\r\nThe VAT amount must be equal to the VAT total.\r\nOrig. invoice date is different from the invoice date. The Due date, Cash discount date, and Pay date fields are accordant with the Orig. invoice date.\r\n"}

Yıldırım
VISMA

by Yıldırım

Hello, 

please send the json to developersupport@visma.com, we'll check the transaction out. 
Thanks.