details:   https://code.openbravo.com/erp/devel/pi/rev/84c38ca5cfb1
changeset: 22903:84c38ca5cfb1
user:      Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> 
openbravo.com>
date:      Wed Apr 23 14:26:47 2014 +0530
summary:   Related to Issue 26130: Code Review changes

diffstat:

 src/org/openbravo/financial/ResetAccounting.java |  6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)

diffs (16 lines):

diff -r bb6effdf9789 -r 84c38ca5cfb1 
src/org/openbravo/financial/ResetAccounting.java
--- a/src/org/openbravo/financial/ResetAccounting.java  Tue Apr 22 18:24:23 
2014 +0200
+++ b/src/org/openbravo/financial/ResetAccounting.java  Wed Apr 23 14:26:47 
2014 +0530
@@ -368,10 +368,8 @@
     String myQuery = "select distinct p from FinancialMgmtPeriodControl e left 
join e.period p left join p.year y left join y.calendar c where c.id = 
:calendarId and e.client.id = :clientId and e.documentCategory = :docbasetype 
and e.periodStatus = 'O' and e.organization.id = :orgPeriodControl";
 
     if (!("".equals(datefrom)) && !("".equals(dateto))) {
-      myQuery = myQuery + " and ((p.startingDate between :dateFrom and 
:dateTo";
-      myQuery = myQuery + " or p.endingDate between :dateFrom and :dateTo)";
-      myQuery = myQuery + " or (p.startingDate <= :dateFrom";
-      myQuery = myQuery + " and p.endingDate >= :dateTo))";
+      myQuery = myQuery + " and p.startingDate <= :dateTo";
+      myQuery = myQuery + " and p.endingDate >= :dateFrom";
     } else if (!("".equals(datefrom)) && ("".equals(dateto))) {
       myQuery = myQuery + " and p.endingDate >= :dateFrom";
     } else if (("".equals(datefrom)) && !("".equals(dateto))) {

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to