My Products
Help
AnttiTaikaIT
CONTRIBUTOR ***

CustomerInvoice: General ledger error: The account is inactive

by AnttiTaikaIT

Hi

 

I'm trying to create a customer invoice, very much like thousands of others. One invoice returns error
"message":"VismaId: a1aa09c4-fbe7-4feb-b902-d13d28f80525. Error creating document. General ledger error: The account is inactive"

 

There are regular accounts 4000 and 3000 present. What could cause an error like this?

 

--Antti 

3 REPLIES 3
Yıldırım
VISMA

by Yıldırım (Updated ‎02-08-2021 15:48 by Yıldırım VISMA )

Hello, 

 

Sounds like one of the accounts on the "Customer" card is inactive. With this kind of errors, the best and quickest way to diagnose the issue is trying to reproduce the same scenario in the ERP Financials UI with the same data that has been used via the API. Therefore, we'd recommend trying the same operation in the UI with the same values hence Financials can visually highlight the errors


Please go to the "Customer" Card in the Financials UI, the one is used in the API transaction, and check its General Ledger Tab > Accounts and their statuses. Please also send us a print screen of that, including your POST JSON. (developersupport@visma.com)

Customer_GL.png

 

Thanks.

AnttiTaikaIT
CONTRIBUTOR ***

by AnttiTaikaIT

Hi!

 

We successfully created the invoice manually, no errors were shown.

 

We checked the accounts, no used account was marked inactive.

 

Here's the json-payload (as python dictionary)

{'currencyId': {'value': 'EUR'},

'customerNumber': {'value': '10540'},

'customerRefNumber': {'value': 'PKI3173/T2309PS'},

'documentDate': {'value': '2021-07-31'},

'documentType': {'value': 'Invoice'},

'externalReference': {'value': '20143691 / 136608'},

'financialPeriod': {'value': '202107'},

'hold': {'value': True},

 

'invoiceLines': [{'accountNumber': {'value': '3000'},

                   'description': {'value': 'FZOHBMU-SD 8x12xSML'},

                   'discountPercent': {'value': '0'},

                   'inventoryNumber': {'value': '10528'},

                   'operation': 'Insert',

                   'quantity': {'value': '2310.00'},

                   'subaccount': [{'segmentId': 1, 'segmentValue': '40'},

                                  {'segmentId': 2, 'segmentValue': '00'}],

                   'unitPriceInCurrency': {'value': '2.1000'},

                   'vatCodeId': {'value': '01'}},

               

  {'accountNumber': {'value': '3000'},

                   'description': {'value': 'K18'},

                   'discountPercent': {'value': '0'},

                   'inventoryNumber': {'value': '10153'},

                   'operation': 'Insert',

                   'quantity': {'value': '1.00'},

                   'subaccount': [{'segmentId': 1, 'segmentValue': '40'},

                                  {'segmentId': 2, 'segmentValue': '00'}],

                   'unitPriceInCurrency': {'value': '255.5000'},

                   'vatCodeId': {'value': '01'}},

             

    {'accountNumber': {'value': '3000'},

                   'description': {'value': 'VMOHBU-TL 10x2x0,5'},

                   'discountPercent': {'value': '0'},

                   'inventoryNumber': {'value': '10001'},

                   'operation': 'Insert',

                   'quantity': {'value': '1519.00'},

                   'subaccount': [{'segmentId': 1, 'segmentValue': '40'},

                                  {'segmentId': 2, 'segmentValue': '00'}],

                   'unitPriceInCurrency': {'value': '0.8900'},

                   'vatCodeId': {'value': '01'}},

             

    {'accountNumber': {'value': '3000'},

                   'description': {'value': 'K9'},

                   'discountPercent': {'value': '0'},

                   'inventoryNumber': {'value': '10147'},

                   'operation': 'Insert',

                   'quantity': {'value': '1.00'},

                   'subaccount': [{'segmentId': 1, 'segmentValue': '40'},

                                  {'segmentId': 2, 'segmentValue': '00'}],

                   'unitPriceInCurrency': {'value': '37.5000'},

                   'vatCodeId': {'value': '01'}},

             

    {'accountNumber': {'value': '3000'},

                   'description': {'value': 'K7'},

                   'discountPercent': {'value': '0'},

                   'inventoryNumber': {'value': '10145'},

                   'operation': 'Insert',

                   'quantity': {'value': '1.00'},

                   'subaccount': [{'segmentId': 1, 'segmentValue': '40'},

                                  {'segmentId': 2, 'segmentValue': '00'}],

                   'unitPriceInCurrency': {'value': '25.4000'},

                   'vatCodeId': {'value': '01'}}],

 

'invoiceText': {'value': 'N Oy / 20143691 / Toim.pv 2021-07-27 '},

 

'note': {'value': '45 pv netto;      Kund nr/Customer no: 100400\n'

                   'TÄMÄ SAATAVA ON SITOVASTI SIIRRETTY OP YRITYSPANKKI '

                   'OYJ:LLE (OP) SEKÄ TOISSIJAISESTI OULUN OSUUSPANKILLE. '

                   'LASKU VOIDAAN PÄTEVÄSTI MAKSAA VAIN OPLLE, TILI IBAN '

                   'FI0950000120002257 BIC OKOYFIHH. SIIRTO ON PERUUTETTAVISSA '

                   'VAIN OPN SUOSTUMUKSELLA. TÄHÄN SAATAVAAN KOHDISTUVISTA '

                   'HUOMAUTUKSISTA ON VÄLITTÖMÄSTI ILMOITETTAVA OPLLE, PUH. '

                   '010 252 5850, FAX 010 252 8600. LASKUSAATAVAT@OP.FI'},

'project': {'value': 'X'},

'sendToAutoInvoice': {'value': 'True'}}

 

--Antti

Hi,

Could you please send a screenshot of the customer card as per Yildirim's post and we'll have a look at it.

You can send it to developersupport@visma.com.

Thank you!