GDDate date = new GDDate(incoming.getNextPaymentDate());
int frequency = incoming.getFrequency();
if(incoming.getNumberOfOcurrencies() > 0){
int i = 1;
while (i <= incoming.getNumberOfOcurrencies()) {
if ( date.afterOrEqualsDay(fromDate) && date.beforeOrEqualsDay(toDate) ){
// Incoming myBill = new Incoming(incoming.getId(), incoming.getDescription(), new GDDate(date), incoming.getFrequency(), incoming.getNumberOfOcurrencies(), incoming.getValue(), incoming.isFixedValue(), incoming.getCategoryId(), incoming.getObservation());
Incoming myBill = new Incoming(incoming.getId(), incoming.getDescription(), new GDDate(date), incoming.getFrequency(), incoming.getNumberOfOcurrencies(), incoming.getValue(), incoming.isFixedValue(), incoming.getCategoryId(), incoming.getObservation(),incoming.getFirstPaymentDate(),incoming.getLastPaymentDate());
list.add(myBill);
}
date = skip(date, frequency);