Author: apatel
Date: Sat Jul 25 12:02:28 2009
New Revision: 797756

URL: http://svn.apache.org/viewvc?rev=797756&view=rev
Log:
Now have ability to filter batch payments by finAccountId.

Modified:
    
ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy
    ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml
    ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml

Modified: 
ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy?rev=797756&r1=797755&r2=797756&view=diff
==============================================================================
--- 
ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy
 (original)
+++ 
ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy
 Sat Jul 25 12:02:28 2009
@@ -23,7 +23,7 @@
 import org.ofbiz.entity.condition.EntityOperator;
 
 List paymentCond = [];
-if (paymentMethodTypeId) {
+if (paymentMethodTypeId && finAccountId) {
     paymentCond.add(EntityCondition.makeCondition("paymentMethodTypeId", 
EntityOperator.EQUALS, paymentMethodTypeId));
     if (fromDate) {
         paymentCond.add(EntityCondition.makeCondition("effectiveDate", 
EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
@@ -37,6 +37,12 @@
     if (organizationPartyId) {
         paymentCond.add(EntityCondition.makeCondition("partyIdTo", 
EntityOperator.EQUALS, organizationPartyId));
     }
+    
+    finAccountTransList = delegator.findList("FinAccountTrans", 
EntityCondition.makeCondition([finAccountId : finAccountId]), null, null, null, 
false);
+    if (finAccountTransList) {
+        finAccountTransIds = 
EntityUtil.getFieldListFromEntityList(finAccountTransList, "finAccountTransId", 
true);
+        paymentCond.add(EntityCondition.makeCondition("finAccountTransId", 
EntityOperator.IN, finAccountTransIds));
+    }
     payments = delegator.findList("Payment", 
EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, 
null, false);
     paymentListWithCreditCard = [];
     paymentListWithoutCreditCard = [];
@@ -61,4 +67,4 @@
             context.paymentList = paymentListWithoutCreditCard;
         }
     }
-}
\ No newline at end of file
+}

Modified: ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml?rev=797756&r1=797755&r2=797756&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml 
(original)
+++ ofbiz/trunk/applications/accounting/widget/ar/ArPaymentScreens.xml Sat Jul 
25 12:02:28 2009
@@ -61,6 +61,7 @@
                 <set field="headerItem" value="payments"/>
                 <set field="tabButtonItem" value="batchPayments"/>
                 <set field="paymentMethodTypeId" 
from-field="parameters.paymentMethodTypeId"/>
+                <set field="finAccountId" 
from-field="parameters.finAccountId"/>
                 <set field="cardType" from-field="parameters.cardType"/>
                 <set field="fromDate" type="Timestamp" 
from-field="parameters.fromDate"/>
                 <set field="thruDate" type="Timestamp" 
from-field="parameters.thruDate"/>
@@ -90,4 +91,4 @@
             </widgets>
         </section>
     </screen>
-</screens>
\ No newline at end of file
+</screens>

Modified: ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml?rev=797756&r1=797755&r2=797756&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml 
(original)
+++ ofbiz/trunk/applications/accounting/widget/ar/forms/ArPaymentForms.xml Sat 
Jul 25 12:02:28 2009
@@ -25,6 +25,14 @@
         <actions>
             <set field="organizationPartyId" from-field="organizationPartyId" 
default-value="${defaultOrganizationPartyId}"/>
         </actions>
+        <field name="finAccountId">
+            <drop-down>
+                <entity-options entity-name="FinAccount" 
description="${finAccountName} [${finAccountId}]" filter-by-date="true">
+                    <entity-constraint name="ownerPartyId" 
env-name="organizationPartyId"/>
+                    <entity-constraint name="finAccountTypeId" 
value="BANK_ACCOUNT"/>
+                </entity-options>
+            </drop-down>
+        </field>
         <field name="paymentMethodTypeId" 
title="${uiLabelMap.FormFieldTitle_paymentMethodTypeId}*" required-field="true">
             <drop-down allow-empty="false">
                 <entity-options entity-name="PaymentMethodType" 
description="${description}">
@@ -48,4 +56,4 @@
         <field name="thruDate"><date-time/></field>
         <field name="submitButton" title="${uiLabelMap.CommonFind}" 
widget-style="smallSubmit"><submit button-type="button"/></field>
     </form>
-</forms>
\ No newline at end of file
+</forms>


Reply via email to