Renamed the "journal_entry_date" parameter to "date" in the sort_journal_entries route.
This commit is contained in:
parent
f1351243a6
commit
2986c518ce
@ -201,16 +201,16 @@ def show_journal_entry_order(journal_entry_date: dt.date) -> str:
|
|||||||
date=journal_entry_date, list=journal_entries)
|
date=journal_entry_date, list=journal_entries)
|
||||||
|
|
||||||
|
|
||||||
@bp.post("dates/<date:journal_entry_date>", endpoint="sort")
|
@bp.post("dates/<date:date>", endpoint="sort")
|
||||||
@has_permission(can_edit)
|
@has_permission(can_edit)
|
||||||
def sort_journal_entries(journal_entry_date: dt.date) -> redirect:
|
def sort_journal_entries(date: dt.date) -> redirect:
|
||||||
"""Reorders the journal entries in a date.
|
"""Reorders the journal entries in a date.
|
||||||
|
|
||||||
:param journal_entry_date: The date.
|
:param date: The date.
|
||||||
:return: The redirection to the incoming account or the account list. The
|
:return: The redirection to the incoming account or the account list. The
|
||||||
reordering operation does not fail.
|
reordering operation does not fail.
|
||||||
"""
|
"""
|
||||||
form: JournalEntryReorderForm = JournalEntryReorderForm(journal_entry_date)
|
form: JournalEntryReorderForm = JournalEntryReorderForm(date)
|
||||||
form.save_order()
|
form.save_order()
|
||||||
if not form.is_modified:
|
if not form.is_modified:
|
||||||
flash(s(lazy_gettext("The order was not modified.")), "success")
|
flash(s(lazy_gettext("The order was not modified.")), "success")
|
||||||
|
@ -38,7 +38,7 @@ First written: 2023/2/26
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if list|length > 1 and accounting_can_edit() %}
|
{% if list|length > 1 and accounting_can_edit() %}
|
||||||
<form action="{{ url_for("accounting.journal-entry.sort", journal_entry_date=date) }}" method="post">
|
<form action="{{ url_for("accounting.journal-entry.sort", date=date) }}" method="post">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||||
{% if request.args.next %}
|
{% if request.args.next %}
|
||||||
<input type="hidden" name="next" value="{{ request.args.next }}">
|
<input type="hidden" name="next" value="{{ request.args.next }}">
|
||||||
|
Loading…
Reference in New Issue
Block a user