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

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

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

Fixed: Ensure that the invoice item quantity is set to 1 only if the quantity 
is null when invoice items are created by the createInvoiceItem service 
(OFBIZ-13362)

When the system creates a receipt with an accepted quantity equal to
zero, the service createInvoiceItem erroneously set the item invoice
quantity to 1, leading to a wrong invoiced quantity.

The change in this commit makes sure that only quantities equal to null are
set to 1.

(cherry picked from commit c059f1e0ba07aabeceee1f006bd82add3331393c)


> There are invoice related issues for receipts with accepted quantity equal to 
> zero
> ----------------------------------------------------------------------------------
>
>                 Key: OFBIZ-13362
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13362
>             Project: OFBiz
>          Issue Type: Bug
>          Components: accounting/invoice
>    Affects Versions: 24.09.05
>            Reporter: Anahita Goljahani
>            Assignee: Anahita Goljahani
>            Priority: Major
>         Attachments: 10_viewInvoice_annotated.png, 
> 1_new_shipment_for_ship_group_annotated.png, 2_edit_shipment_annotated.png, 
> 3_receive_inventory_against_PO_annotated.png, 
> 4_payment_information_annotated.png, 5_invoice_items_annotated.png, 
> 6_entity_sql_processor_annoatated.png, 
> 7_set_invoice_item_quantity_to_0_annotated.png, 
> 8_select_invoice_item_quantity_0_annotated.png, 
> 9_payment_information_annotated.png
>
>
> I have identified two main issues regarding invoicing for receipts with an 
> accepted quantity equal to zero. 
>  # When the system creates a receipt with an accepted quantity equal to zero, 
> the service createInvoiceItem erroneously set the item invoice quantity to 1, 
> leading to a wrong invoiced quantity.
>  # Even when the invoice item quantity is correctly set to zero in the 
> database, the screen viewInvoice erroneously ‘visualize’ an invoice item 
> reporting one unit of the product.
> h2. The following steps allow to reproduce the issue #1
> Create a purchase order for, e.g., 7 units of product GZ-1000. Approve the 
> order and click ‘New Shipment For Ship Group [00001]’
>  
> !1_new_shipment_for_ship_group_annotated.png|width=468,height=333!
>  
> Then, click Receive Against PO
>  
> !2_edit_shipment_annotated.png|width=346,height=394!
>  
> In the Receive Inventory Against PO screen, leave the Receive quantity at 0 
> and click Receive Item(s)
>  
> !3_receive_inventory_against_PO_annotated.png|width=616,height=235!
>  
> An Invoice is automatically created, as visible in the Payment Information 
> section of the Order Details screen
>  
> !4_payment_information_annotated.png|width=444,height=169!
>  
> By clicking the invoice number (10000 in our case), it can be assessed that 
> the invoice erroneously contains an invoice item with 1 unit of product 
> GZ-1000, because of a bug in the createInvoiceItem that set the quantity to 1 
> when it is 0.
>  
> !5_invoice_items_annotated.png|width=727,height=204!
>  
> By using the Entity SQL Processor of the OFBiz Web Tools, it can be assessed 
> that in the InvoiceItem table there is record for the invoice ‘10000’ with 
> productId ‘GZ-1000’ and quantity 1.
>  
> !6_entity_sql_processor_annoatated.png|width=486,height=336!
> h2. The following steps allow to reproduce issue #2
> Continuing the example above, by using the Entity SQL Processor of the OFBiz 
> Web Tools, set the quantity value of the Invoice Item to 0.  
>  
> !7_set_invoice_item_quantity_to_0_annotated.png|width=580,height=341!
>  
> !8_select_invoice_item_quantity_0_annotated.png|width=484,height=330!
>  
> From the Payment Information section of the Order Details page, click the 
> invoice number 10000 and verify that there is an invoice item for the product 
> GZ-1000 with quantity equal to 1, because of a visualization bug in the 
> viewInvoice screen.
>  
> !9_payment_information_annotated.png|width=631,height=198!
>  
> !10_viewInvoice_annotated.png|width=650,height=227!
>  



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

Reply via email to