Skip to content

Commit

Permalink
Stop suggesting import from legacy accounts
Browse files Browse the repository at this point in the history
Also select membership fee bank account by default.
  • Loading branch information
FestplattenSchnitzel committed May 28, 2024
1 parent 5198d43 commit 102c75a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/blueprints/finance/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def flash_fints_errors() -> t.Iterator[None]:
def bank_accounts_import() -> ResponseReturnValue:
form = BankAccountActivitiesImportForm()
form.account.choices = [
(acc.id, acc.name) for acc in get_all_bank_accounts(session)
(acc.id, acc.name) for acc in get_all_bank_accounts(session) if not acc.account.legacy
]
imported = ImportedTransactions([], [], [])

Expand All @@ -287,6 +287,8 @@ def display_form_response(
if not form.is_submitted():
del (form.start_date)
form.end_date.data = date.today() - timedelta(days=1)
form.account.data = config.membership_fee_bank_account_id

return display_form_response(imported)

if not form.validate():
Expand Down

0 comments on commit 102c75a

Please sign in to comment.