My Products
Help
RRTT
CHAMPION ***

Cost information (Unit cost etc.) not applied for non-stock items to sales order lines

by RRTT

Cost information (Unit cost etc.) not applied for non-stock items to sales order lines when order is posted via API endpoint https://salesorder.visma.net/api/v3/SalesOrders

 

Via UI there is no problem with cost information of non-stock items.

 

With stock items there is no problem

 

In the screenshot first row is from API and second row is manually inputted. Unit cost with Red highlight

RRTT_0-1712252964917.png

 

And here is the JSON message:

{"type":"OL","status":"Hold","date":"2024-04-03T11:42:23.0000","requestOn":"2024-04-09T00:00:00.0000","description":"LESELL","customer":{"id":"05148","refNo":"22353","order":"LESELL"},"billing":{"contact":{"name":"OMEGA-KODIT OY","attention":"Tommi Hietala","email":"tommi.hietala@omegakeittiot.fi","phone1":"040-5390554"},"address":{"line1":"HAAPAKOSKENTIE 85","postalCode":"86600","city":"HAAPAVESI","countryId":"FI"}},"shipping":{"contact":{"name":"OMEGA-KODIT OY","attention":"Tommi Hietala","email":"tommi.hietala@omegakeittiot.fi"},"address":{"line1":"HAAPAKOSKENTIE 85","postalCode":"86600","city":"HAAPAVESI","countryId":"FI"}},"orderLines":[{"inventoryId":"OM05NP","quantity":3}]}

 

And screenshot of the non-stock item:

RRTT_1-1712253221775.png

RRTT_2-1712253288959.png

 

 

 

3 REPLIES 3
Marten Voort
VISMA

by Marten Voort

Hi, 

 

I see from your screenshots it is a non-stock kit item. So the costprice will come from sub items, which will be calculated when releasing the salesinvoice. Hence, normal behavior for the non-stock kit item on entry would be to show  a costprice of 0, unless you enable the setting Kit cost based on components Sales order preferences. If you enable this you directly see the total cost of all components.

 

The reason why you see a costprice when entered in UI is probably because there has been a purchase or receipt transaction with this price earlier, can this be the case?

 

RRTT
CHAMPION ***

by RRTT

Hi,

 

Thesa are (and were) the settings:

RRTT_0-1712579459561.png

 

So I think there is something in the API to be corrected.

Marten Voort
VISMA

by Marten Voort

Thanks for the information! I have tested this with the same settings and your supplied script. I was not able to reproduce this behaviour, in my test both api and UI provide the same costprice based on the components. Further investigation is needed. I advice you to contact country specific support, because this seems to be specific for your situation. For more information see https://community.visma.com/t5/Forum-in-Developers-Visma-net/Update-on-Visma-net-ERP-API-Support-cha...