When posting a voucher I get “Kunde mangler”, “Leverandør mangler”, or “Ansatt mangler”, why?
In these cases your request most likely contains a posting toward an account that is defined as a ledger (ledgerType is not GENERAL) and these require the posting to also contain the ID of an object that matches their ledgerType (customer, supplier, employee).
For example:
"number": 1500,
"name": "Kundefordringer",
"description": "",
"type": "ASSETS",
"legalVatTypes": [
{
"id": 0,
"url": "tripletex.no/v2/ledger/vatType/0"
}
],
"ledgerType": "CUSTOMER",
"vatType": {
"id": 0,
"url": "tripletex.no/v2/ledger/vatType/0"
},
"vatLocked": true,
"currency": null,
The requests I want to run below contains an account that is defined as a customer ledger, thus I also need to refer to the customer that we want the posting to belong to.
{
"row":3,
"date":"2021-11-01",
"amountGross":-500,
"amountGrossCurrency":-500,
"account":{
"id":53120823
},
"customer":{
"id":17788588
}
}