to get a personalized navigation.
to get a personalized navigation.
Hi,
I am trying to create an inventory issue, and since there are some items with lot/serialno I need to provide that as well.
I am trying to post the following data:
{
"issueLines": [
{
"warehouseId": {
"value": "1"
},
"tranType": {
"value": "Issue"
},
"operation": "Insert",
"inventoryNumber": {
"value": "ZM000736"
},
"locationId": {
"value": "1"
},
"quantity": {
"value": 3.0
},
"reasonCode": {
"value": "2"
},
"description": {
"value": ""
},
"allocations": [
{
"operation": "Insert",
"lineNbr": {
"value": 1
},
"location": {
"value": "1"
},
"lotSerialNumber": {
"value": "SVE98765"
},
"quantity": {
"value": -1.0
}
},
{
"operation": "Insert",
"lineNbr": {
"value": 2
},
"location": {
"value": "1"
},
"lotSerialNumber": {
"value": "SVE98766"
},
"quantity": {
"value": -1.0
}
},
{
"operation": "Insert",
"lineNbr": {
"value": 3
},
"location": {
"value": "1"
},
"lotSerialNumber": {
"value": "SVE98776"
},
"quantity": {
"value": -1.0
}
}
]
}
],
"date": {
"value": "2022-05-20T10:07:16.563"
},
"externalReference": {
"value": "70"
},
"description": {
"value": ""
}
}
The response says that I did not provide either location and/or lot/serial number:
{
"message": "VismaId: 091b387b-aff6-49c5-b8bb-f756385ead1c. Error creating inventory issue. Error: Inserting 'Inventory transaction' record raised at least one error. Please review the errors.\r\nOne or more lines contain unassigned location and/or lot/serial number.\r\n"
}
Though when I check the data that I send I think I provide both location and lot/serial nunber for every allocation line.
Can anyone see what I am doing wrong?
Best regards
Ronny Videkull
Solved! Go to Solution.
Hi,
Could it be that you are providing negative numbers in the allocation?
We were able to add it when setting the line number quantity to 0 and the 1 for each line as such:
I tried that now, and I get the same error as before.
However, if I also modify the quantity directly on the issueLine and set it to 0 it works.
I.e. when the quantity of each allocation is positive and the quantity of the issueLine is 0 it works.
And when the quantity of each allocation is positive and the quantity of the issueLine is the sum om the allocations quantity it does not work.
Is that expected?
Edit: Spelling
HI,
Yes that is what we noticed as well, you'll see it in the Json I posted.
We will still need to check with the development team if this is the intended behavior.
Copyright © 2022 Visma.com. All rights reserved.