ItEr57S16EscaladoPantallaGanttEmpresa: Changed the behaviour of the time filter in the company view.

Now the start date of the filter is compared with the end date of the orders,
and the end date of the filter is compared with the start date of the order.
This commit is contained in:
Jacobo Aragunde Pérez 2010-05-07 14:29:59 +02:00 committed by Javier Moran Rua
parent 387a175197
commit 9f3b856c0a

View file

@ -195,20 +195,14 @@ public class OrderPredicate implements IPredicate {
if ((initDate == null) && (startDate == null)) {
return true;
}
return isInTheRangeFilterDates(initDate);
return isLowerToFinishDate(initDate, finishDate);
}
protected boolean acceptFinishDate(Date deadLine) {
if ((deadLine == null) && (finishDate == null)) {
return true;
}
return isInTheRangeFilterDates(deadLine);
}
private boolean isInTheRangeFilterDates(Date date) {
// Check if date is into interval between the startdate and finish date
return (isGreaterToStartDate(date, startDate) && isLowerToFinishDate(
date, finishDate));
return isGreaterToStartDate(deadLine, startDate);
}
private boolean isGreaterToStartDate(Date date, Date startDate) {