journal_statement_nature.jinja 1.61 KB
Newer Older
1
2
3
4
5
6
{% extends "core/base.jinja" %}

{% block title %}
{% trans %}General journal:{% endtrans %} {{ object.name }}
{% endblock %}

Skia's avatar
Skia committed
7
{% macro display_tables(dict) %}
Krophil's avatar
Krophil committed
8
9
10
11
12
13
14
15
16
17
18
19
20
<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>
Sli's avatar
Sli committed
21
                <td>{{ "%.2f" % v }}</td>
Krophil's avatar
Krophil committed
22
23
24
25
            </tr>
            {% endfor %}
        </tbody>
    </table>
Sli's avatar
Sli committed
26
    {% trans %}Total: {% endtrans %}{{ "%.2f" % dict['CREDIT_sum'] }}
Skia's avatar
Skia committed
27

Krophil's avatar
Krophil committed
28
29
30
31
32
33
34
35
36
37
38
39
    <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>
Sli's avatar
Sli committed
40
                <td>{{ "%.2f" % v }}</td>
Krophil's avatar
Krophil committed
41
42
43
44
            </tr>
            {% endfor %}
        </tbody>
    </table>
Sli's avatar
Sli committed
45
    {% trans %}Total: {% endtrans %}{{ "%.2f" % dict['DEBIT_sum'] }}
Krophil's avatar
Krophil committed
46
    {% endmacro %}
47

Krophil's avatar
Krophil committed
48
49
    {% block content %}
    <h3>{% trans %}Statement by nature: {% endtrans %} {{ object.name }}</h3>
50

Krophil's avatar
Krophil committed
51
    {% for k,v in statement.items() %}
Sli's avatar
Sli committed
52
        <h4 style="background: lightblue; padding: 4px;">{{ k }} : {{ "%.2f" % (v['CREDIT_sum'] - v['DEBIT_sum']) }}</h4>
Krophil's avatar
Krophil committed
53
54
55
56
    {{ display_tables(v) }}
    <hr>
    {% endfor %}
</div>
Skia's avatar
Skia committed
57
{% endblock %}