You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Deepak Dixit (JIRA)" <ji...@apache.org> on 2019/04/10 08:31:00 UTC

[jira] [Commented] (OFBIZ-9475) Refactor serialize and non-serialize inventory item implementaion

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

Deepak Dixit commented on OFBIZ-9475:
-------------------------------------

If no objection I'd like to commit https://issues.apache.org/jira/secure/attachment/12945917/OFBIZ-9475.patch

> 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
>          Components: product
>    Affects Versions: Trunk
>            Reporter: Deepak Dixit
>            Assignee: Yashwant Dhakad
>            Priority: Major
>         Attachments: OFBIZ-9475.patch, OFBIZ-9475.patch, OFBIZ-9475.patch, OFBIZ-9475.patch, OFBIZ-9475.patch
>
>
> 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 -> Hold 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
(v7.6.3#76005)