My Products
Help

Hur hittar man momssatsen på en fakturarad

by Thomas Adrian - Consili

Hej, 

Jag hämtar kundfakturor via VN API:et /customerinvoice

Ofta har jag kundfakturor med olika momskategorier på samma faktura

 

Ett exempel:

Rad 1 har momskategori 1 

Rad 2 har momskategori 4

 

Tittar man i fliken Tax Details på fakturan så finns då bara momskategori 1 (vilket iof är lite konstigt)

 

I dagsläget använder jag då bara kategori 1 för att veta vilken moms som gäller för hela fakturan eftersom momsatsen som sagt finns tillgänglig under tax details. Men eftersom det även finns en rad med kategori 4 på vissa fakturor så måste jag även få fram den momsatsen

 

Så jag behöver nu istället hitta rätt momssats för varje rad på fakturan via API:et och undrar hur jag ska gå till väga.

 

Kollar jag i kategori 4 så kan den ha många taxid, och varje taxid har sin egen momsats. 

 

Så min fråga är hur jag via API:et tar redan på vilken momssats en rad på fakturan har.

 

 

Tack på förhand

 Thomas

 

 

 

12 REPLIES 12

by Magnus Johnsen (Updated ‎11-04-2022 12:33 by Magnus Johnsen VISMA )

Hi,

My mistake, you need to:

1. Check the customers Vat Zone

- Get /controller/api/v1/customer/{customerNumber}

2. Get the Vat zones applicable Vat Id's

-Get /controller/api/v1/vatZone/{vatZoneId}

3. Get the invoice lines Vat categories applicable Vat Id's

-Get /controller/api/v1/vatCategory/{taxCategoryId}

4. The Vat Id needs to be a value found in both lists.

- Get /controller/api/v1/vat/{vatId}

For more information on how Financials handles handles Vat we recommend that you check with the ERP support. 

Hej och tack, 

har lite svårt att förstå vad du menar, kan du ge ett exempel

 

i mitt fall är kundens vatzone = 01 och fakturaradens momskategori = 04

Hi,

The Vat ID(and the Vat rate) can be the same for several Vat categories.

If you look up the customers Vat Zone(ScreenId=TX206000) in this case 01:

2022-04-11 12_47_28-VAT zones - Brave.png

And then the invoiceLines / inventoryItems Vat category(ScreenId=TX2055PL) in this case 3:

2022-04-11 12_44_56-VAT categories - Brave.png

The Vat Id applied will be in both of those lists(ScreenId=TX205000) in this case 3:

2022-04-11 12_49_27-VAT - Brave.png

The Vat rate can be seen under Vat Id -> Vat schedule:

2022-04-11 12_55_37-VAT - Brave.png

 

Example of how the invoice has it applied in the UI:

2022-04-11 12_46_38-Sales invoices - Brave.png

 

 

Support in this part of the forum is in English as this is an international forum.

If you need more help with how to determine correct Vat settings or information on how to find it, we recommend that you speak to an ERP consultant or write in the ERP forum for your market:
Contacting Visma Partner Service / Visma.net ERP Support

Magnus, 

I still don't understand where I get the vatid from. 

 

The vatzone 01 have an id of 01,

can I map the vatzone id to the vat category - vatcategorylines vatid?

 

 

ThomasAdrianConsili_1-1649679334498.png

 

 

 

 

Hi,

Yes that should give you the correct VatId "01" since it is in both lists. 

except that there is no field called vatid in vatzone

Hi,

We can confirm this is not currently included.

You'd have to determine if it's domestic or international by the description of the zone if you try to determine it via the API.

Generally we recommend handling VAT automatically in the ERP when using the API.

If you need the functionality of seeing the Vat Id's under the VatZone endpoint, we recommend that you make a post in the Ideas part of the forum.

Thank you. 

Not sure what you mean by handling VAT automatically in the ERP.

 

I am exporting Invoices and need to know which Vat rate each invoice line have.

my solution to this as suggested earlier is to use the vatcategory on each invoice line and do a lookup in the VatCatgory endpoint to find the correct vatrate

 

Please confirm if this is the correct way to get the vat rate for an invoice row

 

#1. get the vat category on Invoice line : example 04

#2 get the vat zone from the customer : example 01

#3 get the vat rate from the VatCatgory endpoint using the kategory (04) and id (01)

 

 

 thanks

Thomas

Accepted solution
Magnus Johnsen
VISMA

Hi,

I've misunderstood you, in this case the vat details should give you the rate for all lines on the invoice.

If there are different rates, you would get multiple lines.

To double check this, you can simply look up the VatID in the Vat details of the invoice, and check if the category on the line is specified under categories in the response.

 

 

In my case the vat rate was the same even if there was different vat categories so I only saw one vat category in tax details and assumed one was missing.

 

trying to set a different vat category with a different rate on a line do show another category in the tax details.

 

thanks, case closed!

 

 

 

 

 

by Magnus Johnsen

Hi,

You should be able to find the same information in the UI as via the API:
2022-04-11 07_52_15-Visma.net Integrations Documentation - Brave.png

Simply check the VatId on the line and get it via /controller/api/v1/vat/{vatId}

If you want to know how the VAT is applied in Financials, you can read some more in this article:
TaxID '01' cannot be found in the system

not sure I follow, there is no vatid on an invoice line?