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/19 12:50:25 UTC

svn commit: r805743 - in /ofbiz/trunk/applications/accounting: script/org/ofbiz/accounting/finaccount/ servicedef/ webapp/accounting/WEB-INF/ webapp/accounting/payment/ webapp/ap/WEB-INF/ webapp/ar/WEB-INF/

Author: apatel
Date: Wed Aug 19 10:50:25 2009
New Revision: 805743

URL: http://svn.apache.org/viewvc?rev=805743&view=rev
Log:
Now user can select financial account to making payment (or receiving payment into) while creating payment.

Modified:
    ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
    ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml
    ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml
    ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml

Modified: ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml?rev=805743&r1=805742&r2=805743&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml (original)
+++ ofbiz/trunk/applications/accounting/script/org/ofbiz/accounting/finaccount/FinAccountServices.xml Wed Aug 19 10:50:25 2009
@@ -871,15 +871,21 @@
         <call-service service-name="createPayment" in-map-name="createPaymentMap">
             <result-to-field result-name="paymentId"/>
         </call-service>
-        <if-compare field="parameters.isDepositWithDrawPayment" operator="equals" value="Y">
-            <set-service-fields service-name="createFinAccountTrans" map="parameters" to-map="createFinAccountTransMap"/>
-            <set field="createFinAccountTransMap.paymentId" from-field="paymentId"/>
-            <set field="createFinAccountTransMap.statusId" value="FINACT_TRNS_CREATED"/>
-            <set field="createFinAccountTransMap.partyId" from-field="parameters.partyIdFrom"/>
-            <call-service service-name="createFinAccountTrans" in-map-name="createFinAccountTransMap"/>
-        </if-compare>
-        <field-to-list field="paymentId" list="paymentIds"/>
-        <field-to-result field="paymentIds"/>
+        <if-not-empty field="parameters.finAccountId">
+            <if-compare field="parameters.isDepositWithDrawPayment" operator="equals" value="Y">
+                <set-service-fields service-name="createFinAccountTrans" map="parameters" to-map="createFinAccountTransMap"/>
+                <set field="createFinAccountTransMap.paymentId" from-field="paymentId"/>
+                <set field="createFinAccountTransMap.statusId" value="FINACT_TRNS_CREATED"/>
+                <set field="createFinAccountTransMap.partyId" from-field="parameters.partyIdFrom"/>
+                <call-service service-name="createFinAccountTrans" in-map-name="createFinAccountTransMap">
+                    <result-to-field result-name="finAccountTransId"/>
+                </call-service>
+                <set field="updatePaymentCtx.paymentId" from-field="paymentId"/>
+                <set field="updatePaymentCtx.finAccountTransId" from-field="finAccountTransId"/>
+                <call-service service-name="updatePayment" in-map-name="updatePaymentCtx"/>
+            </if-compare>
+        </if-not-empty>
+        <field-to-result field="paymentId"/>
     </simple-method>
 
     <simple-method method-name="getTransactionTotalByGlReconcileId" short-description="Transaction Total By GlReconcile Id">

Modified: ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml?rev=805743&r1=805742&r2=805743&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml (original)
+++ ofbiz/trunk/applications/accounting/servicedef/services_finaccount.xml Wed Aug 19 10:50:25 2009
@@ -480,10 +480,10 @@
         <description>create new payment and associate with respective financial account in FinAccountTrans Entity.</description>
         <implements service="createPayment"/>
         <attribute name="isDepositWithDrawPayment" type="String" mode="IN" optional="true"/>
-        <attribute name="finAccountId" type="String" mode="IN" optional="false"/>
+        <attribute name="finAccountId" type="String" mode="IN" optional="true"/>
         <attribute name="finAccountTransTypeId" type="String" mode="IN" optional="false"/>
         <attribute name="paymentGroupTypeId" type="String" mode="IN" optional="true"/>
-        <attribute name="paymentIds" type="List" mode="OUT" optional="false"/>
+        <attribute name="paymentId" type="String" mode="OUT" optional="true"/>
     </service>
 
     <service name="getTransactionTotalByGlReconcileId" engine="simple"

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml?rev=805743&r1=805742&r2=805743&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/controller.xml Wed Aug 19 10:50:25 2009
@@ -306,7 +306,7 @@
     </request-map>
     <request-map uri="createPayment">
         <security https="true" auth="true"/>
-        <event type="service" invoke="createPayment"/>
+        <event type="service" invoke="createPaymentAndFinAccountTrans"/>
         <response name="success" type="view" value="editPayment"/>
         <response name="error" type="view" value="newPayment"/>
     </request-map>

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml?rev=805743&r1=805742&r2=805743&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/payment/PaymentForms.xml Wed Aug 19 10:50:25 2009
@@ -124,6 +124,15 @@
         <field name="overrideGlAccountId" position="2"><lookup target-form-name="LookupGlAccount"/></field>
         <field name="amount" position="1"><text/></field>
         <field name="comments" position="2"><text size="70"/></field>
+        <field name="finAccountId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="FinAccount" description="${finAccountName} [${finAccountId}]" filter-by-date="true">
+                    <entity-constraint name="finAccountTypeId" value="BANK_ACCOUNT"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="isDepositWithDrawPayment"><hidden value="Y"/></field>
+        <field name="finAccountTransTypeId"><hidden value="WITHDRAWAL"/></field>
         <field position="1" name="createButton" widget-style="smallSubmit">
             <submit button-type="button"/>
         </field>
@@ -159,6 +168,15 @@
         <field name="overrideGlAccountId" position="2"><lookup target-form-name="LookupGlAccount"/></field>
         <field name="amount" position="1"><text/></field>
         <field name="comments" position="2"><text size="70"/></field>
+        <field name="finAccountId">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="FinAccount" description="${finAccountName} [${finAccountId}]" filter-by-date="true">
+                    <entity-constraint name="finAccountTypeId" value="BANK_ACCOUNT"/>
+                </entity-options>
+            </drop-down>
+        </field>
+        <field name="isDepositWithDrawPayment"><hidden value="Y"/></field>
+        <field name="finAccountTransTypeId"><hidden value="DEPOSIT"/></field>
         <field position="1" name="createButton" widget-style="smallSubmit">
             <submit button-type="button"/>
         </field>

Modified: ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml?rev=805743&r1=805742&r2=805743&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/ap/WEB-INF/controller.xml Wed Aug 19 10:50:25 2009
@@ -83,7 +83,7 @@
     </request-map>
     <request-map uri="createPayment">
         <security https="true" auth="true"/>
-        <event type="service" invoke="createPayment"/>
+        <event type="service" invoke="createPaymentAndFinAccountTrans"/>
         <response name="success" type="view" value="editPayment"/>
         <response name="error" type="view" value="NewOutgoingPayment"/>
     </request-map>

Modified: ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml?rev=805743&r1=805742&r2=805743&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/controller.xml Wed Aug 19 10:50:25 2009
@@ -53,7 +53,7 @@
     </request-map>
     <request-map uri="createPayment">
         <security https="true" auth="true"/>
-        <event type="service" invoke="createPayment"/>
+        <event type="service" invoke="createPaymentAndFinAccountTrans"/>
         <response name="success" type="view" value="editPayment"/>
         <response name="error" type="view" value="NewIncomingPayment"/>
     </request-map>