Fixing bug where transactions with zero amount in debit and credit fields were not getting posted.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1058933 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Anil Patel
2011-01-14 10:44:17 +00:00
parent 6afa93d849
commit 1bf6299d46
@@ -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"/>