Added the order to the search report.
This commit is contained in:
parent
d28bdf2064
commit
a0fba6387f
@ -68,7 +68,10 @@ class EntryCollector:
|
|||||||
except ArithmeticError:
|
except ArithmeticError:
|
||||||
pass
|
pass
|
||||||
conditions.append(sa.or_(*sub_conditions))
|
conditions.append(sa.or_(*sub_conditions))
|
||||||
return JournalEntry.query.filter(*conditions)\
|
return JournalEntry.query.join(Transaction).filter(*conditions)\
|
||||||
|
.order_by(Transaction.date,
|
||||||
|
JournalEntry.is_debit,
|
||||||
|
JournalEntry.no)\
|
||||||
.options(selectinload(JournalEntry.account),
|
.options(selectinload(JournalEntry.account),
|
||||||
selectinload(JournalEntry.currency),
|
selectinload(JournalEntry.currency),
|
||||||
selectinload(JournalEntry.transaction)).all()
|
selectinload(JournalEntry.transaction)).all()
|
||||||
|
Loading…
Reference in New Issue
Block a user