details:   https://code.openbravo.com/erp/devel/pi/rev/155508a56bac
changeset: 16682:155508a56bac
user:      David Miguelez <david.miguelez <at> openbravo.com>
date:      Tue May 29 09:00:49 2012 +0200
summary:   Fixes issue 0020612: Now filters transactions using the due date 
field.

diffstat:

 
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
 |  15 ++++++++--
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (46 lines):

diff -r f94acbb414d4 -r 155508a56bac 
modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
--- 
a/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
        Tue May 29 08:46:02 2012 +0200
+++ 
b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
        Tue May 29 09:00:49 2012 +0200
@@ -581,7 +581,7 @@
           strOrg, strcBPartnerIdIN, strFinancialAccountId, 
strDocumentDateFrom, strDocumentDateTo,
           strPaymentDateFrom, strPaymentDateTo, strAmountFrom, strAmountTo, 
strcBPGroupIdIN,
           strcProjectIdIN, strfinPaymSt, strcCurrency, strPaymType, 
strGroupCrit, strOrdCrit,
-          strcNoBusinessPartner);
+          strcNoBusinessPartner, strDueDateFrom, strDueDateTo);
 
       transactionData = 
FieldProviderFactory.getFieldProviderArray(transactionsList);
       int totalTransElements = transactionsList.size();
@@ -1511,7 +1511,8 @@
       String strDocumentDateFrom, String strDocumentDateTo, String 
strPaymentDateFrom,
       String strPaymentDateTo, String strAmountFrom, String strAmountTo, 
String strcBPGroupIdIN,
       String strcProjectIdIN, String strfinPaymSt, String strcCurrency, String 
strPaymType,
-      String strGroupCrit, String strOrdCrit, String strcNoBusinessPartner) {
+      String strGroupCrit, String strOrdCrit, String strcNoBusinessPartner, 
String strDueDateFrom,
+      String strDueDateTo) {
     Organization[] organizations;
     if (strInclSubOrg.equalsIgnoreCase("include")) {
       Set<String> orgChildTree = 
OBContext.getOBContext().getOrganizationStructureProvider()
@@ -1589,7 +1590,7 @@
             .getInstance().get(FIN_FinancialAccount.class, 
strFinancialAccountId)));
       }
 
-      // Document Date & Payment Date
+      // Document Date, Payment Date & Due Date
       if (!strDocumentDateFrom.equals("")) {
         
obCriteriaTrans.add(Restrictions.ge(FIN_FinaccTransaction.PROPERTY_DATEACCT,
             FIN_Utility.getDate(strDocumentDateFrom)));
@@ -1606,6 +1607,14 @@
         
obCriteriaTrans.add(Restrictions.le(FIN_FinaccTransaction.PROPERTY_DATEACCT,
             FIN_Utility.getDate(strPaymentDateTo)));
       }
+      if (!strDueDateFrom.equals("")) {
+        
obCriteriaTrans.add(Restrictions.ge(FIN_FinaccTransaction.PROPERTY_DATEACCT,
+            FIN_Utility.getDate(strDueDateFrom)));
+      }
+      if (!strDueDateTo.equals("")) {
+        
obCriteriaTrans.add(Restrictions.le(FIN_FinaccTransaction.PROPERTY_DATEACCT,
+            FIN_Utility.getDate(strDueDateFrom)));
+      }
 
       // Amount
       if (!strAmountFrom.equals("")) {

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to