Author: jleroux
Date: Fri Jun 27 21:03:21 2014
New Revision: 1606228
URL:
http://svn.apache.org/r1606228Log:
Better to reuse what I introduced in r1547719, did not read my comment enough, amount can be null...
Modified:
ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
Modified: ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml?rev=1606228&r1=1606227&r2=1606228&view=diff==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml Fri Jun 27 21:03:21 2014
@@ -143,7 +143,7 @@ under the License.
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<row-actions>
<set field="quantity" value="${groovy: quantity ?: 1}" type="BigDecimal"/>
- <set field="total" value="${quantity * amount}" type="BigDecimal"/>
+ <set field="total" value="${groovy: quantity * amount ?: 0}" type="BigDecimal"/>
</row-actions>
<auto-fields-entity entity-name="InvoiceItem" default-field-type="display"/>
<field name="invoiceId"><hidden/></field>
@@ -348,7 +348,7 @@ under the License.
<form name="EditInvoiceItems" type="multi" list-name="invoiceItems" default-entity-name="InvoiceItem" target="updateInvoiceItem?invoiceId=${invoiceId}&viewSize=${viewSize}&viewIndex=${viewIndex}" title="Edit Invoice Items" paginate-target="listInvoiceItems"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<row-actions>
- <set field="total" value="${groovy: (quantity ?: 1) * amount}" type="BigDecimal"/>
+ <set field="total" value="${groovy: (quantity ?: 1) * (amount ?: 0)}" type="BigDecimal"/>
</row-actions>
<field name="viewSize"><hidden value="${viewSize}"/></field>
<field name="viewIndex"><hidden value="${viewIndex}"/></field>