break;
}
}
}
}
SortComparator comparator = new SortComparator();
Collections.sort(listExpenditure, comparator);
} else {
Map<String, Incoming> map = (Map<String, Incoming>) system.query(new GetIncoming());
listIncoming = new ArrayList<Incoming>();
for (Incoming incoming : map.values()) {
if (incoming.isActive()) {
GDDate date = new GDDate(incoming.getNextPaymentDate());
int frequency = incoming.getFrequency();
while (date.beforeOrEqualsDay(endDate)) {
if (date.afterOrEqualsDay(beginDate)) {
Incoming myBill = new Incoming(incoming.getId(), incoming.getDescription(), new GDDate(date), incoming.getFrequency(), incoming.getNumberOfOcurrencies(), incoming.getValue(), incoming.isFixedValue(), incoming.getCategoryId(), incoming.getObservation());
listIncoming.add(myBill);
}
date = skip(date, frequency);
if (date == null) {
break;
}
}
}
}
SortComparator comparator = new SortComparator();
Collections.sort(listIncoming, comparator);
}
int total = 0;