Author: apatel
Date: Wed Jul 29 05:35:29 2009
New Revision: 798786
URL:
http://svn.apache.org/viewvc?rev=798786&view=revLog:
PaymentMethodType is not required for the search. Fixed script to fit the requirements.
Modified:
ofbiz/trunk/applications/accounting/webapp/accounting/WEB-INF/actions/payment/DepositWithdrawPayments.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=798786&r1=798785&r2=798786&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 Wed Jul 29 05:35:29 2009
@@ -22,13 +22,15 @@
import org.ofbiz.entity.condition.EntityOperator;
List exprListForParameters = [];
-if (paymentMethodTypeId) {
+
partyCond = EntityCondition.makeCondition([EntityCondition.makeCondition("partyIdTo", EntityOperator.EQUALS, organizationPartyId),
EntityCondition.makeCondition("partyIdFrom", EntityOperator.EQUALS, organizationPartyId)], EntityOperator.OR);
statusCond = EntityCondition.makeCondition([EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_RECEIVED"),
EntityCondition.makeCondition("statusId", EntityOperator.EQUALS, "PMNT_SENT")], EntityOperator.OR);
-
+
+ if (paymentMethodTypeId) {
exprListForParameters.add(EntityCondition.makeCondition("paymentMethodTypeId", EntityOperator.EQUALS, paymentMethodTypeId));
+ }
if (fromDate) {
exprListForParameters.add(EntityCondition.makeCondition("effectiveDate", EntityOperator.GREATER_THAN_EQUAL_TO, fromDate));
}
@@ -58,5 +60,4 @@
context.paymentList = paymentListWithCreditCard;
} else {
context.paymentList = paymentListWithoutCreditCard;
- }
-}
\ No newline at end of file
+ }
\ No newline at end of file