117 lines
4.5 KiB
HTML
117 lines
4.5 KiB
HTML
{#
|
|
The Mia! Accounting Flask Project
|
|
income-expenses.html: The income and expenses log
|
|
|
|
Copyright (c) 2023 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: 2023/3/5
|
|
#}
|
|
{% extends "accounting/base.html" %}
|
|
|
|
{% block accounting_scripts %}
|
|
<script src="{{ url_for("accounting.static", filename="js/material-fab-speed-dial.js") }}"></script>
|
|
<script src="{{ url_for("accounting.static", filename="js/period-chooser.js") }}"></script>
|
|
{% endblock %}
|
|
|
|
{% block header %}{% block title %}{{ A_("Income and Expenses Log of %(account)s in %(currency)s %(period)s", currency=report.currency.name|title, account=report.account.title|title, period=report.period.desc|title) }}{% endblock %}{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
<div class="mb-3 accounting-toolbar">
|
|
{% with use_currency_chooser = true,
|
|
use_account_chooser = true,
|
|
use_period_chooser = true %}
|
|
{% include "accounting/report/include/toolbar-buttons.html" %}
|
|
{% endwith %}
|
|
</div>
|
|
|
|
{% include "accounting/report/include/add-txn-material-fab.html" %}
|
|
|
|
{% include "accounting/report/include/period-chooser.html" %}
|
|
|
|
{% include "accounting/report/include/search-modal.html" %}
|
|
|
|
{% if report.has_data %}
|
|
{% with pagination = report.pagination %}
|
|
{% include "accounting/include/pagination.html" %}
|
|
{% endwith %}
|
|
|
|
<div class="d-none d-md-block accounting-report-table accounting-income-expenses-table">
|
|
<div class="accounting-report-table-header">
|
|
<div class="accounting-report-table-row">
|
|
<div>{{ A_("Date") }}</div>
|
|
<div>{{ A_("Account") }}</div>
|
|
<div>{{ A_("Summary") }}</div>
|
|
<div class="accounting-amount">{{ A_("Income") }}</div>
|
|
<div class="accounting-amount">{{ A_("Expense") }}</div>
|
|
<div class="accounting-amount">{{ A_("Balance") }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="accounting-report-table-body">
|
|
{% if report.brought_forward %}
|
|
{% with entry = report.brought_forward %}
|
|
<div class="accounting-report-table-row">
|
|
{% include "accounting/report/include/income-expenses-row-desktop.html" %}
|
|
</div>
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% for entry in report.entries %}
|
|
<a class="accounting-report-table-row" href="{{ entry.url|accounting_append_next }}">
|
|
{% include "accounting/report/include/income-expenses-row-desktop.html" %}
|
|
</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% if report.total %}
|
|
{% with entry = report.total %}
|
|
<div class="accounting-report-table-footer">
|
|
<div class="accounting-report-table-row">
|
|
<div>{{ A_("Total") }}</div>
|
|
<div class="accounting-amount">{{ entry.income|accounting_format_amount }}</div>
|
|
<div class="accounting-amount">{{ entry.expense|accounting_format_amount }}</div>
|
|
<div class="accounting-amount {% if entry.balance < 0 %} text-danger {% endif %}">{{ entry.balance|accounting_report_format_amount }}</div>
|
|
</div>
|
|
</div>
|
|
{% endwith %}
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="list-group d-md-none">
|
|
{% if report.brought_forward %}
|
|
{% with entry = report.brought_forward %}
|
|
<div class="list-group-item list-group-item-action d-flex justify-content-between">
|
|
{% include "accounting/report/include/income-expenses-row-mobile.html" %}
|
|
</div>
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% for entry in report.entries %}
|
|
<a class="list-group-item list-group-item-action d-flex justify-content-between" href="{{ entry.url|accounting_append_next }}">
|
|
{% include "accounting/report/include/income-expenses-row-mobile.html" %}
|
|
</a>
|
|
{% endfor %}
|
|
{% if report.total %}
|
|
{% with entry = report.total %}
|
|
<div class="list-group-item list-group-item-action d-flex justify-content-between">
|
|
{% include "accounting/report/include/income-expenses-row-mobile.html" %}
|
|
</div>
|
|
{% endwith %}
|
|
{% endif %}
|
|
</div>
|
|
{% else %}
|
|
<p>{{ A_("There is no data.") }}</p>
|
|
{% endif %}
|
|
|
|
{% endblock %}
|