Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-12264

Multiple Facility Inventory reservation does not consider store facility thru date

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Release Branch 18.12, 17.12.03, Trunk, 17.12.04, 17.12.05, 17.12.06, 17.12.07, 18.12.06
    • 18.12.06, 22.01.01
    • ecommerce, product
    • None
    • Linux/Ubuntu 18.04 LTS, Java jdk 8, OFBiz v13.07.03

       

    Description

      The ProductStore is set up to reserve inventory from more than one facility, so the flag oneInventoryFacility is set to N. 
      The we have 8 different facilities configured (each with a specific sequence num from 1 to 8) in the entity ProductStoreFacility.
       
      Due to customer requests I had to disable 6 out of 8 facilities associated with the store, so basically only facilities with (sequence) numbers 1 and 2 are left. To achieve this I set the thruDate on the other six records.
       
      After that, an order came in with a variant product that had only 1 quantity left available in one of the disabled facilities and 0 in both the two facilities left enabled, but despite this the system reserved inventory from the disabled facility: I wouldn't expect that.
       
      The service responsible for the reservation is reserveStoreInventory that in our ofbiz version (13.07.03) is minilang and is implemented in ProductStoreServices.xml: I checked that service and I noticed that when the ProductStore is set to multi facility (oneInventoryFacility to N) and the list of productStoreFacility records are retrieved, they are not filtered by date, and this lead to a "bad" reservation.
      I took a look also at the current revision of ofbiz and the code (groovy script) is basically the same, so the issue is present there also.

       

      ADDITIONAL NOTE:

      The the reservation should not be done for this product, but this part is only the last step of the ecommerce sales order flow.

      I think that with a scenario like the one above, the specific product variant should not even be added to the cart, so in the item page (productdetail) this particular variant should not have been visible/selected by the user.

      But I have to take a better look at this part.

      Attachments

        1. image-2021-06-24-00-35-10-392.png
          59 kB
          Giulio Speri
        2. image-2021-06-24-00-37-21-890.png
          62 kB
          Giulio Speri
        3. image-2021-06-24-00-40-41-737.png
          61 kB
          Giulio Speri
        4. image-2021-06-24-00-41-56-344.png
          71 kB
          Giulio Speri
        5. image-2021-06-24-00-43-33-640.png
          72 kB
          Giulio Speri
        6. image-2021-06-24-00-46-17-924.png
          64 kB
          Giulio Speri
        7. image-2021-06-24-00-49-23-904.png
          66 kB
          Giulio Speri
        8. OFBIZ-12264_13122021_trunk.patch
          4 kB
          Giulio Speri
        9. OFBIZ-12264_v130703.patch
          5 kB
          Giulio Speri
        10. OFBIZ-12264_v17.patch
          4 kB
          Giulio Speri
        11. Screenshot from 2021-11-12 01-58-45.png
          69 kB
          Giulio Speri

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Giulio_MpStyle Giulio Speri
            Giulio_MpStyle Giulio Speri
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment