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

Divesh Dutta edited comment on OFBIZ-6145 at 5/16/15 5:28 AM:
--------------------------------------------------------------

It seems that you are trying to return items of purchase order but those items 
are already reserved for sales order. So you are not able to return/issue 
inventory. And this is right flow. You should not be able to issue item which 
is reserved. So the patch given here is not the right fix. 

For now if items are reserved in sales order and reserved item is defective, 
there is no option in UI to cancel the reservation so that you can create 
purchase return and issue those items. Alternate option is :

1) You cancel the item in sales order which will cancel the reservations.
2) Then you create purchase return and issue items to shipment and this time it 
should work fine.
3) And add cancelled item back in sales order. 


Also we can improve process in way that we avoid these situations. Some of the 
ways are introduce inspection work flow in system. So when you receive purchase 
order , items will not be reserved for sales order. One you inspect them and 
mark them as quality passed, then only you reserve received items for any sales 
order. And you create purchase return for items those are not quality passed. 
So problem given in this ticket will never come. 

Another improvement can be to add UI  to cancel and reserve inventory for 
specific sales order item so that you dont have to cancel item of sales order. 

All the improvements discussed above can be a separate ticket. And bug reported 
here it not actually a bug. It is expected work flow. 



was (Author: diveshdut):
It seems that you are trying to return items of purchase order but those items 
are already reserved for sales order. So you are not able to return/issue 
inventory. And this is right flow. You should not be able to issue item which 
is reserved. So the patch given here is not the right fix. 

For now if items are reserved in sales order and reserved item is defective, 
there is not option in UI to cancel the reservation so that you can create 
purchase return and issue those items. Alternate option is :

1) You cancel the item in sales order which will cancel the reservations.
2) Then you create purchase return and issue items to shipment and this time it 
should work fine.
3) And add cancelled item back in sales order. 


> Purchase return shipment issuance greater than ATP error
> --------------------------------------------------------
>
>                 Key: OFBIZ-6145
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-6145
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: Trunk
>            Reporter: Christian Carlow
>            Assignee: Nicolas Malin
>         Attachments: OFBIZ-6145.patch
>
>
> This error occurred when issuing received purchase order inventory to a 
> return shipment:
> Not issuing Order Item Ship Group Inventory Reservation to shipment 10096 
> because the quantity to issue 1 is greater than the quantity left to issue 
> for order order item inventoryItem 
> IssuanceServices.xml issueInventoryItemToShipment service checks that the 
> inventoryItem ATP is greater than the return quantity submitted which fails 
> when sales backorder qty of the product is greater than the purchase receipt 
> qty.
> To reproduce:
> 1.  Create a sales order for 100 of a product
> 2.  Create a purchase order for 10 of the same product
> 3.  Receive the purchase order inventory
> 4.  Create a purchase order return then accept it
> 5.  Click the "Create Return Shipment" button that appears once the return is 
> accepted
> 6.  Update the shipment to create and navigate to the shipment order items 
> page
> 7.  Issue qty of the inventory item received for purchase order to get the 
> error



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to