[ https://issues.apache.org/jira/browse/OFBIZ-6620?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14877162#comment-14877162 ]
Divesh Dutta edited comment on OFBIZ-6620 at 9/19/15 3:15 PM: -------------------------------------------------------------- Just for sake of data integrity we can say that ATP can be reduced from InventoryItem table when you mark status of InventoryItem to defective. And to do that as well we can write a SECA rule which can trigger a service and this service will be recording variance of ATP (Similar thing is done when you record damage variance). Updating counts in ATP and QOH directly is not a good practice, it should always be based on some business process. But I will again say that this is just sake for data integrity, no OFBiz business process is already buggy which will be solved after we do this change. We can see what other community members has to say. was (Author: diveshdut): Just for sake of data integrity we can say that ATP can be reduced from InventoryItem table when you mark status of InventoryItem to defective. But I will again say that this is just sake for data integrity, no OFBiz business process is buggy which will be solved after we do this change. We can see what other community members has to say. > Issue in reducting AvailableToPromiseTotal when product is marked as defective > ------------------------------------------------------------------------------ > > Key: OFBIZ-6620 > URL: https://issues.apache.org/jira/browse/OFBIZ-6620 > Project: OFBiz > Issue Type: Bug > Components: product > Reporter: Dhananjay Katre > Assignee: Jacques Le Roux > Priority: Minor > > I am raising this JIRA request based on email exchange on Sep 2 > --- > I have a record in inventory_item table (InventoryItem entity) for a product > ID say 1001. The available to promise quantity is 10. > Now, say, I change the statusId of the inventory item to Defective > (non-serialized), I expect the available to promise quantity to fall down to > 0 since now I have updated the status ID of the inventory to defective. > ------- > Since there are two fields quantityOnHandTotal and availableToPromiseTotal on > the InventoryItem record, in scenarios such as defective product, I would > think that quantityOnHandTotal will still show whatever quantity (for eg 10) > and availableToPromiseTotal for that InventoryItem to be 0 if all 10 > inventory items are defective. -- This message was sent by Atlassian JIRA (v6.3.4#6332)