svn commit: r799202 - in /ofbiz/trunk/applications/accounting/webapp: accounting/WEB-INF/actions/payment/DepositWithdrawPayments.groovy ar/WEB-INF/actions/BatchPayments.groovy

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

svn commit: r799202 - in /ofbiz/trunk/applications/accounting/webapp: accounting/WEB-INF/actions/payment/DepositWithdrawPayments.groovy ar/WEB-INF/actions/BatchPayments.groovy

apatel-2
Author: apatel
Date: Thu Jul 30 08:38:10 2009
New Revision: 799202

URL: http://svn.apache.org/viewvc?rev=799202&view=rev
Log:
No functional changes. Formating code.

Modified:
    ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/DepositWithdrawPayments.groovy
    ofbiz/trunk/applications/accounting/webapp/ar/WEB-INF/actions/BatchPayments.groovy

Modified: ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/DepositWithdrawPayments.groovy
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/DepositWithdrawPayments.groovy?rev=799202&r1=799201&r2=799202&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/DepositWithdrawPayments.groovy (original)
+++ ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/DepositWithdrawPayments.groovy Thu Jul 30 08:38:10 2009
@@ -21,7 +21,7 @@
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityOperator;
 if ("Y".equals(parameters.noConditionFind)) {
-List exprListForParameters = [];
+    List exprListForParameters = [];
 
     partyCond = EntityCondition.makeCondition([EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, organizationPartyId),
                                                EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, organizationPartyId)], EntityOperator.OR);
@@ -61,4 +61,4 @@
     } else {
         context.paymentList = paymentListWithoutCreditCard;
     }
-}
\ No newline at end of file
+}

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=799202&r1=799201&r2=799202&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 Thu Jul 30 08:38:10 2009
@@ -22,52 +22,52 @@
 import org.ofbiz.entity.condition.EntityCondition;
 import org.ofbiz.entity.condition.EntityOperator;
 if ("Y".equals(parameters.noConditionFind)) {
-List paymentCond = [];
-if (paymentMethodTypeId) {
-    paymentCond.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodTypeId));
-}
-if (fromDate) {
-    paymentCond.add(EntityCondition.makeCondition("effectiveDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
-}
-if (thruDate) {
-    paymentCond.add(EntityCondition.makeCondition("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate));
-}
-if (partyIdFrom) {
-    paymentCond.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, partyIdFrom));
-}
-if (organizationPartyId) {
-    paymentCond.add(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, organizationPartyId));
-}
-if (finAccountId) {
-    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));
+    List paymentCond = [];
+    if (paymentMethodTypeId) {
+        paymentCond.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodTypeId));
     }
-} else {
-    paymentCond.add(EntityCondition.makeCondition("finAccountTransId", EntityOperator.NOT_EQUAL, null));
-}
-payments = delegator.findList("Payment", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false);
-paymentListWithCreditCard = [];
-paymentListWithoutCreditCard = [];
-if (payments) {
-    payments.each { payment ->
-        paymentGroupMembers = EntityUtil.filterByDate(delegator.findList("PaymentGroupMember", EntityCondition.makeCondition([paymentId : payment.paymentId]), null, null, null, false));
-        if (!paymentGroupMembers) {
-            if (cardType && payment.paymentMethodId) {
-                creditCard = delegator.findOne("CreditCard", [paymentMethodId : payment.paymentMethodId], false);
-                if (creditCard.cardType == cardType) {
-                    paymentListWithCreditCard.add(payment);
+    if (fromDate) {
+        paymentCond.add(EntityCondition.makeCondition("effectiveDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
+    }
+    if (thruDate) {
+        paymentCond.add(EntityCondition.makeCondition("effectiveDate", EntityOperator.LESS_THAN_EQUAL_TO, thruDate));
+    }
+    if (partyIdFrom) {
+        paymentCond.add(EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, partyIdFrom));
+    }
+    if (organizationPartyId) {
+        paymentCond.add(EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, organizationPartyId));
+    }
+    if (finAccountId) {
+        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));
+        }
+    } else {
+        paymentCond.add(EntityCondition.makeCondition("finAccountTransId", EntityOperator.NOT_EQUAL, null));
+    }
+    payments = delegator.findList("Payment", EntityCondition.makeCondition(paymentCond, EntityOperator.AND), null, null, null, false);
+    paymentListWithCreditCard = [];
+    paymentListWithoutCreditCard = [];
+    if (payments) {
+        payments.each { payment ->
+            paymentGroupMembers = EntityUtil.filterByDate(delegator.findList("PaymentGroupMember", EntityCondition.makeCondition([paymentId : payment.paymentId]), null, null, null, false));
+            if (!paymentGroupMembers) {
+                if (cardType && payment.paymentMethodId) {
+                    creditCard = delegator.findOne("CreditCard", [paymentMethodId : payment.paymentMethodId], false);
+                    if (creditCard.cardType == cardType) {
+                        paymentListWithCreditCard.add(payment);
+                    }
+                } else if (UtilValidate.isEmpty(cardType)) {
+                    paymentListWithoutCreditCard.add(payment);
                 }
-            } else if (UtilValidate.isEmpty(cardType)) {
-                paymentListWithoutCreditCard.add(payment);
             }
         }
+        if (paymentListWithCreditCard) {
+            context.paymentList = paymentListWithCreditCard;
+        } else {
+            context.paymentList = paymentListWithoutCreditCard;
+        }
     }
-    if (paymentListWithCreditCard) {
-        context.paymentList = paymentListWithCreditCard;
-    } else {
-        context.paymentList = paymentListWithoutCreditCard;
-    }
-}
 }