My Products
Help
gordana_jlmwms
CHAMPION *

Insert Journal Transaction gives error

by gordana_jlmwms

Journal Transaction object:

 

{"transactionDate":{"value":"2023-09-25T00:00:00+02:00"},"financialPeriod":{"value":"202309"},"ledger":{"value":"1"},"currencyId":{"value":"SEK"},"description":{"value":"Preliminärbokad levfaktura - 50001 916"},"createVatTransaction":{"value":true},"skipVatAmountValidation":{"value":true},"branch":{"value":"1"},"journalTransactionLines":[{"operation":"insert","accountNumber":{"value":"2440"},"subaccount":[{"segmentId":1,"segmentValue":"0"},{"segmentId":2,"segmentValue":"00000"},{"segmentId":3,"segmentValue":"000"},{"segmentId":4,"segmentValue":"00"},{"segmentId":5,"segmentValue":"000"}],"referenceNumber":{"value":"916"},"transactionDescription":{"value":"Preliminärbokad levfaktura"},"debitAmountInCurrency":{"value":0},"creditAmountInCurrency":{"value":13468},"note":{}},{"operation":"insert","accountNumber":{"value":"2640"},"subaccount":[{"segmentId":1,"segmentValue":"0"},{"segmentId":2,"segmentValue":"00000"},{"segmentId":3,"segmentValue":"000"},{"segmentId":4,"segmentValue":"00"},{"segmentId":5,"segmentValue":"000"}],"referenceNumber":{"value":"916"},"transactionDescription":{"value":"Preliminärbokad levfaktura"},"debitAmountInCurrency":{"value":2693},"creditAmountInCurrency":{"value":0},"note":{}},{"operation":"insert","accountNumber":{"value":"4999"},"subaccount":[{"segmentId":1,"segmentValue":"4"},{"segmentId":2,"segmentValue":"00001"},{"segmentId":3,"segmentValue":"100"},{"segmentId":4,"segmentValue":"00"},{"segmentId":5,"segmentValue":"000"}],"referenceNumber":{"value":"916"},"transactionDescription":{"value":"Preliminärbokad levfaktura"},"debitAmountInCurrency":{"value":10774},"creditAmountInCurrency":{"value":0},"vatCodeId":{"value":"01"},"note":{}}]}

 

gives a error

 

VismaId: 975ebb00-246e-4341-9e15-7188ab326b21. Error creating journal transaction. Error: Inserting 'General ledger batch' record raised at least one error. Please review the errors.
The batch is out of balance. Check the details.

 

if I change vatCodeId to VatId, last line

{"message":"VismaId: 10f25c03-2d64-47fb-a854-2efd48c61900. Error creating journal transaction. Error: TaxID '01' cannot be found in the system."}

but TaxID 01 exists

 

gordana_jlmwms_0-1695649454833.png

 

Is there something wrong with the object?

 

1 REPLY 1
Accepted solution
gordana_jlmwms
CHAMPION *

by gordana_jlmwms

I have found errors. it is VAT rounding, for example 165.50 is rounded to 165 (api) instead of 166.