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

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

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

Fixed: Avoid displaying quantities equal to zero as 1 in the invoice items grid 
of the View Invoice screen (OFBIZ-13362)

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.

The problem is due to the fact that the grid 'ListInvoiceItems' used in
the viewInvoice screen set the invoice item quantity to one when it is
zero. The change in the commit makes sure that the quantity visualized is
set to 1 only when the quantity is null.

> 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