Sith/accounting/templates/accounting/journal_statement_nature.jinja

58 lines
1.6 KiB
Django/Jinja
Raw Normal View History

2016-12-14 17:04:57 +00:00
{% extends "core/base.jinja" %}
{% block title %}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% endblock %}
2016-12-21 03:58:52 +00:00
{% macro display_tables(dict) %}
2017-10-09 11:58:18 +00:00
<div id="accounting">
<h6>{% trans %}Credit{% endtrans %}</h6>
<table>
<thead>
<tr>
<td>{% trans %}Nature of operation{% endtrans %}</td>
<td>{% trans %}Sum{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for k,v in dict['CREDIT'].items() %}
<tr>
<td>{{ k }}</td>
2019-10-06 15:44:30 +00:00
<td>{{ "%.2f" % v }}</td>
2017-10-09 11:58:18 +00:00
</tr>
{% endfor %}
</tbody>
</table>
2019-10-06 15:44:30 +00:00
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['CREDIT_sum'] }}
2016-12-21 03:58:52 +00:00
2017-10-09 11:58:18 +00:00
<h6>{% trans %}Debit{% endtrans %}</h6>
<table>
<thead>
<tr>
<td>{% trans %}Nature of operation{% endtrans %}</td>
<td>{% trans %}Sum{% endtrans %}</td>
</tr>
</thead>
<tbody>
{% for k,v in dict['DEBIT'].items() %}
<tr>
<td>{{ k }}</td>
2019-10-06 15:44:30 +00:00
<td>{{ "%.2f" % v }}</td>
2017-10-09 11:58:18 +00:00
</tr>
{% endfor %}
</tbody>
</table>
2019-10-06 15:44:30 +00:00
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['DEBIT_sum'] }}
2017-10-09 11:58:18 +00:00
{% endmacro %}
2016-12-14 17:04:57 +00:00
2017-10-09 11:58:18 +00:00
{% block content %}
<h3>{% trans %}Statement by nature: {% endtrans %} {{ object.name }}</h3>
2016-12-14 17:04:57 +00:00
2017-10-09 11:58:18 +00:00
{% for k,v in statement.items() %}
2019-10-06 15:44:30 +00:00
<h4 style="background: lightblue; padding: 4px;">{{ k }} : {{ "%.2f" % (v['CREDIT_sum'] - v['DEBIT_sum']) }}</h4>
2017-10-09 11:58:18 +00:00
{{ display_tables(v) }}
<hr>
{% endfor %}
</div>
2016-12-21 03:58:52 +00:00
{% endblock %}