1
0
Fork 0

Improve handling of backdated transactions

Sometimes transactions show up in the export with the previous day's
date.  When this happens, these transactions may get skipped, since they
might have the same date as the most recent transaction in Firefly.  To
help avoid skipping transactions, we need the start date to be the same
as the most recent transaction, rather than the next day.  This can
cause duplicate imports, though, but fortunately, the Firefly Data
Importer handles this fairly well.
master
Dustin 2023-12-02 13:09:12 -06:00
parent 6091666471
commit 7e8fae14e6
1 changed files with 3 additions and 3 deletions

View File

@ -199,7 +199,7 @@ def get_last_transaction_date(key: int, token: str) -> datetime.date:
continue
if date > last_date:
last_date = date
return last_date.date() + datetime.timedelta(days=1)
return last_date.date()
def download_chase(
@ -215,7 +215,7 @@ def download_chase(
e,
)
return False
if start_date >= end_date:
if start_date > end_date:
log.info(
'Skipping Chase account: last transaction was %s',
start_date,
@ -247,7 +247,7 @@ def download_commerce(
e,
)
continue
if start_date >= end_date:
if start_date > end_date:
log.info(
'Skipping account %s: last transaction was %s',
name,