Hi Suraj, ticket created: OFBIZ-12264. I'll soon start working on a patch.
Regards, Giulio Il giorno mer 23 giu 2021 alle ore 09:20 Giulio Speri - MpStyle Srl < giulio.sp...@mpstyle.it> ha scritto: > HI Suraj, > > thanks. I will proceed with the Jira ticket. > > Giulio > > Il giorno mer 23 giu 2021 alle ore 06:24 Suraj Khurana < > suraj.khur...@hotwax.co> ha scritto: > >> Hello Giulio, >> >> Thanks for pointing that out. A Jira perfectly fits here. >> >> -- >> Best Regards, >> Suraj Khurana >> Senior Technical Consultant >> >> >> On Wed, Jun 23, 2021 at 5:32 AM Giulio Speri - MpStyle Srl < >> giulio.sp...@mpstyle.it> wrote: >> >> > Hello everyone, >> > >> > I hope you are all doing well. >> > I write because today I faced an unexpected behaviour in one of our >> > ecommerce applications, during creation of an order and related >> inventory >> > reservation. >> > >> > 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. >> > >> > Is this a real issue/bug or this behaviour was intended to act this way? >> > >> > If this is an issue I can open a Jira Ticket, add more details and start >> > working on a patch for both versions. >> > >> > What do you think about it? >> > >> > Thank you in advance for your attention. >> > >> > Best regards, >> > Giulio >> > >> > >> > >> > >> > -- >> > Giulio Speri >> > >> > >> > *Mp Styl**e Srl* >> > via Antonio Meucci, 37 >> > 41019 Limidi di Soliera (MO) >> > T 059/684916 >> > M 334/3779851 >> > >> > www.mpstyle.it >> > >> > > > -- > Giulio Speri > > > *Mp Styl**e Srl* > via Antonio Meucci, 37 > 41019 Limidi di Soliera (MO) > T 059/684916 > M 334/3779851 > > www.mpstyle.it > > > -- Giulio Speri *Mp Styl**e Srl* via Antonio Meucci, 37 41019 Limidi di Soliera (MO) T 059/684916 M 334/3779851 www.mpstyle.it