details:   https://code.openbravo.com/erp/devel/pi/rev/84f458364b70
changeset: 16163:84f458364b70
user:      Ioritz Cia <ioritz.cia <at> openbravo.com>
date:      Mon Apr 23 17:44:56 2012 +0200
summary:   Fixes issue 20326: Null Pointer Exception error.
Null Pointer Exception when executing report 'Include Empty Business Partner' 
and there is a transaction without payment.

diffstat:

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

diffs (39 lines):

diff -r 1853df5df43d -r 84f458364b70 
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
        Mon Apr 23 14:28:13 2012 +0200
+++ 
b/modules/org.openbravo.financial.paymentreport/src/org/openbravo/financial/paymentreport/erpCommon/ad_reports/PaymentReportDao.java
        Mon Apr 23 17:44:56 2012 +0200
@@ -1407,13 +1407,6 @@
             || (transaction.getCurrency().getISOCode().toString()
                 .compareTo(data.getField("TRANS_CURRENCY")) < 0);
       }
-      if (strOrdCritList[i].contains("Date")) {
-        Date transactionDate = transaction.getDateAcct();
-        Date dataDate = FIN_Utility.getDate(data.getField("DUE_DATE"));
-        if (transactionDate.before(dataDate)) {
-          isBefore = true;
-        }
-      }
       return isBefore;
     } else {
       if (strOrdCritList[i].contains("Project")) {
@@ -1465,17 +1458,13 @@
               strProject);
         }
       } else if (strOrdCritList[i].contains("Date")) {
-        Date transactionDate = transaction.getDateAcct();
-        Date dataDate = FIN_Utility.getDate(data.getField("DUE_DATE"));
-        if (transactionDate.before(dataDate)) {
-          isBefore = true;
-        } else if (transactionDate.equals(dataDate)) {
+        Date dataDate = FIN_Utility.getDate(data.getField("INVOICE_DATE"));
+        if (dataDate != null) {
+          isBefore = false;
+        } else {
           isBefore = isBeforeOrder(transaction, data, strOrdCritList, i + 1, 
BPName, BPCategory,
               strProject);
         }
-      } else {
-        isBefore = isBeforeOrder(transaction, data, strOrdCritList, i + 1, 
BPName, BPCategory,
-            strProject);
       }
       return isBefore;
     }

------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to