mirror of
https://github.com/eitchtee/WYGIWYH.git
synced 2026-04-22 00:28:36 +02:00
feat: show account group on account reconciliation form
This commit is contained in:
@@ -122,6 +122,7 @@ class AccountBalanceForm(forms.Form):
|
||||
self.currency_prefix = self.initial.get("prefix", "")
|
||||
self.currency_decimal_places = self.initial.get("decimal_places", 2)
|
||||
self.account_name = self.initial.get("account_name", "")
|
||||
self.account_group = self.initial.get("account_group", None)
|
||||
self.current_balance = self.initial.get("current_balance", 0)
|
||||
|
||||
self.helper = FormHelper()
|
||||
|
||||
@@ -31,13 +31,14 @@ def account_reconciliation(request):
|
||||
initial_data = [
|
||||
{
|
||||
"account_id": account.id,
|
||||
"account_group": account.group,
|
||||
"account_name": account.name,
|
||||
"decimal_places": account.currency.decimal_places,
|
||||
"suffix": account.currency.suffix,
|
||||
"prefix": account.currency.prefix,
|
||||
"current_balance": get_account_balance(account),
|
||||
}
|
||||
for account in Account.objects.all().select_related("currency")
|
||||
for account in Account.objects.all().select_related("currency", "group")
|
||||
]
|
||||
|
||||
if request.method == "POST":
|
||||
|
||||
Reference in New Issue
Block a user