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 71BD6200CD3 for ; Fri, 28 Jul 2017 10:11:06 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 703DF16C5FF; Fri, 28 Jul 2017 08:11:06 +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 8EF7C16C5FE for ; Fri, 28 Jul 2017 10:11:05 +0200 (CEST) Received: (qmail 90455 invoked by uid 500); 28 Jul 2017 08:11:04 -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 90444 invoked by uid 99); 28 Jul 2017 08:11:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jul 2017 08:11:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 4A596180647 for ; Fri, 28 Jul 2017 08:11:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id vvv2GsuV7SlE for ; Fri, 28 Jul 2017 08:11:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 963205FBBA for ; Fri, 28 Jul 2017 08:11:01 +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 97B37E07DD for ; Fri, 28 Jul 2017 08:11:00 +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 14B1C24D23 for ; Fri, 28 Jul 2017 08:11:00 +0000 (UTC) Date: Fri, 28 Jul 2017 08:11:00 +0000 (UTC) From: "Vaibhav Jain (JIRA)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (OFBIZ-9475) Refactor serialize and non-serialize inventory item implementaion MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 28 Jul 2017 08:11:06 -0000 [ https://issues.apache.org/jira/browse/OFBIZ-9475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vaibhav Jain reassigned OFBIZ-9475: ----------------------------------- Assignee: Vaibhav Jain > Refactor serialize and non-serialize inventory item implementaion > ----------------------------------------------------------------- > > Key: OFBIZ-9475 > URL: https://issues.apache.org/jira/browse/OFBIZ-9475 > Project: OFBiz > Issue Type: Improvement > Affects Versions: Trunk > Reporter: Deepak Dixit > Assignee: Vaibhav Jain > > As discussed on dev mailing list [1][2] we need to refactor serialize and non-serialize inventory item design. > As per current implementation serialize inventory item work on status and non-serialized inventory item work on inventory item detail. > Proposed Design: > - Use inventory item detail for both serialise and non-serialize inventory item. Only one additional condition for serialized inventory item that qoh can't be greater then one. > - We can maintain inventory item status record for both type > [1] http://markmail.org/thread/bd2bpiv6c5wvl7km > [2] http://ofbiz.markmail.org/thread/kro5kcggp4fcose7 > As we do a lot of discussion in the respective mail threads. > [1] http://markmail.org/thread/bd2bpiv6c5wvl7km > [2] http://ofbiz.markmail.org/thread/kro5kcggp4fcose7 > According to this email threads, I conclude that:- > There are 2 types of the inventory item in OFBiz. > 1. *Serialized* > 2. *Non serialized* > Majorly there are 3 entities to manage the various transaction of serialised and non-serialized inventory items. > 1. _InventoryItem_ > 2. _InventoryItemDetail_ > 3. _InventoryItemStatus_ > Following changes need to be done in the workflow of inventory item records:- > 1) There is no need to manage a different workflow for serialised and non- serialised inventory items. > 2) Transaction of serialised and non-serialised inventory item should be managed in both InventoryItemStatus and InventoryItemDetail entity. > a) Transaction of serialised inventory items is managed by inventoryItemstatus entity not managed in inventoryItemDetail entity. While inventoryItemDetail and inventoryItemStatus should be managed for both serialised and non-serialised inventory items. > b) As ATP/QOH/AQT are updated on the basis of ATPDIFF/QOHDIFF/AQTDIFF in non-serialised inventory item. We should follow the same pattern for serialised inventory item. > c) Change in ATP/QOH/AQT is tracked by inventoryItemDetail entity. > d)Status transaction of an inventory item is tracked in InventoryItemStatus entity. > 3) No need to manage separate status for serialised and non-serialised inventory item. They are already distinguished on the basis of inventory item type. > 1. *Serialised*:- > In a serialised inventory item as of now ATP/QOH/AQT are managed on the basis of inventory item status.While ATP/QOH/AQT should be the sum of ATPDIFF/QOHDIFF/AQTDIFF of inventory item detail. > Ex: > 1. If we receive 2 inventory of serialised inventory item then 2 separate inventory item records are created > InventoryItem:- > inventoryItemId="10001",status="AVAILABLE", ATP="1", QOH="1",AQT="1" > inventoryItemId="10002",status="AVAILABLE", ATP="1", QOH="1",AQT="1" > InventoryItemDetail:- > inventoryItemId="10001", inventoryItemDetailSeqId="10001", ATPDIFF="1", QOHDIFF="1", AQTDIFF="1" > inventoryItemId="10002", inventoryItemDetailSeqId="10002", ATPDIFF="1", QOHDIFF="1", AQTDIFF="1" > InventoryItemStatus:- > inventoryItemId="10001" statusId="AVAILABLE" > inventoryItemId="10002" statusId="AVAILABLE" > 2. If status of inventory item is changed from AVAILABLE -> PROMISED then > InventoryItem:- > inventoryItemId="10001",status="PROMISED", ATP="1", QOH="1",AQT="1" > inventoryItemId="10002",status="AVAILABLE", ATP="1", QOH="1",AQT="1" > InventoryItemDetail:- > inventoryItemId="10001", inventoryItemDetailSeqId="10001", ATPDIFF="1", QOHDIFF="1", AQTDIFF="1" > inventoryItemId="10001", inventoryItemDetailSeqId="10002", ATPDIFF="-1", QOHDIFF="0", AQTDIFF="0" > inventoryItemId="10002", inventoryItemDetailSeqId="10002", ATPDIFF="1", QOHDIFF="1", AQTDIFF="1" > InventoryItemStatus:- > inventoryItemId="10001" statusId="AVAILABLE" statusEndDateTime="" > inventoryItemId="10002" statusId="PROMISED" > 2. *Non-serialised*:- > At the time of receive non-serialised inventory, Item should be received in Available status. So that status of non-serialised inventory item can be managed further. > Status of non-serialised inventory item should be managed at inventory item level not on inventory item detail level i.e. there are limited inventory item status for non-serialised inventory items > Ex: > 1. If we receive 10 inventory of non-serialised inventory item. The inventory will receive in Available status. > InventoryItem:- > status="AVAILABLE", ATP="10", QOH="10",AQT="10" > InventoryItemDetail:- > ATPDIFF="10", QOHDIFF="10",AQTDIFF="10" > Now if we place an order 4 quantity and reservation happens then > InventoryItem:- > status="AVAILABLE", ATP="6", QOH="10",AQT="10" > InventoryItemDetail:- > ATPDIFF="10", QOHDIFF="10",AQTDIFF="10" > ATPDIFF="-4", QOHDIFF="0",AQTDIFF="0" > InventoryItemStatus:- > status="AVAILABLE" > 2. If status of inventory item is changed from Available -> Defective then > InventoryItem:- > status="DEFECTIVE", ATP="0", QOH="10",AQT="10" > InventoryItemDetail:- > ATPDIFF="10", QOHDIFF="10",AQTDIFF="10" > ATPDIFF="-10", QOHDIFF="0",AQTDIFF="0" > InventoryItemStatus:- > status="AVAILABLE" statusEndTime="" > status="DEFECTIVE" > 3. Similarly, if status of inventory item is changed from Available -> Defective then > InventoryItem:- > status="ON_HOLD", ATP="0", QOH="10",AQT="10" > InventoryItemDetail:- > ATPDIFF="10", QOHDIFF="10",AQTDIFF="10" > ATPDIFF="-10", QOHDIFF="0",AQTDIFF="0" > InventoryItemStatus:- > status="AVAILABLE" statusEndTime="" > status="ON_HOLD" -- This message was sent by Atlassian JIRA (v6.4.14#64029)