You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2013/06/21 03:41:06 UTC
svn commit: r1495267 -
/ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml
Author: hansbak
Date: Fri Jun 21 01:41:06 2013
New Revision: 1495267
URL: http://svn.apache.org/r1495267
Log:
total gave error in log when quantity was blank and 0 still gave the total of quantity 1
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=1495267&r1=1495266&r2=1495267&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/InvoiceForms.xml Fri Jun 21 01:41:06 2013
@@ -349,9 +349,9 @@ 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="${bsh:
+ <set field="total" value="${groovy:
import java.math.BigDecimal;
- if(quantity == null || quantity.compareTo(BigDecimal.ZERO) == 0) quantity = BigDecimal.ONE;
+ if(quantity == null) quantity = BigDecimal.ONE;
return(quantity.multiply(amount));}"/>
</row-actions>
<field name="viewSize"><hidden value="${viewSize}"/></field>