error with stock move and reservation with quantity not available
----------------------------------------------------------------- Key: OFBIZ-3178 URL: https://issues.apache.org/jira/browse/OFBIZ-3178 Project: OFBiz Issue Type: Bug Components: product Affects Versions: Release Branch 4.0 Reporter: Albert Mayo 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Albert Mayo updated OFBIZ-3178: ------------------------------- Attachment: StockMoveServices.xml StockMoveServices.patch It looks like there was a calculation problem with the reservedQuantityLeftOver variable. This variable did not consider the Quantity Not Available, and was causing problems when creating reservations and updating inventory items. Also I found an issue where zero quantity reservations would be created. This would occur when quantityLeftToProcess is zero but the code would continue to iterate through reservations. I found this function's logic and its comments to be somewhat confusing, so I may have changed more than what was needed to simply fix the issue. I only made changes to the portion of code that cycles through the reservations. I don't have time to officially contribute a patch, but I have attached my modified and tested StockMoveServices.xml and a SVN patch from my personal branched repository (that started with OFBiz 4.0). Hopefully this will help point whoever tackles this in the right direction. > error with stock move and reservation with quantity not available > ----------------------------------------------------------------- > > Key: OFBIZ-3178 > URL: https://issues.apache.org/jira/browse/OFBIZ-3178 > Project: OFBiz > Issue Type: Bug > Components: product > Affects Versions: Release Branch 4.0 > Reporter: Albert Mayo > Attachments: StockMoveServices.patch, StockMoveServices.xml > > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12775935#action_12775935 ] Albert Mayo edited comment on OFBIZ-3178 at 11/10/09 4:45 PM: -------------------------------------------------------------- It looks like there was a calculation problem with the reservedQuantityLeftOver variable. This variable did not consider the Quantity Not Available, and was causing problems when creating reservations and updating inventory items. Also I found an issue where zero quantity reservations would be created. This would occur when quantityLeftToProcess is zero but the code would continue to iterate through reservations. I found this function's logic and its comments to be somewhat confusing, so I may have changed more than what was needed to simply fix the issue. I only made changes to the portion of code that cycles through the reservations. I don't have time to officially contribute a patch, but I have attached my modified and tested StockMoveServices.xml and a SVN patch from my personal branched repository (that started with OFBiz 4.0). Hopefully this will help whoever tackles this issue. was (Author: amayo): It looks like there was a calculation problem with the reservedQuantityLeftOver variable. This variable did not consider the Quantity Not Available, and was causing problems when creating reservations and updating inventory items. Also I found an issue where zero quantity reservations would be created. This would occur when quantityLeftToProcess is zero but the code would continue to iterate through reservations. I found this function's logic and its comments to be somewhat confusing, so I may have changed more than what was needed to simply fix the issue. I only made changes to the portion of code that cycles through the reservations. I don't have time to officially contribute a patch, but I have attached my modified and tested StockMoveServices.xml and a SVN patch from my personal branched repository (that started with OFBiz 4.0). Hopefully this will help point whoever tackles this in the right direction. > error with stock move and reservation with quantity not available > ----------------------------------------------------------------- > > Key: OFBIZ-3178 > URL: https://issues.apache.org/jira/browse/OFBIZ-3178 > Project: OFBiz > Issue Type: Bug > Components: product > Affects Versions: Release Branch 4.0 > Reporter: Albert Mayo > Attachments: StockMoveServices.patch, StockMoveServices.xml > > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jacques Le Roux updated OFBIZ-3178: ----------------------------------- Issue Type: Sub-task (was: Bug) Parent: OFBIZ-3268 > error with stock move and reservation with quantity not available > ----------------------------------------------------------------- > > Key: OFBIZ-3178 > URL: https://issues.apache.org/jira/browse/OFBIZ-3178 > Project: OFBiz > Issue Type: Sub-task > Components: product > Affects Versions: Release Branch 4.0 > Reporter: Albert Mayo > Attachments: StockMoveServices.patch, StockMoveServices.xml > > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |