|
I got an error when doing a stock move on a reservation that had Quantity Not Available. A reservation with quantity was left in the original inventory item, but the Inventory Item had no Quantity on Hand. I am using OFBiz 4.0, but I did a diff of StockMoveServices.xml to the current trunk version and it looks like a lot of the logic is the same. The specifics of the test are below:
- Inventory Item (IIBulk) has a Quantity On Hand of 1 and Available to Promise of -3
- Inventory Item Reservation in IIBulk had a Quantity of 4 and Quantity Not Available of 3
- I executed a Stock Move of Quantity 1 from IIBulk to a primary location.
- A new Inventory Item was created (IIPrimary) with a Quantity On Hand of 1 and Available to Promise of -3
- A reservation was applied to IIPrimary with a Quantity of 4 and Quantity Not Available of 3
- The reservation of IIBulk was updated to have a Quantity of 1 and Quantity Not Available of 0
- IIBulk was update to have a Quantity On Hand of 0 and Available to Promise of 0
Everything was done right, except the reservation of IIBulk should have been deleted instead of left with a Quantity of 1.
I am testing a fix. I think variable "reservedQuantityLeftOver" is causing the IIBulk reservation to be left with 1 quantity. I will update when I find out more.
|