[
https://issues.apache.org/jira/browse/OFBIZ-12455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17516490#comment-17516490
]
ASF subversion and git services commented on OFBIZ-12455:
---------------------------------------------------------
Commit ae37f446d7054c9b2e513a3af36752b802a03af5 in ofbiz-framework's branch
refs/heads/release22.01 from Giulio Speri
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=ae37f44 ]
Fixed: multiple facility inventory reservation issue (OFBIZ-12264)
The ProductStore is set up to reserve inventory from more than one
facility, so the flag oneInventoryFacility is set to N.
Flags requireInventory and reserveInventory are both to Y.
Flag allocateInventory is N.
A product can be anyway reserved in a ProductStoreFacility with its
thru date set and past, so is disabled, and if is not present enough
inventory quantity on other facilities.
Added filtering by date on multiple facility code in
reserveStoreInventoryMethod() and on isStoreInventoryAvailable().
This is the first part of the problem resolution; the second part is
accomplished by path to OFBIZ-12455 Jira.
Thanks: Jacques Le Roux and Pierre SMith for Jira feedbacks, Nicola
Mazzoni for helping in bug analaysis and Jacopo Cappellato for path
review.
> Product inventory reservation places orders if quantityNotReserved !=0 and
> requireInventory=Y
> ---------------------------------------------------------------------------------------------
>
> Key: OFBIZ-12455
> URL: https://issues.apache.org/jira/browse/OFBIZ-12455
> Project: OFBiz
> Issue Type: Bug
> Components: ecommerce, order
> Affects Versions: Trunk, 17.12.08, 18.12.01, 18.12.02, 18.12.03, Upcoming
> Branch
> Environment: Linux/Ubuntu 20.04 LTS, Java 8
> Reporter: Giulio Speri
> Assignee: Giulio Speri
> Priority: Major
> Labels: backport-needed
> Attachments: OFBIZ-12455_14122021_trunk.patch
>
>
> The service *reserveProductInventoryByFacility* (file
> InventoryReserveServices.xml) simply do nothing in case quantityNotReserved
> value is not 0, but (ProductStore) requireInventory = Y.
> Now, no action is taken and quantityNotReserved is simply returned to the
> caller (ie: reserveStoreInventory).
> In this scenario an order can be placed despite there is no available
> inventory to fulfill an order item, causing backorder (that we wanted to
> avoid setting requireInventory flag on the ProductStore to Y ).
>
> {code:java}
> <if-compare field="parameters.quantityNotReserved" operator="not-equals"
> value="0" type="BigDecimal">
> <if-compare field="parameters.requireInventory" operator="equals" value="Y">
> <!-- use this else pattern to accomplish the anything but Y logic, ie if
> not specified default to inventory NOT required -->
> <else> {code}
> I checked the usage of the service around the project and it seems to me that
> we can make an important assertion: we can consider that also
> requireInventory flag of the ProductStore is Y.
>
> This issue is strictly related to OFBIZ-12264 issue.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)