Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 31D12200CA5 for ; Sat, 27 May 2017 06:44:11 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 25461160BC8; Sat, 27 May 2017 04:44:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1CDB1160B9C for ; Sat, 27 May 2017 06:44:09 +0200 (CEST) Received: (qmail 70516 invoked by uid 500); 27 May 2017 04:44:09 -0000 Mailing-List: contact notifications-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list notifications@ofbiz.apache.org Received: (qmail 70507 invoked by uid 99); 27 May 2017 04:44:09 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 27 May 2017 04:44:09 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A3DADC13AE for ; Sat, 27 May 2017 04:44:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id FkT15D0z3Gxt for ; Sat, 27 May 2017 04:44:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 818705F477 for ; Sat, 27 May 2017 04:44:06 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id CF31EE0A64 for ; Sat, 27 May 2017 04:44:05 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id E02F921B57 for ; Sat, 27 May 2017 04:44:04 +0000 (UTC) Date: Sat, 27 May 2017 04:44:04 +0000 (UTC) From: "Swapnil Shah (JIRA)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (OFBIZ-6964) Support for replenishment of a secondary warehouse from a main warehouse MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 27 May 2017 04:44:11 -0000 [ https://issues.apache.org/jira/browse/OFBIZ-6964?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Swapnil Shah reassigned OFBIZ-6964: ----------------------------------- Assignee: Swapnil Shah (was: Divesh Dutta) > Support for replenishment of a secondary warehouse from a main warehouse > ------------------------------------------------------------------------ > > Key: OFBIZ-6964 > URL: https://issues.apache.org/jira/browse/OFBIZ-6964 > Project: OFBiz > Issue Type: New Feature > Components: manufacturing, product > Reporter: Shrenik Bhura > Assignee: Swapnil Shah > Labels: features > Fix For: Upcoming Release > > Attachments: screenshot-1.png > > > At the onset let me define a few terms clearly as I mean it in the story description below : > Requirement - A request generated for a particular product for a specific quantity that needs to be purchased from a supplier for satisfying certain inventory needs of a particular facility. > Replenishment - A request generated for a particular product for a specific quantity that needs to be transferred from a "backup facility" for satisfying certain inventory needs of a particular facility. > Fulfilment - The process of reserving, picking, packing and shipping the ordered quantity of product(s) as per a sales order. > Terms 'warehouse' and 'facility' have been used interchangeably. > *The Use Case:* > Consider a scenario wherein there is a website and a physical retail store of the same Company. > Each having its own facility i.e. 1:1 mapping. > {{Store A (webstore) -> associated with facility 1 (webstore facility)}} > {{Store B (retailstore) -> associated with facility 2 (retailstore facility)}} > However, both the stores share the same catalog/products. But both have independent inventory requirement and replenishment rules for the same product. > There is a Requirement Method Enum ID (RMEI) of each product which is applicable irrespective of the store and supersedes the RMEI defined, if any, on a store. > A product's inventory thresholds (Minimum Stock, Reorder Quantity) are independently managed via the facilities tab for the product. A product has its ATP and QOH levels on a per facility basis. _Do note that all these inventory numbers are at a facility level and has no bearing at a store level._ > Where the difficulty crops up with the current implementation is the way requirements are generated. A product can have only one RMEI. When an order is placed from any store, then based on the combination of a product's RMEI and the store mapped facility's inventory threshold, requirements are generated. This is without consideration of the inventory status (surplus or otherwise) at another facility of the same Company. If a store has multiple facilities associated with it then the one defined in the ProductStore entity -> inventoryFacilityId field would be considered for picking the inventory threshold values and thus for requirement generation. > Most typical real-world facility arrangements: > 1. Usually an organisation would have a main facility/warehouse where all the purchases are received and sub-facilities which are replenished from the main facility after QA, internal processes, etc. OR > 2. For each product there would be a primary facility where the product is received from the supplier (to derive benefits of demographic convenience and consumption patterns) and then replenished to other facilities on a demand based pull basis. > To drive efficiencies across an organisation they need methods to consider open fulfilment needs, in process purchase orders and inventory levels across multiple facilities and thereafter propose inventory transfers across them to facilitate better stocking and thus order fulfilment. > Coming back to our use case, the webstore warehouse is the main facility at which incoming shipments from suppliers are received for the entire Company but sales order fulfilment happens only for the webstore. The retail warehouse is primarily 're-stocked' via replenishment requests raised upon the webstore warehouse and thus need not issue direct purchase orders to suppliers. However, if the need be, requirement generated based on the product's RMEI and the retail facility's inventory thresholds can also be approved, converted into Purchase order and issued. > *Proposed Solution:* > There doesn't seem to be an out of the box solution for this in OFBiz. This could work if either we think of - > Approach A: Setting RMEI at a ProductFacility level as well which shall supersede the Product level RMEI setting OR > Approach B: Build in support for a solution that I have encountered in Opentaps (a system built atop OFBiz) i.e. implement support for a new setting *Replenishment Method Enum ID (RPMEI)* and the concept of *Backup Facility*. > The obvious difficulty with Approach A could be the need to modify existing logic everywhere RMEI is being used and _may_ be difficult to implement and validate (must confess that I have not given this approach much more thought). On the contrary the Approach B seems a safer method to add this feature with minimum possibility of breaking existing functionality. > _Herein is the Approach B in detail-_ > > Introduce a ProductFacility specific *Replenishment Method Enum ID (RPMEI)* with values such as - > **Code snippets are from Opentaps** > {code:xml} > > > > > > > > {code} > and extend the entity ProductFacility - > {code:xml} > > > > > > > > > > > {code} > Create new entities - > {code:xml} > title="Define associations between facilities"> > > > > > > > > > > > > > > > > > > > > > title="Define associations between facilities"> > > > > > > {code} > Hence now we can define a replenishment method at a product level and that too on a per facility basis. > Additional now we can provision for defining of backup facility for any facility. (May consider using the parentFacilityId available on the Facility entity but am not sure about its purpose and there is no way to define the relation between the parent and child.) > We have to safeguard these: > 1. There should be no direct or indirect cyclic backup facility relation between any 2 facilities due to backup facility relation definition. > 2. There should be no direct or indirect cyclic replenishment facility relation created due to defining of replenishFromFacilityId in a ProductFacility entry for a product. > Now when an order is placed on the retail store and ATP falls below Minimum Stock at the primary facility mapped to the retail store, then depending on the product's or store's RMEI setting combined with the facility's inventory thresholds a purchase requirement may be generated. However, we are not interested in this and may even block the generation of such a purchase requirement for product's which have a RPMEI defined for a particular facility. > Instead on a subsequent MRP run for the retailstore facility, based on the open sales orders, we should generate/propose 'Inventory transfer requirement' from the _backup facility_ or the _replenishFromFacilityId_ depending on what's defined in the ProductFacility entity. > This solution should hold good even in the case of many:many mapping between stores and facilities as existing implementation is to reserve inventory against the facility that is mapped to the store via inventoryFacilityId. Hence there is no chance of the same sales order resulting in redundant requirements on multiple facilities. > And since the RPMEI (Replenishment Method Enum Id) is defined at the ProductFacility level there is no possibility of a general setting of RPMEI at a facility or store level to compete with. > This seems to be a rather important feature without which many businesses operating brick and mortar stores as well as an ecommerce web-front can't favourable use OFBiz. -- This message was sent by Atlassian JIRA (v6.3.15#6346)