My Products
Help
Anonymous
Not applicable

Endpoint for General ledger transactions with VAT (TX40500S)

by Anonymous

I'm trying to extract data that is similar to what is available in General ledger transactions with VAT (TX40500S).

Here I have tried accessing:
GET /controller/api/v2/journaltransaction
GET/controller/api/v1/GeneralLedgerTransactions

journalTransaction should containn vatCode.id according to the documentation. However when trying it with a few actual clients this field is more or less never returned.


Is there a way to get VAT details without going to many different endpoints? For example:
/controller/api/v1/customerinvoice
/controller/api/v1/customerDebitNote
/controller/api/v1/customerCreditNote
/controller/api/v1/customerCreditWriteOff
/controller/api/v1/customerOverdueCharge
/controller/api/v1/cashsale

16 REPLIES 16

by Magnus Johnsen

Hi,

Currently, that screen is not available via the API, if this is something you need, please make a post in the "Ideas" part of the forum.

This will allow other users to vote for your suggestion as well, which in turn influences the development teams assessment and implementation process.

 

As for the JournalTransaction endpoint, this endpoint will only return VAT codes if VAT transactions have been created for the transaction:

2021-11-24 10_31_33-Journal transactions - Brave.png

If "create VAT transactions" has not been marked, the VAT related fields are not included.

Anonymous
Not applicable

by Anonymous

Accidently replied to my own message:

Ok, thank you!

Just so I understand correctly, the only way to get vatCode.Id for the transactions posted in the GeneralLedger is to go through the respective EndPoints where the transaction was generated from?

by Magnus Johnsen (Updated ā€Ž24-11-2021 15:29 by Magnus Johnsen VISMA )

Hi,

It looks like you can check the "transaction description" field of the journalTransactions.

2021-11-24 15_28_09-Journal transactions - Brave.png

Please try this and let us know if it helps.

If not, you'd need to check the source document by getting the reference number from the journalTransaction. 

Anonymous
Not applicable

by Anonymous (Updated ā€Ž25-11-2021 09:34 ( )

Ok, I've now created a new Idea regarding VatCode!
https://community.visma.com/t5/Ideas-in-Developers-Visma-net/Update-JournalTransactionV2-to-contain-...

However I'm uncertain if this is a bug or feature in the API as the 1 datapoint with "vatCategoryId" that i found didn't match when looking in Visma.Net

 

Having the data available in either GeneralLedgerTransactions or correct data in JournalTransactions could be options. 

Anonymous
Not applicable

by Anonymous

Ok! It seems like "vatCategoryId" gets returned as a Transaction description. However a case where we would struggle to allocate the "vatCategoryId" to the correct line would be where there are multiple rows in the same original document.marcus_johansson_bdo_0-1637765972740.png

 

by Magnus Johnsen

Hi,

If your business need is to assign a VatId per document line on your end, your best bet would be to get the referenceNumber and then get the VatId per line.

The VAT details in the journalTransaction corresponds to the "Vat details" tab on the document, eg. a summary of the amount per VatId.

Anonymous
Not applicable

by Anonymous

For the clients I checked the Journal Transactions vatCode.id doesn't seem to provide us with any information. There was only 1 line that had this data returned and here it seemed to be incorrect.
Here is an example where the endpoint returns vatCode.id = 3 (25%).
However when looking at the Batch or Journal there is no VAT allocated to this document.
So for the clients I've checked I'm uncertain what vatCode.id actually returns:
Not included in picture is a reference to batchNumber "000274"

marcus_johansson_bdo_0-1637837825764.png

marcus_johansson_bdo_1-1637838161265.png


We are most likely going to be able to get the relevant data from the respective endpoints through a referenceNumber:
/controller/api/v1/supplierInvoice
LineNumber in supplierInvoice seems to be LineNumber+1 in journalTransactionLines (maybe not always the case?).

Accounts Payable would probably be a bigger task as it seems that this would be linked to 5-6 different endpoints.

Previously in other API's this data is very central to GeneralLedgerTransactions, would it be possible to include it there if not in Journal?
The report "General ledger transactions with VAT" has the necessary data.

Trying to consolidate a General ledger for auditors without VAT information quickly depreciates it's value.

 

by Magnus Johnsen

Hi,

In the example you sent now, please have a look at the original batch 000273 as well, in this case the reference is pointing to the original batch, and not an invoice.

You can see that this is the case by checking what ledger the batch is for as well as the "originalBatchNumber" field.

Anonymous
Not applicable

by Anonymous

The original batch 000273 contains no VAT posting:

marcus_johansson_bdo_0-1637841453645.png


Also here are both batches in General ledger transactions with VAT:

marcus_johansson_bdo_1-1637841713516.png

 

by Magnus Johnsen

Hi,

Please have a look at the "Charts of accounts"(ScreenId=GL202500), the account 3026 most likely has a VAT code assigned to it, which is why it is included in the API response:

2021-11-25 13_40_42-Chart of accounts - Brave.png

Why it is not visible in the UI is a question that should be raised with the ERP teams, please contact your partner service regarding this. 


As the API is today, creating an Audit report does not seem feasible, please include this business need in the Idea you shared. This will increase the likelihood that your suggestion is handled faster. 

 

Thank you. 

Anonymous
Not applicable

by Anonymous

Hi Magnus, our organization is still trying to figure out a way to retrieve VAT code for all postings to the General Ledger in order to proceed with the integration.
Would it be possible to look at the documentation for VAT in JournalTransactionV2:

marcus_johansson_bdo_0-1642151894993.png

Does this return the anticipated data that it in theory should when your team uses a test client?

Thanks
Marcus

by Magnus Johnsen

The VAT fields in JournalTransaction will only show if you manually create the VAT transactions via the journalTransaction module, and is only available for entries to the "General ledger" workspace.

Since Visma.Net Financials is fairly complex, we would recommend that you have a look at the UI modules while you go through the documentation as well:

2022-01-14 14_24_29-Journal transactions - Brave.png

 

Anonymous
Not applicable

by Anonymous

When mapping endpoints and deciding on what data to be included is this subset of data included by design?
So in JournalTransaction it was decided to only include manual VAT transactions and only for General ledger?

On the clients I had access to this was only included on 1 or 2 transactions in all the history for the clients. As a user of the API I don't see any the use case of having only this subset of data available.
Logically I would assume it would include all VAT Codes no matter what Journal was the source of origin.

by Magnus Johnsen

Hi,

As it is not implemented for now, we recommend that you create a post in the Ideas section of the forum with your suggestion on how you would like to consume this data. 

 

by Magnus Johnsen

Hi,

As it is not implemented for now, we recommend that you create a post in the Ideas section of the forum with your suggestion on how you would like to consume this data. 

 

Anonymous
Not applicable

by Anonymous

I initially thought that we might be able to use that as a indicator what VAT Category is allowed to be posted on the account, but I see from the customer in question thtat they are able to post other TaxId to account 6420 than the one defined in Chart of Account:

marcus_johansson_bdo_0-1637848084064.png

marcus_johansson_bdo_1-1637848125683.png

Why would "VAT category" from Chart of accounts be returned under JournalTransactionLines?
I see that this data is in Account endpoint.


Also it doesn't get returned for other JournalTransactionLines:

marcus_johansson_bdo_2-1637848572135.png

Details about VAT should be by the arrow:

marcus_johansson_bdo_5-1637848779902.png