Fixed genUpcomingInvoices()