to get a personalized navigation.
to get a personalized navigation.
When trying to update a receipt that has been connected to a purchase order, i get the following error:
"One or more lines contain unassigned location and/or lot/serial number"
Sometimes it works, and sometimes it doesn't.
{
lines: [
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.264',
quantity: 65,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 1,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
},
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.265',
quantity: 170,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 2,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
},
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.266',
quantity: 78,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 3,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
},
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.267',
quantity: 41,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 4,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
},
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.268',
quantity: 283.2,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 5,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
},
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.269',
quantity: 106.8,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 6,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
},
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.270',
quantity: 44,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 7,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
},
{
allocations: [
{
operation: 'Insert',
lineNbr: null,
location: null,
lotSerialNumber: '2000.271',
quantity: 26,
uom: null,
expirationDate: null
}
],
operation: 'Update',
lineNbr: 8,
lineType: null,
branchId: null,
branchNumber: null,
inventoryId: null,
warehouseId: null,
locationId: null,
transactionDescription: null,
uom: null,
receiptQty: null,
unitCost: null,
extCost: null,
discountPercent: null,
discountAmount: null,
manualDiscount: null,
discountCodeId: null,
amount: null,
taxCategoryId: null,
accountId: null,
accountDescription: null,
subaccount: null,
actualAccountId: null,
actualSubaccount: null,
projectId: null,
projectTaskId: null,
expirationDate: null,
lotSerialNumber: null,
poOrderType: null,
poOrderNbr: null,
poOrderLineNbr: null,
transferOrderType: null,
transferOrderNbr: null,
transferOrderLineNbr: null,
completePoLine: null
}
],
landedCost: null,
receiptType: null,
receiptNbr: '004044',
hold: false,
date: null,
postPeriod: null,
warehouseId: null,
supplierId: null,
locationId: null,
currency: null,
exchangeRate: null,
createBill: null,
supplierRef: null,
controlQty: null,
controlAmount: null,
branchNumber: null
}
@Gabriella Hennings wrote:
1) Sometimes it works, and sometimes it doesn't.
What do you mean by separating the update and insert allocations? I can't update the purchaseorderline receiptQty at the same time as inserting the allocations?
2) I also sometimes get the error "Error updating purchase receipt. Document with number 000015 could not be found" or "Error releasing purchase receipt Document with number 000016 could not be found" when trying to update or release a receipt even though i can see that the receipt exist in Visma.
1)
First PUT: Insert Allocations
Second PUT: Update if necessary
2) Please check the receipt type (Document Type)
[ PoReceipt, PoReturn, TransferReceipt ] |
In your JSON you're opening Allocations [] array multiple times for each line, you should only have one array and add lines under that. Please see the sample payload below.
I have one allocation array for each line. Where do you see that i have multiple allocation arrays for each line?
And as i stated before, this works like 90% of the times. Sometimes it just wont work the first time, but it does the second.
I will try to remove all the null values to see if that has any impact. Although it's weird that it even works sometimes to update the receipt if those values being null is the problem. I would expect the error to appear every time. Now around 70% of the time it works.
What do you mean by separating the update and insert allocations? I can't update the purchaseorderline receiptQty at the same time as inserting the allocations?
I also sometimes get the error "Error updating purchase receipt. Document with number 000015 could not be found" or "Error releasing purchase receipt Document with number 000016 could not be found" when trying to update or release a receipt even though i can see that the receipt exist in Visma.net.
Sometimes retrying updating and releaseing new receipt to the same purchsaeorder WORKS.
This seems highly unreliable and frankly very difficult to even be able to build reliable integrations to Visma.net.
Copyright © 2022 Visma.com. All rights reserved.