mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 18:44:23 +00:00
58 lines
1.6 KiB
Django/Jinja
58 lines
1.6 KiB
Django/Jinja
{% extends "core/base.jinja" %}
|
|
|
|
{% block title %}
|
|
{% trans %}General journal:{% endtrans %} {{ object.name }}
|
|
{% endblock %}
|
|
|
|
{% macro display_tables(dict) %}
|
|
<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>
|
|
<td>{{ "%.2f" % v }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['CREDIT_sum'] }}
|
|
|
|
<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>
|
|
<td>{{ "%.2f" % v }}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% trans %}Total: {% endtrans %}{{ "%.2f" % dict['DEBIT_sum'] }}
|
|
{% endmacro %}
|
|
|
|
{% block content %}
|
|
<h3>{% trans %}Statement by nature: {% endtrans %} {{ object.name }}</h3>
|
|
|
|
{% for k,v in statement.items() %}
|
|
<h4 style="background: lightblue; padding: 4px;">{{ k }} : {{ "%.2f" % (v['CREDIT_sum'] - v['DEBIT_sum']) }}</h4>
|
|
{{ display_tables(v) }}
|
|
<hr>
|
|
{% endfor %}
|
|
</div>
|
|
{% endblock %}
|