Changed the transaction operation to return to the default journal instead of the transaction list. The transaction list is to be removed. There is no link to the transaction list at all, and it's layout is undecided.

This commit is contained in:
2023-03-09 06:51:14 +08:00
parent 62716eb545
commit 8fc33131dd
8 changed files with 15 additions and 13 deletions

View File

@ -179,7 +179,7 @@ def delete_transaction(txn: Transaction) -> redirect:
sort_transactions_in(txn.date, txn.id)
db.session.commit()
flash(lazy_gettext("The transaction is deleted successfully."), "success")
return redirect(or_next(url_for("accounting.transaction.list")))
return redirect(or_next(url_for("accounting.report.journal-default")))
@bp.get("/dates/<date:txn_date>", endpoint="order")
@ -210,10 +210,10 @@ def sort_transactions(txn_date: date) -> redirect:
form.save_order()
if not form.is_modified:
flash(lazy_gettext("The order was not modified."), "success")
return redirect(or_next(url_for("accounting.transaction.list")))
return redirect(or_next(url_for("accounting.report.journal-default")))
db.session.commit()
flash(lazy_gettext("The order is updated successfully."), "success")
return redirect(or_next(url_for("accounting.transaction.list")))
return redirect(or_next(url_for("accounting.report.journal-default")))
def __get_detail_uri(txn: Transaction) -> str: