Hi all,

I see there is an AllocationPlan entity(AllocationPlanHeader and
AllocationPlanItem to be precise). What is the purpose of this entity? To
allocate order items to inventory items? Because there is no connection to
the inventory item, only to a product.

The reason I ask this is because I think there is a bug with the inventory
reservation. If you look in the demo data at the ProductStore 9000 on the
backend UI you see Allocate Inventory as Y. But that field is not set in
the demo data, so it is actually null. If you change it to actually be Y,
then order a product from the ecommerce store, the inventory(the ATP) for
that product will NOT be decreased.

That is because in OrderServices line 1247 the if statement resolves to
true and the loop is broken, so it does not reserve inventory anymore. Also
I did not found any place on the UI in the ecommerce store where we can set
the autoReserve field, only when entering an order from the backend.

if ("SALES_ORDER".equals(orderTypeId) && productStore != null &&
"Y".equals(productStore.getString(
                                "allocateInventory"))) {
                            //If the 'autoReserve' flag is not set for the
order item, don't reserve the inventory
                            String autoReserve =
OrderReadHelper.getOrderItemAttribute(orderItem, "autoReserve");
                            if (autoReserve == null ||
!"true".equals(autoReserve)) {
                                continue;
                            }
                        }

-- 
Groza Dănuț

Reply via email to