Added the side-wide base template, and apply it in the accounting cash report.

This commit is contained in:
依瑪貓 2020-07-01 23:38:36 +08:00
parent cff4893c77
commit 8cab91dcd2

View File

@ -1,7 +1,40 @@
<h1>Cash Report</h1>
{% extends "base.html" %}
{% comment %}
The Mia Accounting Application
cash.html: The template for the accounting cash reports
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/7/1
{% endcomment %}
{% block settings %}
{% setvar "title" "Cash Report" %}
{% endblock %}
{% block content %}
<p>{{ request.path }}</p>
<p>{{ request.get_full_path }}</p>
<p>{{ request.resolver_match.url_name }}</p>
{% if records %}
<table>
<table class="table table-stripped">
<thead>
<tr>
<th scope="col">Date</th>
@ -16,11 +49,11 @@
<tbody>
{% for record in records %}
<tr>
<td>{{ record.transaction.date }}</td>
<td>{{ record.transaction.date|date:"Y-m-d" }}</td>
<td>{{ record.subject.title_zhtw }}</td>
<td>{{ record.summary }}</td>
<td>{{ record.debit_amount }}</td>
<td>{{ record.credit_amount }}</td>
<td>{{ record.debit_amount|default:"" }}</td>
<td>{{ record.credit_amount|default:"" }}</td>
<td>{{ record.amount }}</td>
<td><a href="{{ record.transaction.get_absolute_url }}">View</a></td>
</tr>
@ -30,3 +63,5 @@
{% else %}
<p>No data.</p>
{% endif %}
{% endblock %}