Skip to content

Commit ed603dc

Browse files
goljajacopoc
authored andcommitted
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. (cherry picked from commit aef5f8e)
1 parent a41476c commit ed603dc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

applications/accounting/widget/accounting/AccountingInvoiceItemCpd.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ under the License.
390390
paginate-target="Accounting/Invoice/Items/List" odd-row-style="alternate-row" default-table-style="basic-table hover-bar"
391391
extends="CommonDynamicGrid" extends-resource="component://common/widget/CommonForms.xml">
392392
<wf:row-actions>
393-
<wf:set field="quantity" value="${groovy: quantity ?: 1}" type="BigDecimal"/>
393+
<wf:set field="quantity" value="${groovy: (quantity != null) ? quantity : 1}" type="BigDecimal"/>
394394
<wf:set field="total" value="${groovy: quantity * amount ?: 0}" type="BigDecimal"/>
395395
</wf:row-actions>
396396
<wf:auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>

0 commit comments

Comments
 (0)