Author: apatel
Date: Fri Jan 14 10:55:39 2011
New Revision: 1058936
URL: http://svn.apache.org/viewvc?rev=1058936&view=rev
Log:
Fixing bug where transactions with zero amount in debit and credit fields were
not getting posted. Manually applied fix from trunk.
Modified:
ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
Modified:
ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml?rev=1058936&r1=1058935&r2=1058936&view=diff
==============================================================================
---
ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
(original)
+++
ofbiz/branches/release10.04/applications/accounting/script/org/ofbiz/accounting/ledger/AcctgTransServices.xml
Fri Jan 14 10:55:39 2011
@@ -222,12 +222,28 @@ under the License.
<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>
+ <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-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>
+ </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-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>
+ </then>
+ </if>
<entity-condition entity-name="AcctgTransEntry"
list="acctgTransEntryList">
<condition-expr field-name="acctgTransId"
from-field="parameters.acctgTransId"/>