127 lines
4.1 KiB
HTML
127 lines
4.1 KiB
HTML
{% extends "base.html" %}
|
|
{% comment %}
|
|
The Mia Accounting Application
|
|
cash.html: The template for a cash-income transaction
|
|
|
|
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/23
|
|
{% endcomment %}
|
|
{% load static %}
|
|
{% load i18n %}
|
|
{% load mia_core %}
|
|
{% load accounting %}
|
|
|
|
{% block settings %}
|
|
{% trans "Cash Income Transaction" context "Accounting|" as title %}
|
|
{% setvar "title" title %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% if item.has_order_hole %}
|
|
<div class="alert alert-danger alert-dismissible fade show">
|
|
<button type="button" class="close" data-dismiss="alert">×</button>
|
|
<strong>{{ _("Error:") }}</strong> {% trans "The transactions on this day are not well-ordered. Please reorder them." context "Accounting|" as text %}{{ text|force_escape }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="btn-group btn-actions">
|
|
<a class="btn btn-primary" role="button" href="{{ request.GET.r }}">
|
|
<i class="fas fa-chevron-circle-left"></i>
|
|
{{ _("Back") }}
|
|
</a>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-2">{% trans "Date:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
|
<div class="col-sm-10">{{ item.date|smart_date }}</div>
|
|
</div>
|
|
|
|
<table class="table table-striped table-hover d-none d-sm-table">
|
|
<thead>
|
|
<tr>
|
|
<th scope="col">{% trans "Account" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
|
<th scope="col">{% trans "Summary" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
|
<th class="amount" scope="col">{% trans "$" context "Accounting|" as text %}{{ text|force_escape }}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for x in item.credit_records %}
|
|
<tr>
|
|
<td>{{ x.account.title|title }}</td>
|
|
<td>{{ x.summary|default:"" }}</td>
|
|
<td class="amount">{{ x.amount|accounting_amount }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="2">{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}</td>
|
|
<td class="amount">{{ item.credit_total|accounting_amount }}</td>
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
<ul class="list-group d-sm-none">
|
|
{% for x in item.credit_records %}
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between align-items-center subject-line">
|
|
{{ x.account.title|title }}
|
|
<span class="badge badge-info">{{ x.amount|accounting_amount }}</span>
|
|
</div>
|
|
<div>{{ x.summary|default:"" }}</div>
|
|
</li>
|
|
{% endfor %}
|
|
<li class="list-group-item">
|
|
<div class="d-flex justify-content-between align-items-center subject-line">
|
|
{% trans "Total" context "Accounting|" as text %}{{ text|force_escape }}
|
|
<span class="badge badge-info">{{ item.credit_total|accounting_amount }}</span>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
|
|
{% if item.notes %}
|
|
<div class="row">
|
|
<div class="col-sm-2">{% trans "Notes:" context "Accounting|" as text %}{{ text|force_escape }}</div>
|
|
<div class="col-sm-10">{{ item.notes }}</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="row form-group">
|
|
<div class="col-sm-2">{{ _("Created at:") }}</div>
|
|
<div class="col-sm-10">{{ item.created_at }}</div>
|
|
</div>
|
|
|
|
<div class="row form-group">
|
|
<div class="col-sm-2">{{ _("Created by:") }}</div>
|
|
<div class="col-sm-10">{{ item.created_by.name }}</div>
|
|
</div>
|
|
|
|
<div class="row form-group">
|
|
<div class="col-sm-2">{{ _("Updated at:") }}</div>
|
|
<div class="col-sm-10">{{ item.updated_at }}</div>
|
|
</div>
|
|
|
|
<div class="row form-group">
|
|
<div class="col-sm-2">{{ _("Updated by:") }}</div>
|
|
<div class="col-sm-10">{{ item.updated_by.name }}</div>
|
|
</div>
|
|
|
|
{% endblock %}
|
|
|
|
|