Author: lektran
Date: Fri Jan 9 10:44:15 2009
New Revision: 733109
URL:
http://svn.apache.org/viewvc?rev=733109&view=revLog:
BigDecimal comparison fix
Modified:
ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
Modified: ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml?rev=733109&r1=733108&r2=733109&view=diff==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/ReportFinancialSummaryForms.xml Fri Jan 9 10:44:15 2009
@@ -79,8 +79,8 @@
<entity-one entity-name="GlAccount" value-name="glAccount">
<field-map field-name="glAccountId"/>
</entity-one>
- <set field="showDebit" value="${bsh:(postedBalance >= 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount)) || (postedBalance < 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount))}" type="Boolean"/>
- <set field="showCredit" value="${bsh:(postedBalance >= 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount)) || (postedBalance < 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount))}" type="Boolean"/>
+ <set field="showDebit" value="${bsh:(postedBalance.compareTo(java.math.BigDecimal.ZERO) >= 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount)) || (postedBalance.compareTo(java.math.BigDecimal.ZERO) < 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount))}" type="Boolean"/>
+ <set field="showCredit" value="${bsh:(postedBalance.compareTo(java.math.BigDecimal.ZERO) >= 0 && org.ofbiz.accounting.util.UtilAccounting.isCreditAccount(glAccount)) || (postedBalance.compareTo(java.math.BigDecimal.ZERO) < 0 && org.ofbiz.accounting.util.UtilAccounting.isDebitAccount(glAccount))}" type="Boolean"/>
<set field="absolutePostedBalance" value="${bsh:(postedBalance.abs())}" type="BigDecimal"/>
<set field="showTotals" value="${bsh:(isLastRow != null && isLastRow==true)}" type="Boolean"/>
<set field="debitTotal" from-field="parameters.debitTotal" type="BigDecimal"/>