You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ap...@apache.org on 2009/08/13 16:47:54 UTC
svn commit: r803908 -
/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
Author: apatel
Date: Thu Aug 13 14:47:53 2009
New Revision: 803908
URL: http://svn.apache.org/viewvc?rev=803908&view=rev
Log:
Fix for Duplicate Accounting Trans Entries are created on canceling check run. Patch from OFBIZ-2830. Thanks Chirag and Sumit for fix.
Modified:
ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml?rev=803908&r1=803907&r2=803908&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml Thu Aug 13 14:47:53 2009
@@ -404,7 +404,8 @@
<add-error><fail-message message="${uiLabelMap.AccountingNoPaymentsfound}"/></add-error>
<check-errors/>
</if-empty>
- <set field="paymentStatusCtx.paymentId" from-field="parameters.paymentId"/>
+ <set field="paymentId" from-field="parameters.paymentId"/>
+ <set field="paymentStatusCtx.paymentId" from-field="paymentId"/>
<set field="paymentStatusCtx.statusId" value="PMNT_VOID"/>
<call-service service-name="setPaymentStatus" in-map-name="paymentStatusCtx"/>
<get-related relation-name="PaymentApplication" value-field="payment" list="paymentApplications"/>
@@ -418,22 +419,15 @@
</if-compare>
<set field="removePaymentApplicationCtx.paymentApplicationId" from-field="paymentApplication.paymentApplicationId"/>
<call-service service-name="removePaymentApplication" in-map-name="removePaymentApplicationCtx"/>
- <get-related relation-name="AcctgTrans" value-field="updateInvoiceCtx" list="acctgTransInvoiceList"/>
- <iterate list="acctgTransInvoiceList" entry="acctgTransInvoice">
- <set field="copyAcctgTransCtx.fromAcctgTransId" from-field="acctgTransInvoice.acctgTransId"/>
- <set field="copyAcctgTransCtx.revert" value="Y"/>
- <call-service service-name="copyAcctgTransAndEntries" in-map-name="copyAcctgTransCtx">
- <result-to-field field="postAcctgTransMap.acctgTransId" result-name="acctgTransId"/>
- </call-service>
- <if-compare field="acctgTransInvoice.isPosted" operator="equals" value="Y">
- <call-service service-name="postAcctgTrans" in-map-name="postAcctgTransMap"/>
- </if-compare>
- <clear-field field="postAcctgTransMap"/>
- </iterate>
</iterate>
- <get-related relation-name="AcctgTrans" value-field="payment" list="acctgTransPaymentList"/>
- <clear-field field="copyAcctgTransCtx"/>
+ <entity-condition entity-name="AcctgTrans" list="acctgTransPaymentList">
+ <condition-list combine="and">
+ <condition-expr field-name="invoiceId" operator="equals" from-field="nullField"/>
+ <condition-expr field-name="paymentId" from-field="paymentId"/>
+ </condition-list>
+ </entity-condition>
<iterate list="acctgTransPaymentList" entry="acctgTransPayment">
+ <clear-field field="copyAcctgTransCtx"/>
<set field="copyAcctgTransCtx.fromAcctgTransId" from-field="acctgTransPayment.acctgTransId"/>
<set field="copyAcctgTransCtx.revert" value="Y"/>
<call-service service-name="copyAcctgTransAndEntries" in-map-name="copyAcctgTransCtx">