django-ledger 0.7.2__py3-none-any.whl → 0.7.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of django-ledger might be problematic. Click here for more details.
- django_ledger/__init__.py +1 -1
- django_ledger/contrib/django_ledger_graphene/journal_entry/schema.py +2 -3
- django_ledger/contrib/django_ledger_graphene/transaction/schema.py +9 -7
- django_ledger/forms/account.py +4 -1
- django_ledger/forms/journal_entry.py +19 -12
- django_ledger/forms/transactions.py +8 -12
- django_ledger/io/io_core.py +17 -12
- django_ledger/io/io_library.py +3 -3
- django_ledger/migrations/0001_initial.py +1 -1
- django_ledger/migrations/0019_alter_transactionmodel_amount_and_more.py +33 -0
- django_ledger/models/bill.py +17 -2
- django_ledger/models/chart_of_accounts.py +4 -0
- django_ledger/models/closing_entry.py +8 -6
- django_ledger/models/data_import.py +1 -0
- django_ledger/models/invoice.py +12 -4
- django_ledger/models/journal_entry.py +843 -481
- django_ledger/models/ledger.py +45 -4
- django_ledger/models/mixins.py +5 -5
- django_ledger/models/transactions.py +303 -305
- django_ledger/models/unit.py +42 -22
- django_ledger/static/django_ledger/bundle/djetler.bundle.js +1 -1
- django_ledger/static/django_ledger/bundle/styles.bundle.js +1 -1
- django_ledger/templates/django_ledger/account/tags/account_txs_table.html +1 -1
- django_ledger/templates/django_ledger/account/tags/accounts_table.html +1 -1
- django_ledger/templates/django_ledger/bills/bill_detail.html +1 -1
- django_ledger/templates/django_ledger/bills/bill_update.html +1 -1
- django_ledger/templates/django_ledger/components/icon.html +1 -1
- django_ledger/templates/django_ledger/data_import/tags/data_import_job_txs_imported.html +8 -1
- django_ledger/templates/django_ledger/financial_statements/balance_sheet.html +1 -0
- django_ledger/templates/django_ledger/financial_statements/tags/balance_sheet_statement.html +4 -4
- django_ledger/templates/django_ledger/financial_statements/tags/income_statement.html +118 -0
- django_ledger/templates/django_ledger/includes/nav.html +9 -5
- django_ledger/templates/django_ledger/invoice/includes/card_invoice.html +69 -69
- django_ledger/templates/django_ledger/invoice/invoice_detail.html +1 -1
- django_ledger/templates/django_ledger/journal_entry/je_create.html +2 -3
- django_ledger/templates/django_ledger/journal_entry/je_delete.html +2 -3
- django_ledger/templates/django_ledger/journal_entry/je_detail.html +1 -1
- django_ledger/templates/django_ledger/journal_entry/je_detail_txs.html +8 -8
- django_ledger/templates/django_ledger/journal_entry/je_list.html +16 -13
- django_ledger/templates/django_ledger/journal_entry/je_update.html +2 -3
- django_ledger/templates/django_ledger/journal_entry/tags/je_table.html +24 -24
- django_ledger/templates/django_ledger/journal_entry/tags/je_txs_table.html +17 -14
- django_ledger/templates/django_ledger/ledger/tags/ledgers_table.html +38 -37
- django_ledger/templates/django_ledger/transactions/tags/txs_table.html +69 -0
- django_ledger/templatetags/django_ledger.py +35 -48
- django_ledger/urls/account.py +4 -4
- django_ledger/views/account.py +8 -8
- django_ledger/views/journal_entry.py +84 -101
- django_ledger/views/ledger.py +16 -21
- django_ledger/views/mixins.py +17 -28
- {django_ledger-0.7.2.dist-info → django_ledger-0.7.4.dist-info}/METADATA +8 -3
- {django_ledger-0.7.2.dist-info → django_ledger-0.7.4.dist-info}/RECORD +56 -104
- assets/node_modules/node-gyp/gyp/gyp_main.py +0 -45
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -367
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -206
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -1270
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -1547
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -59
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -153
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -271
- assets/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -574
- assets/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -666
- assets/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -654
- assets/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -78
- assets/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -165
- assets/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -109
- assets/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -55
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -808
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -1173
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -1321
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -120
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -103
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -464
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -89
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -58
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -2518
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -3978
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -44
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -2936
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -55
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -1394
- assets/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -25
- assets/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -3137
- assets/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -98
- assets/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -771
- assets/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -1271
- assets/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -174
- assets/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -61
- assets/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -374
- assets/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -1939
- assets/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -302
- assets/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -3197
- assets/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -65
- assets/node_modules/node-gyp/gyp/setup.py +0 -42
- assets/node_modules/node-gyp/gyp/test_gyp.py +0 -260
- assets/node_modules/node-gyp/gyp/tools/graphviz.py +0 -102
- assets/node_modules/node-gyp/gyp/tools/pretty_gyp.py +0 -156
- assets/node_modules/node-gyp/gyp/tools/pretty_sln.py +0 -181
- assets/node_modules/node-gyp/gyp/tools/pretty_vcproj.py +0 -339
- assets/node_modules/node-gyp/test/fixtures/test-charmap.py +0 -31
- assets/node_modules/node-gyp/update-gyp.py +0 -46
- {django_ledger-0.7.2.dist-info → django_ledger-0.7.4.dist-info}/AUTHORS.md +0 -0
- {django_ledger-0.7.2.dist-info → django_ledger-0.7.4.dist-info}/LICENSE +0 -0
- {django_ledger-0.7.2.dist-info → django_ledger-0.7.4.dist-info}/WHEEL +0 -0
- {django_ledger-0.7.2.dist-info → django_ledger-0.7.4.dist-info}/top_level.txt +0 -0
|
@@ -55,31 +55,31 @@
|
|
|
55
55
|
{% trans 'Save' %}
|
|
56
56
|
</button>
|
|
57
57
|
<a class="button is-dark"
|
|
58
|
-
href="{
|
|
58
|
+
href="{{ journal_entry.get_journal_entry_list_url }}?next={{ request.path }}">
|
|
59
59
|
{% trans 'Done' %}
|
|
60
60
|
</a>
|
|
61
61
|
{% if journal_entry.can_lock %}
|
|
62
62
|
<a class="button is-dark is-danger"
|
|
63
|
-
href="{
|
|
63
|
+
href="{{ journal_entry.get_action_lock_url }}?next={{ request.path }}">
|
|
64
64
|
{% trans 'Lock' %}
|
|
65
65
|
</a>
|
|
66
66
|
{% endif %}
|
|
67
67
|
{% if journal_entry.can_unlock %}
|
|
68
68
|
<a class="button is-dark is-warning"
|
|
69
|
-
href="{
|
|
70
|
-
{% trans '
|
|
69
|
+
href="{{ journal_entry.get_action_unlock_url }}?next={{ request.path }}">
|
|
70
|
+
{% trans 'UnLock' %}
|
|
71
71
|
</a>
|
|
72
72
|
{% endif %}
|
|
73
73
|
{% if journal_entry.can_post %}
|
|
74
74
|
<a class="button is-dark is-danger"
|
|
75
|
-
href="{
|
|
76
|
-
{% trans '
|
|
75
|
+
href="{{ journal_entry.get_action_post_url }}?next={{ request.path }}">
|
|
76
|
+
{% trans 'Post' %}
|
|
77
77
|
</a>
|
|
78
78
|
{% endif %}
|
|
79
79
|
{% if journal_entry.can_unpost %}
|
|
80
80
|
<a class="button is-warning"
|
|
81
|
-
href="{
|
|
82
|
-
{% trans '
|
|
81
|
+
href="{{ journal_entry.get_action_unpost_url }}?next={{ request.path }}">
|
|
82
|
+
{% trans 'UnPost' %}
|
|
83
83
|
</a>
|
|
84
84
|
{% endif %}
|
|
85
85
|
</div>
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
{% load django_ledger %}
|
|
5
5
|
|
|
6
6
|
{% block view_content %}
|
|
7
|
-
|
|
8
|
-
{# {% include 'django_ledger/journal_entry/includes/card_journal_entry.html' je_model= %}#}
|
|
9
|
-
|
|
7
|
+
|
|
10
8
|
<div class="card">
|
|
11
9
|
<div class="card-content">
|
|
12
10
|
<div class="level">
|
|
@@ -21,10 +19,15 @@
|
|
|
21
19
|
<h1 class="is-size-1 has-text-weight-thin">{% trans 'Journal Entries' %}</h1>
|
|
22
20
|
{% endif %}
|
|
23
21
|
</div>
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
|
|
23
|
+
{# Do not show + button if ledger is locked #}
|
|
24
|
+
{% if not ledger_model.is_locked %}
|
|
25
|
+
<div class="level-item">
|
|
26
|
+
<a href="{{ ledger_model.get_journal_entry_create_url }}">
|
|
27
|
+
<span class="icon is-large has-text-success">{% icon 'carbon:add-alt' 60 %}</span></a>
|
|
28
|
+
</div>
|
|
29
|
+
{% endif %}
|
|
30
|
+
|
|
28
31
|
</div>
|
|
29
32
|
<div class="level-right">
|
|
30
33
|
{% if previous_month %}
|
|
@@ -88,12 +91,12 @@
|
|
|
88
91
|
</div>
|
|
89
92
|
</div>
|
|
90
93
|
|
|
91
|
-
{% jes_table
|
|
94
|
+
{% jes_table journal_entry_qs %}
|
|
92
95
|
|
|
93
96
|
{% if year %}
|
|
94
97
|
<h5 class="is-size-5">{% trans 'Go to month:' %}</h5>
|
|
95
98
|
<p>
|
|
96
|
-
<a href="{
|
|
99
|
+
<a href="{{ ledger_model.get_journal_entry_list_url }}">
|
|
97
100
|
{% trans 'All' %} |
|
|
98
101
|
</a>
|
|
99
102
|
{% for date in date_list %}
|
|
@@ -105,7 +108,7 @@
|
|
|
105
108
|
{% else %}
|
|
106
109
|
<h5 class="is-size-5">{% trans 'Go to year:' %}</h5>
|
|
107
110
|
<p>
|
|
108
|
-
<a href="{
|
|
111
|
+
<a href="{{ ledger_model.get_journal_entry_list_url }}">
|
|
109
112
|
{% trans 'All' %} |
|
|
110
113
|
</a>
|
|
111
114
|
{% for date in date_list %}
|
|
@@ -119,17 +122,17 @@
|
|
|
119
122
|
<div class="columns is-centered">
|
|
120
123
|
<div class="column is-3">
|
|
121
124
|
<a class="button is-dark is-fullwidth"
|
|
122
|
-
href="{
|
|
125
|
+
href="{{ ledger_model.get_list_url }}">
|
|
123
126
|
{% trans 'Back to Ledger List' %}</a>
|
|
124
127
|
</div>
|
|
125
128
|
<div class="column is-3">
|
|
126
129
|
<a class="button is-success is-fullwidth"
|
|
127
|
-
href="{
|
|
130
|
+
href="{{ ledger_model.get_action_lock_journal_entries_url }}">
|
|
128
131
|
{% trans 'Lock All' %}</a>
|
|
129
132
|
</div>
|
|
130
133
|
<div class="column is-3">
|
|
131
134
|
<a class="button is-warning is-fullwidth"
|
|
132
|
-
href="{
|
|
135
|
+
href="{{ ledger_model.get_action_post_journal_entries_url }}">
|
|
133
136
|
{% trans 'Post All' %}</a>
|
|
134
137
|
</div>
|
|
135
138
|
</div>
|
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
<div class="columns is-centered">
|
|
7
7
|
<div class="column is-6">
|
|
8
8
|
<div class="box">
|
|
9
|
-
<form method="post"
|
|
10
|
-
action="{% url 'django_ledger:je-update' entity_slug=view.kwargs.entity_slug ledger_pk=view.kwargs.ledger_pk je_pk=journal_entry.uuid %}">
|
|
9
|
+
<form method="post">
|
|
11
10
|
{% csrf_token %}
|
|
12
11
|
{{ form.as_p }}
|
|
13
12
|
<button class="button is-fullwidth is-primary is-outlined djetler_my_1" type="submit">Update
|
|
14
13
|
</button>
|
|
15
|
-
<a href="{
|
|
14
|
+
<a href="{{ journal_entry.get_journal_entry_list_url }}"
|
|
16
15
|
class="button is-small is-dark is-fullwidth">Back</a>
|
|
17
16
|
</form>
|
|
18
17
|
</div>
|
|
@@ -17,21 +17,21 @@
|
|
|
17
17
|
</tr>
|
|
18
18
|
</thead>
|
|
19
19
|
<tbody>
|
|
20
|
-
{% for
|
|
20
|
+
{% for journal_entry_model in journal_entry_qs %}
|
|
21
21
|
<tr class="has-text-centered">
|
|
22
|
-
<td>{{
|
|
23
|
-
<td>{{
|
|
24
|
-
<td>{% if
|
|
25
|
-
<td>{% if
|
|
22
|
+
<td>{{ journal_entry_model.je_number }}</td>
|
|
23
|
+
<td>{{ journal_entry_model.timestamp }}</td>
|
|
24
|
+
<td>{% if journal_entry_model.activity %}{{ journal_entry_model.get_activity_display }}{% endif %}</td>
|
|
25
|
+
<td>{% if journal_entry_model.description %}{{ journal_entry_model.description }}{% endif %}</td>
|
|
26
26
|
<td>
|
|
27
|
-
{% if
|
|
27
|
+
{% if journal_entry_model.is_posted %}
|
|
28
28
|
<span class="icon has-text-success">{% icon 'ant-design:check-circle-filled' 24 %}</span>
|
|
29
29
|
{% else %}
|
|
30
30
|
<span class="icon is-small has-text-danger">{% icon 'maki:roadblock-11' 24 %}</span>
|
|
31
31
|
{% endif %}
|
|
32
32
|
</td>
|
|
33
33
|
<td>
|
|
34
|
-
{% if
|
|
34
|
+
{% if journal_entry_model.is_locked %}
|
|
35
35
|
<span class="icon has-text-success-dark">
|
|
36
36
|
{% icon 'bi:lock-fill' 24 %}
|
|
37
37
|
</span>
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
</span>
|
|
42
42
|
{% endif %}
|
|
43
43
|
</td>
|
|
44
|
-
<td>{{
|
|
45
|
-
<td class="has-text-weight-bold">{{
|
|
44
|
+
<td>{{ journal_entry_model.get_entity_unit_name }}</td>
|
|
45
|
+
<td class="has-text-weight-bold">{{ journal_entry_model.txs_count }}</td>
|
|
46
46
|
<td>
|
|
47
47
|
<div class="dropdown is-right is-hoverable"
|
|
48
|
-
id="je-action-{{
|
|
48
|
+
id="je-action-{{ journal_entry_model.uuid }}">
|
|
49
49
|
<div class="dropdown-trigger">
|
|
50
50
|
<button class="button is-small is-rounded is-outlined is-dark"
|
|
51
51
|
aria-haspopup="true"
|
|
@@ -58,37 +58,37 @@
|
|
|
58
58
|
</div>
|
|
59
59
|
|
|
60
60
|
<div class="dropdown-menu"
|
|
61
|
-
id="dropdown-menu-{{
|
|
61
|
+
id="dropdown-menu-{{ journal_entry_model.uuid }}"
|
|
62
62
|
role="menu">
|
|
63
63
|
<div class="dropdown-content">
|
|
64
|
-
{% if
|
|
64
|
+
{% if journal_entry_model.can_post %}
|
|
65
65
|
<a class="dropdown-item"
|
|
66
|
-
href="{
|
|
66
|
+
href="{{ journal_entry_model.get_action_post_url }}?next={{ next_url }}">
|
|
67
67
|
{% trans 'Post' %}</a>
|
|
68
|
-
{% elif
|
|
68
|
+
{% elif journal_entry_model.can_unpost %}
|
|
69
69
|
<a class="dropdown-item"
|
|
70
|
-
href="{
|
|
70
|
+
href="{{ journal_entry_model.get_action_unpost_url }}?next={{ next_url }}">
|
|
71
71
|
{% trans 'UnPost' %}</a>
|
|
72
72
|
{% endif %}
|
|
73
|
-
{% if
|
|
73
|
+
{% if journal_entry_model.can_lock %}
|
|
74
74
|
<a class="dropdown-item"
|
|
75
|
-
href="{
|
|
75
|
+
href="{{ journal_entry_model.get_action_lock_url }}?next={{ next_url }}">
|
|
76
76
|
{% trans 'Lock' %}</a>
|
|
77
|
-
{% elif
|
|
77
|
+
{% elif journal_entry_model.can_unlock %}
|
|
78
78
|
<a class="dropdown-item"
|
|
79
|
-
href="{
|
|
79
|
+
href="{{ journal_entry_model.get_action_unlock_url }}?next={{ next_url }}">
|
|
80
80
|
{% trans 'Unlock' %}</a>
|
|
81
81
|
{% endif %}
|
|
82
82
|
<a class="dropdown-item"
|
|
83
|
-
href="{% url 'django_ledger:je-update' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=
|
|
83
|
+
href="{% url 'django_ledger:je-update' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=journal_entry_model.uuid %}">{% trans 'Edit' %}</a>
|
|
84
84
|
<a class="dropdown-item"
|
|
85
|
-
href="{% url 'django_ledger:je-detail' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=
|
|
86
|
-
{% if
|
|
85
|
+
href="{% url 'django_ledger:je-detail' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=journal_entry_model.uuid %}">{% trans 'View' %}</a>
|
|
86
|
+
{% if journal_entry_model.can_delete %}
|
|
87
87
|
<a class="dropdown-item has-text-danger has-text-weight-bold"
|
|
88
|
-
href="{% url 'django_ledger:je-delete' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=
|
|
88
|
+
href="{% url 'django_ledger:je-delete' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=journal_entry_model.uuid %}">{% trans 'Delete' %}</a>
|
|
89
89
|
{% endif %}
|
|
90
90
|
<a class="dropdown-item"
|
|
91
|
-
href="{% url 'django_ledger:je-detail-txs' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=
|
|
91
|
+
href="{% url 'django_ledger:je-detail-txs' entity_slug=entity_slug ledger_pk=ledger_pk je_pk=journal_entry_model.uuid %}">{% trans 'Transactions' %}</a>
|
|
92
92
|
</div>
|
|
93
93
|
</div>
|
|
94
94
|
</div>
|
|
@@ -13,15 +13,18 @@
|
|
|
13
13
|
<th>{% trans 'Debit' %}</th>
|
|
14
14
|
<th>{% trans 'Description' %}</th>
|
|
15
15
|
</tr>
|
|
16
|
-
{% for
|
|
16
|
+
{% for transaction_model in transaction_model_qs %}
|
|
17
17
|
<tr>
|
|
18
|
-
<td>{{
|
|
19
|
-
<td>{{
|
|
20
|
-
<td>{{
|
|
21
|
-
<td>{% if
|
|
22
|
-
|
|
23
|
-
<td>{% if
|
|
24
|
-
|
|
18
|
+
<td>{{ transaction_model.timestamp }}</td>
|
|
19
|
+
<td>{{ transaction_model.account_code }}</td>
|
|
20
|
+
<td>{{ transaction_model.account_name }}</td>
|
|
21
|
+
<td>{% if transaction_model.entity_unit_name %}
|
|
22
|
+
{{ transaction_model.entity_unit_name }}{% endif %}</td>
|
|
23
|
+
<td>{% if transaction_model.is_credit %}$
|
|
24
|
+
{{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
25
|
+
<td>{% if transaction_model.is_debit %}$
|
|
26
|
+
{{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
27
|
+
<td>{% if transaction_model.description %}{{ transaction_model.description }}{% endif %}</td>
|
|
25
28
|
</tr>
|
|
26
29
|
{% endfor %}
|
|
27
30
|
<tr class="has-text-weight-bold">
|
|
@@ -45,13 +48,13 @@
|
|
|
45
48
|
<th>{% trans 'Debit' %}</th>
|
|
46
49
|
<th>{% trans 'Description' %}</th>
|
|
47
50
|
</tr>
|
|
48
|
-
{% for
|
|
51
|
+
{% for transaction_model in transaction_model_qs %}
|
|
49
52
|
<tr>
|
|
50
|
-
<td>{{
|
|
51
|
-
<td>{{
|
|
52
|
-
<td>{% if
|
|
53
|
-
<td>{% if
|
|
54
|
-
<td>{% if
|
|
53
|
+
<td>{{ transaction_model.account_code }}</td>
|
|
54
|
+
<td>{{ transaction_model.account_name }}</td>
|
|
55
|
+
<td>{% if transaction_model.is_credit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
56
|
+
<td>{% if transaction_model.is_debit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
57
|
+
<td>{% if transaction_model.description %}{{ transaction_model.description }}{% endif %}</td>
|
|
55
58
|
</tr>
|
|
56
59
|
{% endfor %}
|
|
57
60
|
<tr class="has-text-weight-bold">
|
|
@@ -18,21 +18,22 @@
|
|
|
18
18
|
</tr>
|
|
19
19
|
</thead>
|
|
20
20
|
<tbody>
|
|
21
|
-
{% for
|
|
21
|
+
{% for ledger_model in ledger_model_qs %}
|
|
22
22
|
<tr>
|
|
23
|
-
<td>{% if
|
|
24
|
-
<a href="{{
|
|
25
|
-
{% else %}{{
|
|
26
|
-
<td
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<span
|
|
23
|
+
<td>{% if ledger_model.has_wrapped_model %}
|
|
24
|
+
<a href="{{ ledger_model.get_wrapped_model_url }}">{{ ledger_model.get_wrapped_model_instance }}</a>
|
|
25
|
+
{% else %}{{ ledger_model.name }}{% endif %}</td>
|
|
26
|
+
<td>
|
|
27
|
+
<a class="button is-primary is-small"
|
|
28
|
+
href="{{ ledger_model.get_journal_entry_list_url }}">
|
|
29
|
+
<span class="icon has-text-dark">{% icon 'grommet-icons:transaction' 24 %}</span>
|
|
30
|
+
<span>
|
|
31
|
+
<span class="has-text-weight-bold">{{ ledger_model.journal_entries__count }}</span>
|
|
31
32
|
<span>{% trans 'Journal Entries' %}</span>
|
|
32
33
|
</span>
|
|
33
|
-
|
|
34
|
-
</
|
|
35
|
-
{% if
|
|
34
|
+
</a>
|
|
35
|
+
</td>
|
|
36
|
+
{% if ledger_model.is_posted %}
|
|
36
37
|
<td>
|
|
37
38
|
<div class="dropdown is-hoverable">
|
|
38
39
|
<div class="dropdown-trigger">
|
|
@@ -45,40 +46,40 @@
|
|
|
45
46
|
<div class="dropdown-menu" id="dropdown-menu5" role="menu">
|
|
46
47
|
<div class="dropdown-content">
|
|
47
48
|
<div class="dropdown-item"><a
|
|
48
|
-
href="{{
|
|
49
|
+
href="{{ ledger_model.get_balance_sheet_url }}">{% trans 'Balance Sheet' %}</a>
|
|
49
50
|
</div>
|
|
50
51
|
<div class="dropdown-item"><a
|
|
51
|
-
href="{{
|
|
52
|
+
href="{{ ledger_model.get_income_statement_url }}">{% trans 'Income Statement' %}</a>
|
|
52
53
|
</div>
|
|
53
54
|
<div class="dropdown-item"><a
|
|
54
|
-
href="{{
|
|
55
|
+
href="{{ ledger_model.get_cash_flow_statement_url }}">{% trans 'Cash Flow Statement' %}</a>
|
|
55
56
|
</div>
|
|
56
57
|
</div>
|
|
57
58
|
</div>
|
|
58
59
|
</div>
|
|
59
60
|
</td>
|
|
60
|
-
<td>{% if
|
|
61
|
+
<td>{% if ledger_model.earliest_timestamp %}{{ ledger_model.earliest_timestamp | date }}{% endif %}</td>
|
|
61
62
|
{% else %}
|
|
62
63
|
<td></td>
|
|
63
64
|
<td></td>
|
|
64
65
|
{% endif %}
|
|
65
66
|
|
|
66
67
|
<td class="has-text-centered">
|
|
67
|
-
{% if
|
|
68
|
+
{% if ledger_model.is_posted %}
|
|
68
69
|
<span class="icon has-text-success">{% icon 'ant-design:check-circle-filled' 24 %}</span>
|
|
69
70
|
{% else %}
|
|
70
71
|
<span class="icon is-small has-text-danger">{% icon 'maki:roadblock-11' 24 %}</span>
|
|
71
72
|
{% endif %}
|
|
72
73
|
</td>
|
|
73
74
|
<td class="has-text-centered">
|
|
74
|
-
{% if
|
|
75
|
+
{% if ledger_model.is_locked %}
|
|
75
76
|
<span class="icon has-text-success">{% icon 'bi:lock-fill' 24 %}</span>
|
|
76
77
|
{% else %}
|
|
77
78
|
<span class="icon has-text-danger">{% icon 'bx:bx-lock-open-alt' 24 %}</span>
|
|
78
79
|
{% endif %}
|
|
79
80
|
</td>
|
|
80
81
|
<td class="has-text-centered">
|
|
81
|
-
{% if
|
|
82
|
+
{% if ledger_model.has_jes_in_locked_period %}
|
|
82
83
|
<span class="icon has-text-success">{% icon 'bi:lock-fill' 24 %}</span>
|
|
83
84
|
{% else %}
|
|
84
85
|
<span class="icon has-text-danger">{% icon 'bx:bx-lock-open-alt' 24 %}</span>
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
</td>
|
|
87
88
|
<td>
|
|
88
89
|
<div class="dropdown is-right is-hoverable"
|
|
89
|
-
id="ledger-action-{{
|
|
90
|
+
id="ledger-action-{{ ledger_model.uuid }}">
|
|
90
91
|
<div class="dropdown-trigger">
|
|
91
92
|
<button class="button is-small is-rounded is-outlined is-dark"
|
|
92
93
|
aria-haspopup="true"
|
|
@@ -95,45 +96,45 @@
|
|
|
95
96
|
<span class="icon is-small">{% icon 'bi:arrow-down' 24 %}</span>
|
|
96
97
|
</button>
|
|
97
98
|
</div>
|
|
98
|
-
<div class="dropdown-menu" id="dropdown-menu-{{
|
|
99
|
+
<div class="dropdown-menu" id="dropdown-menu-{{ ledger_model.uuid }}" role="menu">
|
|
99
100
|
<div class="dropdown-content">
|
|
100
|
-
<a href="{% url 'django_ledger:ledger-update' entity_slug=entity_slug ledger_pk=
|
|
101
|
+
<a href="{% url 'django_ledger:ledger-update' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
101
102
|
class="dropdown-item has-text-success">{% trans 'Edit' %}</a>
|
|
102
|
-
{% if
|
|
103
|
-
<a href="{% url 'django_ledger:ledger-action-lock' entity_slug=entity_slug ledger_pk=
|
|
103
|
+
{% if ledger_model.can_lock %}
|
|
104
|
+
<a href="{% url 'django_ledger:ledger-action-lock' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
104
105
|
class="dropdown-item has-text-info has-text-weight-bold">{% trans 'Lock' %}</a>
|
|
105
106
|
{% endif %}
|
|
106
|
-
{% if
|
|
107
|
-
<a href="{% url 'django_ledger:ledger-action-unlock' entity_slug=entity_slug ledger_pk=
|
|
107
|
+
{% if ledger_model.can_unlock %}
|
|
108
|
+
<a href="{% url 'django_ledger:ledger-action-unlock' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
108
109
|
class="dropdown-item has-text-warning has-text-weight-bold">{% trans 'UnLock' %}</a>
|
|
109
110
|
{% endif %}
|
|
110
|
-
{% if
|
|
111
|
-
<a href="{% url 'django_ledger:ledger-action-post' entity_slug=entity_slug ledger_pk=
|
|
111
|
+
{% if ledger_model.can_post %}
|
|
112
|
+
<a href="{% url 'django_ledger:ledger-action-post' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
112
113
|
class="dropdown-item has-text-info has-text-weight-bold">{% trans 'Post' %}</a>
|
|
113
114
|
{% endif %}
|
|
114
|
-
{% if
|
|
115
|
-
<a href="{% url 'django_ledger:ledger-action-unpost' entity_slug=entity_slug ledger_pk=
|
|
115
|
+
{% if ledger_model.can_unpost %}
|
|
116
|
+
<a href="{% url 'django_ledger:ledger-action-unpost' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
116
117
|
class="dropdown-item has-text-warning has-text-weight-bold">{% trans 'UnPost' %}</a>
|
|
117
118
|
{% endif %}
|
|
118
119
|
|
|
119
|
-
{% if
|
|
120
|
-
<a href="{% url 'django_ledger:ledger-action-hide' entity_slug=entity_slug ledger_pk=
|
|
120
|
+
{% if ledger_model.can_hide %}
|
|
121
|
+
<a href="{% url 'django_ledger:ledger-action-hide' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
121
122
|
class="dropdown-item has-text-warning has-text-weight-bold">{% trans 'Hide' %}</a>
|
|
122
123
|
{% endif %}
|
|
123
|
-
{% if
|
|
124
|
-
<a href="{% url 'django_ledger:ledger-action-unhide' entity_slug=entity_slug ledger_pk=
|
|
124
|
+
{% if ledger_model.can_unhide %}
|
|
125
|
+
<a href="{% url 'django_ledger:ledger-action-unhide' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
125
126
|
class="dropdown-item has-text-danger has-text-weight-bold">{% trans 'UnHide' %}</a>
|
|
126
127
|
{% endif %}
|
|
127
128
|
|
|
128
|
-
{% if
|
|
129
|
-
<a href="{% url 'django_ledger:ledger-delete' entity_slug=entity_slug ledger_pk=
|
|
129
|
+
{% if ledger_model.can_delete %}
|
|
130
|
+
<a href="{% url 'django_ledger:ledger-delete' entity_slug=entity_slug ledger_pk=ledger_model.uuid %}"
|
|
130
131
|
class="dropdown-item has-text-danger has-text-weight-bold">{% trans 'Delete' %}</a>
|
|
131
132
|
{% endif %}
|
|
132
133
|
</div>
|
|
133
134
|
</div>
|
|
134
135
|
</div>
|
|
135
136
|
</td>
|
|
136
|
-
<td>{{
|
|
137
|
+
<td>{{ ledger_model.created }}</td>
|
|
137
138
|
</tr>
|
|
138
139
|
{% endfor %}
|
|
139
140
|
</tbody>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{% load i18n %}
|
|
2
|
+
{% load django_ledger %}
|
|
3
|
+
|
|
4
|
+
{% if style == 'detail' %}
|
|
5
|
+
<div class="table-container">
|
|
6
|
+
<table class="table is-fullwidth is-narrow is-striped is-bordered django-ledger-table-bottom-margin-75">
|
|
7
|
+
<tr>
|
|
8
|
+
<th>{% trans 'Timestamp' %}</th>
|
|
9
|
+
<th>{% trans 'Account' %}</th>
|
|
10
|
+
<th>{% trans 'Account Name' %}</th>
|
|
11
|
+
<th>{% trans 'Unit' %}</th>
|
|
12
|
+
<th>{% trans 'Credit' %}</th>
|
|
13
|
+
<th>{% trans 'Debit' %}</th>
|
|
14
|
+
<th>{% trans 'Description' %}</th>
|
|
15
|
+
</tr>
|
|
16
|
+
{% for transaction_model in transaction_model_qs %}
|
|
17
|
+
<tr>
|
|
18
|
+
<td>{{ transaction_model.timestamp }}</td>
|
|
19
|
+
<td>{{ transaction_model.account_code }}</td>
|
|
20
|
+
<td>{{ transaction_model.account_name }}</td>
|
|
21
|
+
<td>{% if transaction_model.entity_unit_name %}
|
|
22
|
+
{{ transaction_model.entity_unit_name }}{% endif %}</td>
|
|
23
|
+
<td>{% if transaction_model.is_credit %}$
|
|
24
|
+
{{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
25
|
+
<td>{% if transaction_model.is_debit %}$
|
|
26
|
+
{{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
27
|
+
<td>{% if transaction_model.description %}{{ transaction_model.description }}{% endif %}</td>
|
|
28
|
+
</tr>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
<tr class="has-text-weight-bold">
|
|
31
|
+
<td></td>
|
|
32
|
+
<td></td>
|
|
33
|
+
<td></td>
|
|
34
|
+
<td class="has-text-right">Total</td>
|
|
35
|
+
<td>{% currency_symbol %}{{ total_credits | currency_format }}</td>
|
|
36
|
+
<td>{% currency_symbol %}{{ total_debits | currency_format }}</td>
|
|
37
|
+
<td></td>
|
|
38
|
+
</tr>
|
|
39
|
+
</table>
|
|
40
|
+
</div>
|
|
41
|
+
{% elif style == 'compact' %}
|
|
42
|
+
<div class="table-container">
|
|
43
|
+
<table class="table is-fullwidth is-narrow is-striped is-bordered django-ledger-table-bottom-margin-75">
|
|
44
|
+
<tr>
|
|
45
|
+
<th>{% trans 'Account' %}</th>
|
|
46
|
+
<th>{% trans 'Account Name' %}</th>
|
|
47
|
+
<th>{% trans 'Credit' %}</th>
|
|
48
|
+
<th>{% trans 'Debit' %}</th>
|
|
49
|
+
<th>{% trans 'Description' %}</th>
|
|
50
|
+
</tr>
|
|
51
|
+
{% for transaction_model in transaction_model_qs %}
|
|
52
|
+
<tr>
|
|
53
|
+
<td>{{ transaction_model.account_code }}</td>
|
|
54
|
+
<td>{{ transaction_model.account_name }}</td>
|
|
55
|
+
<td>{% if transaction_model.is_credit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
56
|
+
<td>{% if transaction_model.is_debit %}${{ transaction_model.amount | currency_format }}{% endif %}</td>
|
|
57
|
+
<td>{% if transaction_model.description %}{{ transaction_model.description }}{% endif %}</td>
|
|
58
|
+
</tr>
|
|
59
|
+
{% endfor %}
|
|
60
|
+
<tr class="has-text-weight-bold">
|
|
61
|
+
<td></td>
|
|
62
|
+
<td class="has-text-right">{% trans 'Total' %}</td>
|
|
63
|
+
<td>{% currency_symbol %}{{ total_credits | currency_format }}</td>
|
|
64
|
+
<td>{% currency_symbol %}{{ total_debits | currency_format }}</td>
|
|
65
|
+
<td></td>
|
|
66
|
+
</tr>
|
|
67
|
+
</table>
|
|
68
|
+
</div>
|
|
69
|
+
{% endif %}
|