Renamed the "journal_entry_date" parameter to "date" in the show_journal_entry_order route.
This commit is contained in:
parent
2986c518ce
commit
8d412ec00a
@ -186,19 +186,19 @@ def delete_journal_entry(journal_entry: JournalEntry) -> redirect:
|
||||
return redirect(or_next(__get_default_page_uri()))
|
||||
|
||||
|
||||
@bp.get("dates/<date:journal_entry_date>", endpoint="order")
|
||||
@bp.get("dates/<date:date>", endpoint="order")
|
||||
@has_permission(can_view)
|
||||
def show_journal_entry_order(journal_entry_date: dt.date) -> str:
|
||||
def show_journal_entry_order(date: dt.date) -> str:
|
||||
"""Shows the order of the journal entries in a same date.
|
||||
|
||||
:param journal_entry_date: The date.
|
||||
:param date: The date.
|
||||
:return: The order of the journal entries in the date.
|
||||
"""
|
||||
journal_entries: list[JournalEntry] = JournalEntry.query \
|
||||
.filter(JournalEntry.date == journal_entry_date) \
|
||||
.filter(JournalEntry.date == date) \
|
||||
.order_by(JournalEntry.no).all()
|
||||
return render_template("accounting/journal-entry/order.html",
|
||||
date=journal_entry_date, list=journal_entries)
|
||||
date=date, list=journal_entries)
|
||||
|
||||
|
||||
@bp.post("dates/<date:date>", endpoint="sort")
|
||||
|
@ -36,7 +36,7 @@ First written: 2023/2/26
|
||||
{{ A_("Edit") }}
|
||||
</a>
|
||||
{% endif %}
|
||||
<a class="btn btn-primary" role="button" href="{{ url_for("accounting.journal-entry.order", journal_entry_date=obj.date)|accounting_append_next }}">
|
||||
<a class="btn btn-primary" role="button" href="{{ url_for("accounting.journal-entry.order", date=obj.date)|accounting_append_next }}">
|
||||
<i class="fa-solid fa-bars-staggered"></i>
|
||||
<span class="d-none d-md-inline">{{ A_("Order") }}</span>
|
||||
</a>
|
||||
|
Loading…
Reference in New Issue
Block a user