My Products
Help
kashyap
PARTNER

Salesorder V2 not supporting negative quantity

by kashyap

In V1 version we have field salesOrderOperation in which we pass Issue for positive quanity and Receipt for negative quantity.

How we can add negative stock in V2 version API? Because salesOrderOperation field is not available.

3 REPLIES 3
Marten Voort
VISMA

by Marten Voort

Hi! Both V2 and V3 support salesOrderOperation, do you get an error message or is the field just not taken into account?

2024-08-14 09_47_53-Visma.net Integrations Documentation.png

kashyap
PARTNER

by kashyap

Getting below error while generating order.

VismaId: 3bb11d46-2c47-46e1-a3e6-5acca64e70b8. Error creating salesOrder. Error: Dynamic of SalesSubID do not exist.

{"orderType":{"value":"IN"},"customer":{"value":"10335"},"orderNumber":{"value":"1153"},"customerRefNo":{"value":"ddd"},"description":{"value":"sa"},"note":{"value":"191141-2-1153-1060-100389"},"date":{"value":"2024-08-27T16:01:26"},"hold":{"value":false},"branchNumber":{"value":"1    "},"soBillingAddress":{"value":{"addressLine1":{"value":"tors gate 811"},"postalCode":{"value":"4632"},"city":{"value":"KRISTIANSAND S"},"overrideAddress":{"value":true}}},"lines":[{"operation":"Insert","inventoryNumber":{"value":"20191108000133"},"description":{"value":"08 product not exist and create"},"quantity":{"value":10},"unitPrice":{"value":"80.00"},"accountNumber":{"value":"3000"},"vatCodeId":{"value":"3"},"warehouse":{"value":"30"},"subaccount":[{"segmentId":1,"segmentValue":"2"},{"segmentId":2,"segmentValue":"0"},{"segmentId":3,"segmentValue":""}]},{"operation":"Insert","inventoryNumber":{"value":"202303240001"},"description":{"value":"24SO Price Test"},"salesOrderOperation":{"value":"Receipt"},"quantity":{"value":5},"unitPrice":{"value":"80.00"},"accountNumber":{"value":"3000"},"vatCodeId":{"value":"3"},"warehouse":{"value":"30"},"subaccount":[{"segmentId":1,"segmentValue":"0"},{"segmentId":2,"segmentValue":"0"},{"segmentId":3,"segmentValue":"A1000"}]}]}

 

Marten Voort
VISMA

by Marten Voort

Ok, then one of your segmentvalues your are posting does not exist in the company, could you check that?