Skip to content

Commit

Permalink
Merge pull request #162 from bahlo/skip-future-transactions
Browse files Browse the repository at this point in the history
Skip future transactions
  • Loading branch information
bahlo authored Aug 23, 2021
2 parents fe4cabc + 2eda62a commit 5b2ddda
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ing_ynab/ynab.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,11 @@ def transform_transactions(
for transaction in transactions:
data = transaction.data

# ING sometimes adds transactions that are dated to the future.
# YNAB doesn't support this, so since the transaction already
# happened anyway, we're overriding the date.
transaction_date = data["date"]
if transaction_date > date.today():
transaction_date = date.today()
# This is a future transaction, skip it. We'll import it at the
# day it actually occurs.
continue

milliunits_amount = int(data["amount"].amount * Decimal("1000.0"))
similar_transactions = [
Expand Down

0 comments on commit 5b2ddda

Please sign in to comment.