Author: apatel
Date: Fri Jan 14 10:44:17 2011
New Revision: 1058933
URL:
http://svn.apache.org/viewvc?rev=1058933&view=revLog:
Fixing bug where transactions with zero amount in debit and credit fields were not getting posted.
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=1058933&r1=1058932&r2=1058933&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 Fri Jan 14 10:44:17 2011
@@ -230,6 +230,33 @@ under the License.
<fail-property resource="AccountingUiLabels" property="AccountingNotPostingGlAccountTransactionTrialBalanceFailed"/>
</add-error>
</if-compare>
+ <if>
+ <condition>
+ <and>
+ <if-compare field="trialBalanceResultMap.debitTotal" operator="equals" value="0.00" type="BigDecimal"></if-compare>
+ <if-compare field="trialBalanceResultMap.creditTotal" operator="not-equals" value="0.00" type="BigDecimal"></if-compare>
+ </and>
+ </condition>
+ <then>
+ <add-error>
+ <fail-property resource="AccountingUiLabels" property="AccountingNotPostingGlAccountTransactionDebitZero"/>
+ </add-error>
+ </then>
+ </if>
+ <if>
+ <condition>
+ <and>
+ <if-compare field="trialBalanceResultMap.creditTotal" operator="equals" value="0.00" type="BigDecimal"></if-compare>
+ <if-compare field="trialBalanceResultMap.debitTotal" operator="not-equals" value="0.00" type="BigDecimal"></if-compare>
+ </and>
+ </condition>
+ <then>
+ <add-error>
+ <fail-property resource="AccountingUiLabels" property="AccountingNotPostingGlAccountTransactionCreditZero"/>
+ </add-error>
+ </then>
+ </if>
+
<if-compare field="trialBalanceResultMap.debitTotal" operator="equals" value="0.00" type="BigDecimal">
<add-error>
<fail-property resource="AccountingUiLabels" property="AccountingNotPostingGlAccountTransactionDebitZero"/>