You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2009/11/24 10:10:22 UTC

svn commit: r883628 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/payment/PaymentServices.xml servicedef/services_payment.xml widget/FinAccountForms.xml

Author: ashish
Date: Tue Nov 24 09:10:21 2009
New Revision: 883628

URL: http://svn.apache.org/viewvc?rev=883628&view=rev
Log:
Applied patch from jira OFBIZ-3241 - Cancel Payment Batch - Need to correct error message.
At https://demo.ofbiz.org/ar/control/FindArPaymentGroups
When try to cancel a payment batch which is associated to active reconciliation. Then it is showing success message that "Action is performed successfully", instead of this, it must show error message which inform user that Payment batch associated to Reconciliation can not be cancelled. It is needed to show right message.

Thanks Surya & Sumit for the contribution.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_payment.xml
    ofbiz/trunk/applications/accounting/widget/FinAccountForms.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=883628&r1=883627&r2=883628&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 Tue Nov 24 09:10:21 2009
@@ -477,9 +477,17 @@
         <entity-and entity-name="PaymentGroupMember" list="paymentGroupMembers">
             <field-map field-name="paymentGroupId"/>
         </entity-and>
-        <call-service service-name="getPaymentGroupReconciliationId" in-map-name="parameters">
-            <result-to-field result-name="glReconciliationId"/>
-        </call-service>
+        <set field="isGlReconciliationId" value="${parameters.glReconciliationId == 'null'}" type="Boolean"/>
+        <if-compare field="isGlReconciliationId" operator="equals" value="true" type="Boolean">
+            <set-service-fields service-name="getPaymentGroupReconciliationId" map="parameters" to-map="getPaymentGroupReconciliationIdMap"/>
+            <set field="getPaymentGroupReconciliationIdMap.paymentGroupId"  from-field="paymentGroupId"/>
+            <call-service service-name="getPaymentGroupReconciliationId" in-map-name="getPaymentGroupReconciliationIdMap">
+                <result-to-field result-name="glReconciliationId"/>
+            </call-service>
+        <else>
+            <set field="glReconciliationId" from-field="parameters.glReconciliationId"/>    
+        </else>
+        </if-compare>
         <if-empty field="glReconciliationId">
             <iterate list="paymentGroupMembers" entry="paymentGroupMember">
                 <set-service-fields service-name="expirePaymentGroupMember" map="paymentGroupMember" to-map="expirePaymentGroupMemberMap"/>

Modified: ofbiz/trunk/applications/accounting/servicedef/services_payment.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_payment.xml?rev=883628&r1=883627&r2=883628&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_payment.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_payment.xml Tue Nov 24 09:10:21 2009
@@ -161,6 +161,7 @@
             location="component://accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml" invoke="cancelPaymentBatch" auth="true">
         <description>cancel payment batch</description>
         <attribute name="paymentGroupId" type="String" mode="IN" optional="false"/>
+        <attribute name="glReconciliationId" type="String" mode="IN" optional="true"/>
     </service>
     <service name="createPaymentAndPaymentGroupForInvoices" engine="simple"
             location="component://accounting/script/org/ofbiz/accounting/payment/PaymentServices.xml" invoke="createPaymentAndPaymentGroupForInvoices" auth="true">

Modified: ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml?rev=883628&r1=883627&r2=883628&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/FinAccountForms.xml Tue Nov 24 09:10:21 2009
@@ -267,6 +267,7 @@
             <hyperlink target="deleteDepositSlip" description="${uiLabelMap.CommonCancel}" also-hidden="false">
                 <parameter param-name="paymentGroupId"/>
                 <parameter param-name="finAccountId"/>
+                <parameter param-name="glReconciliationId"/>
             </hyperlink>
         </field>
     </form>