[ 
https://issues.apache.org/jira/browse/OFBIZ-12264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17368521#comment-17368521
 ] 

Giulio Speri commented on OFBIZ-12264:
--------------------------------------

Here I attach configuration screenshots and some other details.

1) ProductStoreFacility set up: facilities 10000 and 10010 are up, while all 
the others have been disabled with the thruDate

!image-2021-06-24-00-35-10-392.png|width=780,height=166!

 

2) Inventory situation for a sample product variant: no inventory available for 
the two facilities still enabled

!image-2021-06-24-00-49-23-904.png|width=806,height=382!

 

3) reserveStoreInventory log prints: it loops all the facilities and the 
facility selected for the reservation is 10020, that should be disabled.

!image-2021-06-24-00-46-17-924.png|width=834,height=259!

 

4) Order Summary screen: the order item is reserved in the facility 10020.

!image-2021-06-24-00-43-33-640.png|width=800,height=331!

 

 

> Multiple Facility Inventory reservation does not consider store facility thru 
> date
> ----------------------------------------------------------------------------------
>
>                 Key: OFBIZ-12264
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-12264
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ecommerce, product
>    Affects Versions: 17.12.03, 17.12.04, 17.12.05, 17.12.06, 17.12.07
>         Environment: Linux/Ubuntu 18.04 LTS, Java jdk 8, OFBiz v13.07.03
>  
>            Reporter: Giulio Speri
>            Assignee: Giulio Speri
>            Priority: Major
>         Attachments: image-2021-06-24-00-35-10-392.png, 
> image-2021-06-24-00-37-21-890.png, image-2021-06-24-00-40-41-737.png, 
> image-2021-06-24-00-41-56-344.png, image-2021-06-24-00-43-33-640.png, 
> image-2021-06-24-00-46-17-924.png, image-2021-06-24-00-49-23-904.png
>
>
> 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.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to