Improve statement form

This commit is contained in:
Edgar P. Burkhart 2025-01-01 19:01:35 +01:00
parent 08551a865d
commit 2991786444
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
5 changed files with 21 additions and 8 deletions

View file

@ -15,6 +15,15 @@ class StatementForm(NummiForm):
"file": NummiFileInput,
}
meta_fieldsets = [
[
["account"],
["start_date", "start_value"],
["date", "value"],
["file"],
],
]
def __init__(self, *args, **kwargs):
_user = kwargs.get("user")
_disable_account = kwargs.pop("disable_account", False)
@ -30,6 +39,7 @@ class StatementForm(NummiForm):
label=_("Add transactions"),
required=False,
)
if _disable_account:
self.fields["account"].disabled = True