Compare commits

..

2 Commits

2 changed files with 6 additions and 2 deletions

View File

@ -72,8 +72,8 @@ def get_selectable_original_line_items(
line_items: list[JournalEntryLineItem] = JournalEntryLineItem.query\
.filter(JournalEntryLineItem.id.in_({x for x in net_balances}))\
.join(JournalEntry)\
.order_by(JournalEntry.date, JournalEntryLineItem.is_debit,
JournalEntryLineItem.no)\
.order_by(JournalEntry.date, JournalEntry.no,
JournalEntryLineItem.is_debit, JournalEntryLineItem.no)\
.options(selectinload(JournalEntryLineItem.currency),
selectinload(JournalEntryLineItem.account),
selectinload(JournalEntryLineItem.journal_entry)).all()

View File

@ -30,9 +30,13 @@ from flask_wtf import CSRFProtect
from sqlalchemy import Column
bp: Blueprint = Blueprint("home", __name__)
"""The global blueprint."""
babel_js: BabelJS = BabelJS()
"""The Babel JavaScript instance."""
csrf: CSRFProtect = CSRFProtect()
"""The CSRF protector."""
db: SQLAlchemy = SQLAlchemy()
"""The database instance."""
def create_app(is_testing: bool = False) -> Flask: