{% extends "base.html" %} {% comment %} The Mia Accounting Application transaction-sort.html: The template to sort transactions in a same day Copyright (c) 2020 imacat. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Author: imacat@mail.imacat.idv.tw (imacat) First written: 2020/8/6 {% endcomment %} {% load static %} {% load i18n %} {% load humanize %} {% load mia_core %} {% load accounting %} {% block settings %} {% blocktrans asvar title with date=form.date|smart_date %}Reorder the Transactions in {{ date }}{% endblocktrans %} {% setvar "title" title %} {% add_lib "jquery-ui" %} {% static "accounting/css/report.css" as file %}{% add_css file %} {% static "accounting/css/transactions-sort.css" as file %}{% add_css file %} {% static "accounting/js/transaction-sort.js" as file %}{% add_js file %} {% endblock %} {% block content %}
{{ _("Back")|force_escape }}
{{ form.date|smart_date }}
{% if form.txn_list|length > 1 %}
{% csrf_token %} {% for txn in form.txn_list %} {% endfor %}
{{ _("Type")|force_escape }} {{ _("Content")|force_escape }} {{ _("Amount")|force_escape }} {{ _("Notes")|force_escape }}
{% if txn.is_cash_expense %} {{ _("Cash Expense")|force_escape }} {% elif txn.is_cash_income %} {{ _("Cash Income")|force_escape }} {% else %} {{ _("Transfer")|force_escape }} {% endif %} {% if txn.is_cash_expense %}
    {% for summary in txn.debit_summaries %}
  • {{ summary }}
  • {% endfor %}
{% elif txn.is_cash_income %}
    {% for summary in txn.credit_summaries %}
  • {{ summary }}
  • {% endfor %}
{% else %}
    {% for summary in txn.debit_summaries %}
  • {{ summary }}
  • {% endfor %}
    {% for summary in txn.credit_summaries %}
  • {{ summary }}
  • {% endfor %}
{% endif %} {% if not txn.is_balanced %} {{ _("Unbalanced")|force_escape }} {% endif %}
{{ txn.amount|accounting_amount }} {{ txn.notes|default:"" }}
{% endif %} {% endblock %}