From 102c75a39184c132b66097f23d6b3aaa5d08040d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregor=20D=C3=BCster?= Date: Tue, 28 May 2024 12:45:03 +0200 Subject: [PATCH] Stop suggesting import from legacy accounts Also select membership fee bank account by default. --- web/blueprints/finance/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/blueprints/finance/__init__.py b/web/blueprints/finance/__init__.py index b116d243c..1a6e81231 100644 --- a/web/blueprints/finance/__init__.py +++ b/web/blueprints/finance/__init__.py @@ -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([], [], []) @@ -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():