Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Release Branch 4.0
    • Fix Version/s: None
    • Component/s: product
    • Labels:
      None

      Description

      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.

      1. StockMoveServices.patch
        19 kB
        Albert Mayo
      2. StockMoveServices.xml
        49 kB
        Albert Mayo

        Issue Links

          Activity

          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Resolved Resolved
          1096d 11h 20m 1 Anil K Patel 10/Nov/12 02:45
          Resolved Resolved Closed Closed
          4s 1 Anil K Patel 10/Nov/12 02:45
          Anil K Patel made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Anil K Patel made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Amardeep Singh Jhajj made changes -
          Link This issue relates to OFBIZ-5063 [ OFBIZ-5063 ]
          Gavin made changes -
          Workflow jira [ 12481546 ] OFbiz Workflow [ 12504682 ]
          Jacques Le Roux made changes -
          Parent OFBIZ-3268 [ 12441818 ]
          Issue Type Bug [ 1 ] Sub-task [ 7 ]
          Albert Mayo made changes -
          Field Original Value New Value
          Attachment StockMoveServices.patch [ 12424473 ]
          Attachment StockMoveServices.xml [ 12424474 ]
          Hide
          Albert Mayo added a comment - - edited

          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.

          Show
          Albert Mayo added a comment - - edited 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.
          Albert Mayo created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Albert Mayo
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development