Author: jacopoc
Date: Wed Feb 10 15:08:39 2010
New Revision: 908530
URL:
http://svn.apache.org/viewvc?rev=908530&view=revLog:
Added code to prevent the posting of accounting transactions with debit and credit totals equal to zero.
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml?rev=908530&r1=908529&r2=908530&view=diff==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml Wed Feb 10 15:08:39 2010
@@ -222,6 +222,12 @@
<if-compare field="trialBalanceResultMap.debitCreditDifference" operator="less-equals" value="-0.01" type="BigDecimal">
<add-error><fail-message message="Not posting GL Accounting Transaction with ID [${parameters.acctgTransId}] because the trial balance failed: Debit Total=${trialBalanceResultMap.debitTotal} Credit Total=${trialBalanceResultMap.creditTotal} Debit/Credit Difference=${trialBalanceResultMap.debitCreditDifference}"/></add-error>
</if-compare>
+ <if-compare field="trialBalanceResultMap.debitTotal" operator="equals" value="0.00" type="BigDecimal">
+ <add-error><fail-message message="Not posting GL Accounting Transaction with ID [${parameters.acctgTransId}] because debit total is zero: Debit Total=${trialBalanceResultMap.debitTotal} Credit Total=${trialBalanceResultMap.creditTotal} Debit/Credit Difference=${trialBalanceResultMap.debitCreditDifference}"/></add-error>
+ </if-compare>
+ <if-compare field="trialBalanceResultMap.creditTotal" operator="equals" value="0.00" type="BigDecimal">
+ <add-error><fail-message message="Not posting GL Accounting Transaction with ID [${parameters.acctgTransId}] because credit total is zero: Debit Total=${trialBalanceResultMap.debitTotal} Credit Total=${trialBalanceResultMap.creditTotal} Debit/Credit Difference=${trialBalanceResultMap.debitCreditDifference}"/></add-error>
+ </if-compare>
<entity-condition entity-name="AcctgTransEntry" list="acctgTransEntryList">
<condition-expr field-name="acctgTransId" from-field="parameters.acctgTransId"/>