There is an issue with specific identification valuation method when the lot number is linked to specific cost id and the average cost of the layer within a lot changes and a return occurs that would drive the quantity to zero but tries to remove a greater cost than what exists in the cost layer.
Version: SL 2011 (Version 8.00.20321.00 (8.0.0.0))
The scenario:
An inventory item is setup that has a valuation method of specific identification and is lot tracked and the specific id is linked to the lot number. Then two PO’s are created for the item with a quantity of 10 each but the unit cost of one is $10 and the other is $20. Then both PO’s are received into the same lot number. At this point the average cost of the item is $15 for that lot/specific id cost layer. Now 10 items are issued so SL will remove them at $15 each (the average cost in that layer). Now a return for 10 is done in purchasing for the second PO (the one with a $20 unit cost). This batch suspends with an error message of “Programming Bulletproof Error 10262: Invalid cursor value passed to sinsert1(). Please make sure cursor value is greater than 0. Also verify that this cursor has been passed to sql()”. This batch cannot be released then.
Here are a set of transactions that would make this occur:
Type Qty Unit Cost Cost Lot
PO1 10 $10 $100 L3
PO2 10 $20 $200 L3
RC1 10 $10 $100 L3
RC2 10 $20 $200 L3 (yes, we do want the same lot*)
Tot 20 $15 $300 L3 (Avg cost $15)
Issue 10 $15 $150 L3
Tot 10 $15 $150 L3 (left in Inventory)
Return 10 $20 $200 L3 (return RC2) – this batch suspends
Tot 0 -$50 this would be the affect if that batch did release
*For the receipt RC2 the lot could very well be the same but the price of the item has changed. This is because it is the same material (the same metal alloy in this case) but the costs have changed because the market price of metal has increased.
Work around is to go and do a cost only adjustment against the item for the missing amount (in this case $50) then the batch releases fine. But you should not have to do this manual adjustment. It should be done automatically by SL and it does do it for a straight average cost item; it creates an adjustment batch automatically and the batch will release just fine.
*This post is locked for comments