svn commit: r794948 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r794948 - /ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml

apatel-2
Author: apatel
Date: Fri Jul 17 02:41:11 2009
New Revision: 794948

URL: http://svn.apache.org/viewvc?rev=794948&view=rev
Log:
On void payment reverse transaction entries have isPosted flag set to Y if original entry had isPosted=Y. Patch from Jira#2731. Thanks Sumit for patch.

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=794948&r1=794947&r2=794948&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 Fri Jul 17 02:41:11 2009
@@ -420,7 +420,13 @@
             <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"/>
+                <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"/>
@@ -428,7 +434,13 @@
         <iterate list="acctgTransPaymentList" entry="acctgTransPayment">
             <set field="copyAcctgTransCtx.fromAcctgTransId" from-field="acctgTransPayment.acctgTransId"/>
             <set field="copyAcctgTransCtx.revert" value="Y"/>
-            <call-service service-name="copyAcctgTransAndEntries" in-map-name="copyAcctgTransCtx"/>
+            <call-service service-name="copyAcctgTransAndEntries" in-map-name="copyAcctgTransCtx">
+                <result-to-field field="postAcctgTransMap.acctgTransId" result-name="acctgTransId"/>
+            </call-service>
+            <if-compare field="acctgTransPayment.isPosted" operator="equals" value="Y">
+                <call-service service-name="postAcctgTrans" in-map-name="postAcctgTransMap"/>
+            </if-compare>
+            <clear-field field="postAcctgTransMap"/>
         </iterate>
     </simple-method>