Skip to content
Snippets Groups Projects
Commit 44d9fa23 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

Fixed #157 - repeating payment entries are not isnerted for future months

parent b1e8a64f
No related branches found
No related tags found
1 merge request!160merge v1_4_0 into master
......@@ -30,16 +30,18 @@ public class RepeatingPaymentUpdater
for(RepeatingPayment currentPayment : repeatingPayments)
{
DateTime date = now;
int index = latest.indexOf(currentPayment);
if(currentPayment.getRepeatEndDate() != null)
{
DateTime endDate = DateTime.parse(currentPayment.getRepeatEndDate());
if(endDate.isBefore(now))
if(endDate.isBefore(date))
{
now = endDate;
date = endDate;
}
}
ArrayList<DateTime> correctDates = getCorrectRepeatingDates(currentPayment, now);
ArrayList<DateTime> correctDates = getCorrectRepeatingDates(currentPayment, date);
if(index != -1)
{
LatestRepeatingPayment currentLatest = latest.get(index);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment