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

ASF subversion and git services commented on OFBIZ-13373:
---------------------------------------------------------

Commit 2ceca305266b8652d3bad310e69c840b63c28f4a in ofbiz-framework's branch 
refs/heads/release24.09 from Anahita Goljahani
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=2ceca30526 ]

Fixed:Include handling for rejected quantities in 
cancelRemaingPurchaseOrderItems service (OFBIZ-13373) (#985)

When a PO receipt contains rejected units, clicking the “Force Complete
Purchase Order” button in the Order Details screen generates an error
because the cancelRemainingPurchaseOrderItems service ignores rejected
items. Please refer to
[OFBIZ-13373](https://issues.apache.org/jira/browse/OFBIZ-13373) for
further details.

The changes in this PR fix the issue in the cancelRemainingPurchaseOrderItems 
service.

> Error when forcing PO completion if receipt contains rejected units
> -------------------------------------------------------------------
>
>                 Key: OFBIZ-13373
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13373
>             Project: OFBiz
>          Issue Type: Bug
>          Components: order
>    Affects Versions: Upcoming Branch
>            Reporter: Anahita Goljahani
>            Assignee: Anahita Goljahani
>            Priority: Major
>         Attachments: 1_Receive_annotated.png, 
> 2_Receive_Selected_Shipment_annotated.png, 
> 3_Receive_Selected_product(s)_annotated.png, 
> 4_Receipt(s)_For_Purchase_Order_annotated.png, 
> 5_Force_Complete_Purchase_Order_annotated.png, 
> 6_Error_cannot_cancel_annotated.png
>
>
> When a PO receipt contains rejected units, clicking the *“Force Complete 
> Purchase Order”* button in the Order Details screen generates an error 
> because the {{cancelRemainingPurchaseOrderItems}} service does not take 
> rejected items into account when computing the units to cancel.
>  
> The issue can be reproduced as follows.
>  
> Create a PO for, e.g., 10 units of WG-1111 and approve it.
> In the ‘Actions’ sections of the order details screen, click the ‘Receive’ 
> button.
>   !1_Receive_annotated.png|width=467,height=294!
>  
> Select the automatically created shipment and click ‘Receive Selected 
> Shipment’.
> !2_Receive_Selected_Shipment_annotated.png|width=314,height=167!
>  
>  Receive 8 units of WG-1111, reject 1 and click ‘Receive Selected Product(s)’.
> !3_Receive_Selected_product(s)_annotated.png|width=599,height=216!
>  
>  Go back to the order details screen, e.g., by clicking the PO id in the 
> ‘Receipt(s) For Purchase Order …’ recap section.
> !4_Receipt(s)_For_Purchase_Order_annotated.png|width=652,height=224!
>  
> Click ‘Force Complete Purchase Order’ in  the ‘Actions’ section of the Order 
> details screen.
> !5_Force_Complete_Purchase_Order_annotated.png|width=429,height=323!
>  
> An error is generated because of an invalid cancel quantity computation in 
> the 'cancelRemainingPurchaseOrderItems' service.
> !6_Error_cannot_cancel_annotated.png|width=554,height=119!
>  
> The problem is that, currently, the service only accounts for accepted 
> quantities, 8 in our example, and doesn’t take into account rejected units, 1 
> in our example. Hence, the service tries to cancel 2 units ( = 10 –  8) from 
> the 10 units ordered, but an error is generated because there is only 1 unit 
> ( = 10 – 8 – 1) available to cancel.
>  
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to