Skip to content

Commit

Permalink
Use value_date instead booking_date for transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
axeoman committed Aug 27, 2023
1 parent b4d7a63 commit a8461d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ynab_sync/logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def prepare_ynab_transactions(gocardless_bank_data: GoCardlessBankAccountData, y
occurances = defaultdict(int)
for gocardless_transaction in gocardless_bank_data.transactions.booked:
amount = int(gocardless_transaction.transaction_amount.amount * 1000)
ynab_import_key = f"YNAB:{amount}:{gocardless_transaction.booking_date}"
ynab_import_key = f"YNAB:{amount}:{gocardless_transaction.value_date}"

memo = (
gocardless_transaction.remittance_information_unstructured
Expand All @@ -52,7 +52,7 @@ def prepare_ynab_transactions(gocardless_bank_data: GoCardlessBankAccountData, y
transactions.append(
YNABTransaction(
account_id=ynab_account_id,
date=gocardless_transaction.booking_date,
date=gocardless_transaction.value_date,
amount=amount,
payee_name=gocardless_transaction.creditor_name or gocardless_transaction.debtor_name or "",
memo=memo,
Expand Down

0 comments on commit a8461d5

Please sign in to comment.