Details
-
Improvement
-
Status: In Progress
-
Major
-
Resolution: Unresolved
-
Trunk, Upcoming Branch
-
None
-
None
Description
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"
Attachments
Attachments
Issue Links
- relates to
-
OFBIZ-7762 Full support for serialized inventory
- Open