Commit c34f48e7 authored by Bruno Chabrier's avatar Bruno Chabrier

Improved previous year date detection - Closes #205

parent 76b5066d
Pipeline #1948 passed with stages
in 16 minutes and 33 seconds
...@@ -333,7 +333,7 @@ class AccountHistory(LoggedPage, NotTransferBasePage): ...@@ -333,7 +333,7 @@ class AccountHistory(LoggedPage, NotTransferBasePage):
# Need to do it when years/date overlap, causing the previous `.replace()` to # Need to do it when years/date overlap, causing the previous `.replace()` to
# set the date at the end of the next year instead of the current year # set the date at the end of the next year instead of the current year
if old_debit_date is None and self.debit_date > datetime.date.today(): if old_debit_date is None and self.debit_date > datetime.date.today():
old_debit_date = self.debit_date old_debit_date = self.debit_date - datetime.timedelta(days=1)
if old_debit_date is not None: if old_debit_date is not None:
while self.debit_date > old_debit_date: while self.debit_date > old_debit_date:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment