diff --git a/drcr/journal/views.py b/drcr/journal/views.py
index 7891697..465ccf0 100644
--- a/drcr/journal/views.py
+++ b/drcr/journal/views.py
@@ -19,7 +19,7 @@ from flask import abort, redirect, render_template, request, url_for
from .. import AMOUNT_DPS
from ..database import db
from ..models import Amount, Posting, Transaction, TrialBalancer
-from ..webapp import all_transactions, app
+from ..webapp import all_accounts, all_transactions, app
from .models import BalanceAssertion
from ..statements.models import StatementLineReconciliation
@@ -146,7 +146,7 @@ def balance_assertions():
@app.route('/balance-assertions/new', methods=['GET', 'POST'])
def balance_assertions_new():
if request.method == 'GET':
- return render_template('journal/balance_assertions_edit.html', assertion=None)
+ return render_template('journal/balance_assertions_edit.html', assertion=None, accounts=all_accounts())
quantity = round(float(request.form['amount']) * (10**AMOUNT_DPS))
if request.form['sign'] == 'cr':
@@ -172,7 +172,7 @@ def balance_assertions_edit():
abort(404)
if request.method == 'GET':
- return render_template('journal/balance_assertions_edit.html', assertion=assertion)
+ return render_template('journal/balance_assertions_edit.html', assertion=assertion, accounts=all_accounts())
if request.form.get('action', None) == 'delete':
# Delete balance assertion
diff --git a/drcr/static/js/combobox.js b/drcr/static/js/combobox.js
new file mode 100644
index 0000000..755e65f
--- /dev/null
+++ b/drcr/static/js/combobox.js
@@ -0,0 +1,64 @@
+/* DrCr: Web-based double-entry bookkeeping framework
+ Copyright (C) 2022–2024 Lee Yingtong Li (RunasSudo)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Affero General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Affero General Public License for more details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see