django-ledger 0.7.11__py3-none-any.whl → 0.8.1__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.

Files changed (139) hide show
  1. django_ledger/__init__.py +1 -1
  2. django_ledger/context.py +12 -0
  3. django_ledger/forms/account.py +45 -46
  4. django_ledger/forms/bill.py +0 -4
  5. django_ledger/forms/closing_entry.py +13 -1
  6. django_ledger/forms/data_import.py +182 -63
  7. django_ledger/forms/estimate.py +3 -6
  8. django_ledger/forms/invoice.py +3 -7
  9. django_ledger/forms/item.py +10 -18
  10. django_ledger/forms/purchase_order.py +2 -4
  11. django_ledger/io/io_core.py +515 -400
  12. django_ledger/io/io_generator.py +7 -6
  13. django_ledger/io/io_library.py +1 -2
  14. django_ledger/migrations/0025_alter_billmodel_cash_account_and_more.py +70 -0
  15. django_ledger/migrations/0026_stagedtransactionmodel_customer_model_and_more.py +56 -0
  16. django_ledger/models/__init__.py +2 -1
  17. django_ledger/models/accounts.py +109 -69
  18. django_ledger/models/bank_account.py +40 -23
  19. django_ledger/models/bill.py +386 -333
  20. django_ledger/models/chart_of_accounts.py +173 -105
  21. django_ledger/models/closing_entry.py +99 -48
  22. django_ledger/models/customer.py +100 -66
  23. django_ledger/models/data_import.py +818 -323
  24. django_ledger/models/deprecations.py +61 -0
  25. django_ledger/models/entity.py +891 -644
  26. django_ledger/models/estimate.py +57 -28
  27. django_ledger/models/invoice.py +46 -26
  28. django_ledger/models/items.py +503 -142
  29. django_ledger/models/journal_entry.py +61 -47
  30. django_ledger/models/ledger.py +106 -42
  31. django_ledger/models/mixins.py +424 -281
  32. django_ledger/models/purchase_order.py +39 -17
  33. django_ledger/models/receipt.py +1083 -0
  34. django_ledger/models/transactions.py +242 -139
  35. django_ledger/models/unit.py +93 -54
  36. django_ledger/models/utils.py +12 -2
  37. django_ledger/models/vendor.py +121 -70
  38. django_ledger/report/core.py +2 -14
  39. django_ledger/settings.py +57 -71
  40. django_ledger/static/django_ledger/bundle/djetler.bundle.js +1 -1
  41. django_ledger/static/django_ledger/bundle/djetler.bundle.js.LICENSE.txt +25 -0
  42. django_ledger/static/django_ledger/bundle/styles.bundle.js +1 -1
  43. django_ledger/static/django_ledger/css/djl_styles.css +273 -0
  44. django_ledger/templates/django_ledger/bills/includes/card_bill.html +2 -2
  45. django_ledger/templates/django_ledger/components/menu.html +41 -26
  46. django_ledger/templates/django_ledger/components/period_navigator.html +5 -3
  47. django_ledger/templates/django_ledger/customer/customer_detail.html +87 -0
  48. django_ledger/templates/django_ledger/customer/customer_list.html +0 -1
  49. django_ledger/templates/django_ledger/customer/tags/customer_table.html +8 -6
  50. django_ledger/templates/django_ledger/data_import/tags/data_import_job_txs_imported.html +24 -3
  51. django_ledger/templates/django_ledger/data_import/tags/data_import_job_txs_table.html +26 -10
  52. django_ledger/templates/django_ledger/entity/entity_dashboard.html +2 -2
  53. django_ledger/templates/django_ledger/entity/includes/card_entity.html +12 -6
  54. django_ledger/templates/django_ledger/financial_statements/balance_sheet.html +1 -1
  55. django_ledger/templates/django_ledger/financial_statements/cash_flow.html +4 -1
  56. django_ledger/templates/django_ledger/financial_statements/income_statement.html +4 -1
  57. django_ledger/templates/django_ledger/financial_statements/tags/balance_sheet_statement.html +27 -3
  58. django_ledger/templates/django_ledger/financial_statements/tags/cash_flow_statement.html +16 -4
  59. django_ledger/templates/django_ledger/financial_statements/tags/income_statement.html +73 -18
  60. django_ledger/templates/django_ledger/includes/widget_ratios.html +18 -24
  61. django_ledger/templates/django_ledger/invoice/includes/card_invoice.html +3 -3
  62. django_ledger/templates/django_ledger/layouts/base.html +7 -2
  63. django_ledger/templates/django_ledger/layouts/content_layout_1.html +1 -1
  64. django_ledger/templates/django_ledger/receipt/customer_receipt_report.html +115 -0
  65. django_ledger/templates/django_ledger/receipt/receipt_delete.html +30 -0
  66. django_ledger/templates/django_ledger/receipt/receipt_detail.html +89 -0
  67. django_ledger/templates/django_ledger/receipt/receipt_list.html +134 -0
  68. django_ledger/templates/django_ledger/receipt/vendor_receipt_report.html +115 -0
  69. django_ledger/templates/django_ledger/vendor/tags/vendor_table.html +12 -7
  70. django_ledger/templates/django_ledger/vendor/vendor_detail.html +86 -0
  71. django_ledger/templatetags/django_ledger.py +338 -191
  72. django_ledger/tests/test_accounts.py +1 -2
  73. django_ledger/tests/test_io.py +17 -0
  74. django_ledger/tests/test_purchase_order.py +3 -3
  75. django_ledger/tests/test_transactions.py +1 -2
  76. django_ledger/urls/__init__.py +1 -4
  77. django_ledger/urls/customer.py +3 -0
  78. django_ledger/urls/data_import.py +3 -0
  79. django_ledger/urls/receipt.py +102 -0
  80. django_ledger/urls/vendor.py +1 -0
  81. django_ledger/views/__init__.py +1 -0
  82. django_ledger/views/bill.py +8 -11
  83. django_ledger/views/chart_of_accounts.py +6 -4
  84. django_ledger/views/closing_entry.py +11 -7
  85. django_ledger/views/customer.py +68 -30
  86. django_ledger/views/data_import.py +120 -66
  87. django_ledger/views/djl_api.py +3 -5
  88. django_ledger/views/entity.py +2 -4
  89. django_ledger/views/estimate.py +3 -7
  90. django_ledger/views/inventory.py +3 -5
  91. django_ledger/views/invoice.py +4 -6
  92. django_ledger/views/item.py +7 -11
  93. django_ledger/views/journal_entry.py +1 -2
  94. django_ledger/views/mixins.py +125 -93
  95. django_ledger/views/purchase_order.py +24 -35
  96. django_ledger/views/receipt.py +294 -0
  97. django_ledger/views/unit.py +1 -2
  98. django_ledger/views/vendor.py +54 -16
  99. {django_ledger-0.7.11.dist-info → django_ledger-0.8.1.dist-info}/METADATA +43 -75
  100. {django_ledger-0.7.11.dist-info → django_ledger-0.8.1.dist-info}/RECORD +104 -122
  101. {django_ledger-0.7.11.dist-info → django_ledger-0.8.1.dist-info}/WHEEL +1 -1
  102. django_ledger-0.8.1.dist-info/top_level.txt +1 -0
  103. django_ledger/contrib/django_ledger_graphene/__init__.py +0 -0
  104. django_ledger/contrib/django_ledger_graphene/accounts/schema.py +0 -33
  105. django_ledger/contrib/django_ledger_graphene/api.py +0 -42
  106. django_ledger/contrib/django_ledger_graphene/apps.py +0 -6
  107. django_ledger/contrib/django_ledger_graphene/auth/mutations.py +0 -49
  108. django_ledger/contrib/django_ledger_graphene/auth/schema.py +0 -6
  109. django_ledger/contrib/django_ledger_graphene/bank_account/mutations.py +0 -61
  110. django_ledger/contrib/django_ledger_graphene/bank_account/schema.py +0 -34
  111. django_ledger/contrib/django_ledger_graphene/bill/mutations.py +0 -0
  112. django_ledger/contrib/django_ledger_graphene/bill/schema.py +0 -34
  113. django_ledger/contrib/django_ledger_graphene/coa/mutations.py +0 -0
  114. django_ledger/contrib/django_ledger_graphene/coa/schema.py +0 -30
  115. django_ledger/contrib/django_ledger_graphene/customers/__init__.py +0 -0
  116. django_ledger/contrib/django_ledger_graphene/customers/mutations.py +0 -71
  117. django_ledger/contrib/django_ledger_graphene/customers/schema.py +0 -43
  118. django_ledger/contrib/django_ledger_graphene/data_import/mutations.py +0 -0
  119. django_ledger/contrib/django_ledger_graphene/data_import/schema.py +0 -0
  120. django_ledger/contrib/django_ledger_graphene/entity/mutations.py +0 -0
  121. django_ledger/contrib/django_ledger_graphene/entity/schema.py +0 -94
  122. django_ledger/contrib/django_ledger_graphene/item/mutations.py +0 -0
  123. django_ledger/contrib/django_ledger_graphene/item/schema.py +0 -31
  124. django_ledger/contrib/django_ledger_graphene/journal_entry/mutations.py +0 -0
  125. django_ledger/contrib/django_ledger_graphene/journal_entry/schema.py +0 -35
  126. django_ledger/contrib/django_ledger_graphene/ledger/mutations.py +0 -0
  127. django_ledger/contrib/django_ledger_graphene/ledger/schema.py +0 -32
  128. django_ledger/contrib/django_ledger_graphene/purchase_order/mutations.py +0 -0
  129. django_ledger/contrib/django_ledger_graphene/purchase_order/schema.py +0 -31
  130. django_ledger/contrib/django_ledger_graphene/transaction/mutations.py +0 -0
  131. django_ledger/contrib/django_ledger_graphene/transaction/schema.py +0 -36
  132. django_ledger/contrib/django_ledger_graphene/unit/mutations.py +0 -0
  133. django_ledger/contrib/django_ledger_graphene/unit/schema.py +0 -27
  134. django_ledger/contrib/django_ledger_graphene/vendor/mutations.py +0 -0
  135. django_ledger/contrib/django_ledger_graphene/vendor/schema.py +0 -37
  136. django_ledger/contrib/django_ledger_graphene/views.py +0 -12
  137. django_ledger-0.7.11.dist-info/top_level.txt +0 -4
  138. {django_ledger-0.7.11.dist-info → django_ledger-0.8.1.dist-info/licenses}/AUTHORS.md +0 -0
  139. {django_ledger-0.7.11.dist-info → django_ledger-0.8.1.dist-info/licenses}/LICENSE +0 -0
@@ -5,10 +5,13 @@
5
5
 
6
6
  <div class="card">
7
7
  <div class="card-content">
8
- <p class="title has-text-weight-light">
9
- <span class="icon is-medium">{% icon "ic:baseline-business" 36 %}</span>{{ entity.name }}
10
- </p>
11
- <p class="subtitle">{{ entity.address_1 }}</p>
8
+ <h1 class="is-size-3 has-text-weight-light">
9
+ <span class="icon is-medium mr-3">
10
+ {% icon "ic:baseline-business" 36 %}
11
+ </span>{{ entity.name }}
12
+ </h1>
13
+ <h2>{{ entity.address_1 }}</h2>
14
+
12
15
  <h3 class="is-size-4 has-text-weight-light">
13
16
  {% if entity.is_accrual_method %}
14
17
  <span class="icon is-medium has-text-info">
@@ -19,11 +22,14 @@
19
22
  {% icon 'bi:cash-stack' 24 %}</span>
20
23
  {% trans 'Cash Method' %}
21
24
  {% endif %}
22
-
23
25
  </h3>
24
26
 
25
27
  <h4>Created: {{ entity.created | timesince }} ago</h4>
26
- <p class="is-italic">{% trans 'Last Closing Date' %}: {{ entity.last_closing_date }}</p>
28
+ {% if entity.last_closing_date %}
29
+ <p class="is-italic">{% trans 'Last Closing Date' %}:
30
+ {{ entity.last_closing_date }}
31
+ </p>
32
+ {% endif %}
27
33
  </div>
28
34
  <footer class="card-footer">
29
35
  <a href="{{ entity.get_dashboard_url }}" class="card-footer-item">Dashboard</a>
@@ -36,7 +36,7 @@
36
36
  {% elif month %}{{ from_date | date:'F, Y' }}
37
37
  {% else %}{% trans 'Fiscal Year' %} {{ year }}
38
38
  {% endif %}</h2>
39
- <h3 class="is-size-4 is-italic has-font-weight-light">As Of {{ to_date | date:'m/d/Y' }}</h3>
39
+ <h3 class="is-size-4 is-italic has-font-weight-light">{% trans 'As of' %} {{ to_date | date:'F j, Y' }}</h3>
40
40
  </div>
41
41
  </div>
42
42
  </div>
@@ -38,7 +38,10 @@
38
38
  {% else %}{% trans 'Fiscal Year' %} {{ year }}
39
39
  {% endif %}</h2>
40
40
  <h3 class="is-size-4 is-italic has-font-weight-light">
41
- {{ from_date | date:'m/d/Y' }} - {{ to_date | date:'m/d/Y' }}
41
+ {% if month %}{% trans 'For the month ended' %} {{ to_date | date:'F j, Y' }}
42
+ {% elif quarter %}{% trans 'For the quarter ended' %} {{ to_date | date:'F j, Y' }}
43
+ {% else %}{% trans 'For the fiscal year ended' %} {{ to_date | date:'F j, Y' }}
44
+ {% endif %}
42
45
  </h3>
43
46
  </div>
44
47
  </div>
@@ -35,7 +35,10 @@
35
35
  {% else %}Fiscal Year {{ year }}
36
36
  {% endif %}</h2>
37
37
  <h3 class="is-size-4 is-italic has-font-weight-light">
38
- {{ from_date | date:'m/d/Y' }} - {{ to_date | date:'m/d/Y' }}
38
+ {% if month %}{% trans 'For the month ended' %} {{ to_date | date:'F j, Y' }}
39
+ {% elif quarter %}{% trans 'For the quarter ended' %} {{ to_date | date:'F j, Y' }}
40
+ {% else %}{% trans 'For the fiscal year ended' %} {{ to_date | date:'F j, Y' }}
41
+ {% endif %}
39
42
  </h3>
40
43
  </div>
41
44
  </div>
@@ -1,8 +1,18 @@
1
1
  {% load django_ledger %}
2
2
  {% load i18n %}
3
3
 
4
+ <style>
5
+ /* Align currency columns on balance sheet tables */
6
+ table.financial-statement thead th:nth-last-child(2),
7
+ table.financial-statement tbody td:nth-last-child(2),
8
+ table.financial-statement thead th:last-child,
9
+ table.financial-statement tbody td:last-child {
10
+ text-align: right;
11
+ }
12
+ </style>
13
+
4
14
  <div class="table-container">
5
- <table class="table is-fullwidth is-narrow is-striped">
15
+ <table class="table is-fullwidth is-narrow is-striped is-hoverable is-bordered financial-statement">
6
16
  <tbody>
7
17
  {% for bs_role, bs_role_data in tx_digest.balance_sheet.items %}
8
18
  {% if bs_role_data.is_block %}
@@ -23,7 +33,7 @@
23
33
  <th class="has-text-centered">{% trans 'Unit' %}</th>
24
34
  {% endif %}
25
35
  <th class="has-text-centered">{% trans 'Balance Type' %}</th>
26
- <th class="has-text-centered">{% trans 'Balance Through' %} {{ tx_digest.to_date | date }}</th>
36
+ <th class="has-text-right">{% trans 'Balance Through' %} {{ tx_digest.to_date | date }}</th>
27
37
  <th class="has-text-centered">{% trans 'Actions' %}</th>
28
38
  </tr>
29
39
 
@@ -46,7 +56,21 @@
46
56
  {% if tx_digest.by_unit %}
47
57
  <td>{% if acc.unit_name %}{{ acc.unit_name }}{% endif %}</td>
48
58
  {% endif %}
49
- <td class="has-text-centered">{{ acc.balance_type.0 | upper }}</td>
59
+ <td class="has-text-centered">
60
+ {% if acc.balance_type == 'debit' %}
61
+ <span class="tag is-info is-light">
62
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-down' 16 %}</span>
63
+ debit
64
+ </span>
65
+ {% elif acc.balance_type == 'credit' %}
66
+ <span class="tag is-success is-light">
67
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-up' 16 %}</span>
68
+ credit
69
+ </span>
70
+ {% else %}
71
+ <span class="tag is-light">{{ acc.balance_type }}</span>
72
+ {% endif %}
73
+ </td>
50
74
  <td class="has-text-right">{% currency_symbol %}{{ acc.balance | currency_format }}</td>
51
75
  <td>
52
76
  <div class="dropdown is-hoverable" id="account-action-{{ account.uuid }}">
@@ -1,10 +1,22 @@
1
1
  {% load django_ledger %}
2
2
  {% load i18n %}
3
3
 
4
+ <style>
5
+ table.financial-statement thead th:last-child,
6
+ table.financial-statement tbody td:last-child,
7
+ table.financial-statement tfoot td:last-child {
8
+ text-align: right;
9
+ }
10
+
11
+ table.financial-statement tfoot td {
12
+ font-weight: 700;
13
+ }
14
+ </style>
15
+
4
16
  <div class="table-container">
5
17
 
6
18
  {# OPERATING ACTIVITIES #}
7
- <table class="table is-fullwidth is-narrow is-striped">
19
+ <table class="table is-fullwidth is-narrow is-striped is-hoverable is-bordered financial-statement">
8
20
  <thead>
9
21
  <tr>
10
22
  <td class="has-text-weight-light is-size-3">{% trans 'Cash from Operating Activities' %}</td>
@@ -96,7 +108,7 @@
96
108
  </table>
97
109
 
98
110
  {# FINANCING ACTIVITIES #}
99
- <table class="table is-fullwidth is-narrow is-striped">
111
+ <table class="table is-fullwidth is-narrow is-striped is-hoverable is-bordered financial-statement">
100
112
  <thead>
101
113
  <tr>
102
114
  <td class="has-text-weight-light is-size-3">{% trans 'Cash from Financing Activities' %}</td>
@@ -146,7 +158,7 @@
146
158
  </table>
147
159
 
148
160
  {# INVESTING ACTIVITIES #}
149
- <table class="table is-fullwidth is-narrow is-striped">
161
+ <table class="table is-fullwidth is-narrow is-striped is-hoverable is-bordered financial-statement">
150
162
  <thead>
151
163
  <tr>
152
164
  <td class="has-text-weight-light is-size-3">{% trans 'Cash from Investing Activities' %}</td>
@@ -185,7 +197,7 @@
185
197
  </table>
186
198
 
187
199
  {# NET CASH #}
188
- <table class="table is-fullwidth is-narrow is-stripped">
200
+ <table class="table is-fullwidth is-narrow is-striped is-hoverable is-bordered financial-statement">
189
201
  <thead>
190
202
  <tr>
191
203
  <td class="has-text-weight-light is-size-3">{% trans 'Net Cashflow' %}</td>
@@ -1,9 +1,21 @@
1
1
  {% load django_ledger %}
2
2
  {% load i18n %}
3
3
 
4
+ <style>
5
+ /* Align currency (2nd-to-last column) to the right for financial-statement tables */
6
+ table.financial-statement thead th:nth-last-child(2),
7
+ table.financial-statement tbody td:nth-last-child(2) {
8
+ text-align: right;
9
+ }
10
+
11
+ table.financial-statement tfoot td {
12
+ font-weight: 700;
13
+ }
14
+ </style>
4
15
 
5
16
  <div class="table-container">
6
- <table class="table is-fullwidth is-narrow is-striped">
17
+ <table class="table is-fullwidth is-narrow is-striped is-hoverable is-bordered financial-statement">
18
+ <thead>
7
19
  <tr>
8
20
  <th>{% trans 'Account Number' %}</th>
9
21
  <th>{% trans 'Description' %}</th>
@@ -11,13 +23,15 @@
11
23
  <th>{% trans 'Unit' %}</th>
12
24
  {% endif %}
13
25
  <th>{% trans 'Balance Type' %}</th>
14
- <th>{% trans 'Balance' %}</th>
26
+ <th class="has-text-right">{% trans 'Balance' %}</th>
15
27
  <th>{% trans 'Actions' %}</th>
16
28
  </tr>
29
+ </thead>
30
+ <tbody>
17
31
 
18
32
  {# OPERATING INCOME #}
19
33
  <tr>
20
- <td><h2 class="is-size-3 has-text-left">{% trans 'Operating Revenues' %}</h2></td>
34
+ <td><h2 class="is-size-4 has-text-left">{% trans 'Operating Revenues' %}</h2></td>
21
35
  <td></td>
22
36
  {% if tx_digest.by_unit %}
23
37
  <td></td>
@@ -36,12 +50,20 @@
36
50
  {% endif %}
37
51
  <td class="has-text-centered">
38
52
  {% if acc.balance_type == 'debit' %}
39
- <span class="icon">{% icon 'bi:arrow-bar-down' 24 %}</span>
53
+ <span class="tag is-info is-light">
54
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-down' 16 %}</span>
55
+ debit
56
+ </span>
40
57
  {% elif acc.balance_type == 'credit' %}
41
- <span class="icon">{% icon 'bi:arrow-bar-up' 24 %}</span>
58
+ <span class="tag is-success is-light">
59
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-up' 16 %}</span>
60
+ credit
61
+ </span>
62
+ {% else %}
63
+ <span class="tag is-light">{{ acc.balance_type }}</span>
42
64
  {% endif %}
43
65
  </td>
44
- <td>{% currency_symbol %}{{ acc.balance | currency_format }}</td>
66
+ <td class="has-text-right">{% currency_symbol %}{{ acc.balance | currency_format }}</td>
45
67
  <td>
46
68
  <div class="dropdown is-hoverable" id="account-action-{{ account.uuid }}">
47
69
  <div class="dropdown-trigger">
@@ -79,7 +101,7 @@
79
101
 
80
102
  {# COGS #}
81
103
  <tr>
82
- <td><h2 class="is-size-3 has-text-left">{% trans 'Less: Cost of Goods Sold' %}</h2></td>
104
+ <td><h2 class="is-size-4 has-text-left">{% trans 'Less: Cost of Goods Sold' %}</h2></td>
83
105
  <td></td>
84
106
  {% if tx_digest.by_unit %}
85
107
  <td></td>
@@ -97,9 +119,17 @@
97
119
  {% endif %}
98
120
  <td class="has-text-centered">
99
121
  {% if acc.balance_type == 'debit' %}
100
- <span class="icon">{% icon 'bi:arrow-bar-down' 24 %}</span>
122
+ <span class="tag is-info is-light">
123
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-down' 16 %}</span>
124
+ debit
125
+ </span>
101
126
  {% elif acc.balance_type == 'credit' %}
102
- <span class="icon">{% icon 'bi:arrow-bar-up' 24 %}</span>
127
+ <span class="tag is-success is-light">
128
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-up' 16 %}</span>
129
+ credit
130
+ </span>
131
+ {% else %}
132
+ <span class="tag is-light">{{ acc.balance_type }}</span>
103
133
  {% endif %}
104
134
  </td>
105
135
  <td>{% currency_symbol %}{{ acc.balance | reverse_sign | currency_format }}</td>
@@ -153,7 +183,7 @@
153
183
 
154
184
  {# OPERATING EXPENSES #}
155
185
  <tr>
156
- <td><h2 class="is-size-3 has-text-left">{% trans 'Operating Expenses' %}</h2></td>
186
+ <td><h2 class="is-size-4 has-text-left">{% trans 'Operating Expenses' %}</h2></td>
157
187
  <td></td>
158
188
  {% if tx_digest.by_unit %}
159
189
  <td></td>
@@ -171,9 +201,17 @@
171
201
  {% endif %}
172
202
  <td class="has-text-centered">
173
203
  {% if acc.balance_type == 'debit' %}
174
- <span class="icon">{% icon 'bi:arrow-bar-down' 24 %}</span>
204
+ <span class="tag is-info is-light">
205
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-down' 16 %}</span>
206
+ debit
207
+ </span>
175
208
  {% elif acc.balance_type == 'credit' %}
176
- <span class="icon">{% icon 'bi:arrow-bar-up' 24 %}</span>
209
+ <span class="tag is-success is-light">
210
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-up' 16 %}</span>
211
+ credit
212
+ </span>
213
+ {% else %}
214
+ <span class="tag is-light">{{ acc.balance_type }}</span>
177
215
  {% endif %}
178
216
  </td>
179
217
  <td>{% currency_symbol %}{{ acc.balance | reverse_sign | currency_format }}</td>
@@ -227,7 +265,7 @@
227
265
 
228
266
  {# OTHER REVENUES #}
229
267
  <tr>
230
- <td><h2 class="is-size-3 has-text-left">{% trans 'Other Revenues' %}</h2></td>
268
+ <td><h2 class="is-size-4 has-text-left">{% trans 'Other Revenues' %}</h2></td>
231
269
  <td></td>
232
270
  {% if tx_digest.by_unit %}
233
271
  <td></td>
@@ -245,9 +283,17 @@
245
283
  {% endif %}
246
284
  <td class="has-text-centered">
247
285
  {% if acc.balance_type == 'debit' %}
248
- <span class="icon">{% icon 'bi:arrow-bar-down' 24 %}</span>
286
+ <span class="tag is-info is-light">
287
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-down' 16 %}</span>
288
+ debit
289
+ </span>
249
290
  {% elif acc.balance_type == 'credit' %}
250
- <span class="icon">{% icon 'bi:arrow-bar-up' 24 %}</span>
291
+ <span class="tag is-success is-light">
292
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-up' 16 %}</span>
293
+ credit
294
+ </span>
295
+ {% else %}
296
+ <span class="tag is-light">{{ acc.balance_type }}</span>
251
297
  {% endif %}
252
298
  </td>
253
299
  <td class="is-size-5">{% currency_symbol %}{{ acc.balance | currency_format }}</td>
@@ -288,7 +334,7 @@
288
334
 
289
335
  {# OTHER EXPENSES #}
290
336
  <tr>
291
- <td><h2 class="is-size-3 has-text-left">{% trans 'Other Expenses' %}</h2></td>
337
+ <td><h2 class="is-size-4 has-text-left">{% trans 'Other Expenses' %}</h2></td>
292
338
  <td></td>
293
339
  {% if tx_digest.by_unit %}
294
340
  <td></td>
@@ -306,9 +352,17 @@
306
352
  {% endif %}
307
353
  <td class="has-text-centered">
308
354
  {% if acc.balance_type == 'debit' %}
309
- <span class="icon">{% icon 'bi:arrow-bar-down' 24 %}</span>
355
+ <span class="tag is-info is-light">
356
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-down' 16 %}</span>
357
+ debit
358
+ </span>
310
359
  {% elif acc.balance_type == 'credit' %}
311
- <span class="icon">{% icon 'bi:arrow-bar-up' 24 %}</span>
360
+ <span class="tag is-success is-light">
361
+ <span class="icon is-small mr-1">{% icon 'bi:arrow-bar-up' 16 %}</span>
362
+ credit
363
+ </span>
364
+ {% else %}
365
+ <span class="tag is-light">{{ acc.balance_type }}</span>
312
366
  {% endif %}
313
367
  </td>
314
368
  <td class="is-size-5">{% currency_symbol %}{{ acc.balance | reverse_sign | currency_format }}</td>
@@ -375,5 +429,6 @@
375
429
  <td></td>
376
430
  </tr>
377
431
 
432
+ </tbody>
378
433
  </table>
379
434
  </div>
@@ -6,51 +6,45 @@
6
6
  <h4>Solvency:</h4>
7
7
  <h5 class="has-text-weight-light">Current
8
8
  Ratio: {{ tx_digest.ratios.current_ratio | currency_format }}</h5>
9
- <progress
10
- class="progress {{ tx_digest.ratios.current_ratio | fin_ratio_threshold_class:'current_ratio' }}"
11
- value="{{ tx_digest.ratios.current_ratio }}"
12
- max="{% fin_ratio_max_value ratio='current_ratio' %}">
9
+ <progress class="progress {{ tx_digest.ratios.current_ratio | fin_ratio_threshold_class:'current_ratio' }}"
10
+ value="{{ tx_digest.ratios.current_ratio }}"
11
+ max="{% fin_ratio_max_value ratio='current_ratio' %}">
13
12
  {{ tx_digest.ratios.current_ratio }}</progress>
14
13
  <h5 class="has-text-weight-light">Quick
15
14
  Ratio: {{ tx_digest.ratios.quick_ratio | currency_format }} </h5>
16
- <progress
17
- class="progress {{ tx_digest.ratios.quick_ratio | fin_ratio_threshold_class:'quick_ratio' }}"
18
- value="{{ tx_digest.ratios.quick_ratio }}"
19
- max="{% fin_ratio_max_value ratio='quick_ratio' %}">
15
+ <progress class="progress {{ tx_digest.ratios.quick_ratio | fin_ratio_threshold_class:'quick_ratio' }}"
16
+ value="{{ tx_digest.ratios.quick_ratio }}"
17
+ max="{% fin_ratio_max_value ratio='quick_ratio' %}">
20
18
  {{ tx_digest.ratios.current_ratio }}</progress>
21
19
 
22
20
  <h4>Leverage:</h4>
23
21
  <h5 class="has-text-weight-light">Debt to
24
22
  Equity: {{ tx_digest.ratios.debt_to_equity | currency_format }} </h5>
25
- <progress
26
- class="progress {{ tx_digest.ratios.debt_to_equity | fin_ratio_threshold_class:'debt_to_equity' }}"
27
- value="{{ tx_digest.ratios.debt_to_equity }}"
28
- max="{% fin_ratio_max_value ratio='debt_to_equity' %}">
23
+ <progress class="progress {{ tx_digest.ratios.debt_to_equity | fin_ratio_threshold_class:'debt_to_equity' }}"
24
+ value="{{ tx_digest.ratios.debt_to_equity }}"
25
+ max="{% fin_ratio_max_value ratio='debt_to_equity' %}">
29
26
  {{ tx_digest.ratios.debt_to_equity }}</progress>
30
27
 
31
28
 
32
29
  <h4>Profitability:</h4>
33
30
  <h5 class="has-text-weight-light">Return on
34
31
  Equity: {{ tx_digest.ratios.return_on_equity | percentage }} </h5>
35
- <progress
36
- class="progress {{ tx_digest.ratios.quick_ratio | fin_ratio_threshold_class:'quick_ratio' }}"
37
- value="{{ tx_digest.ratios.return_on_equity }}"
38
- max="{% fin_ratio_max_value ratio='return_on_equity' %}">
32
+ <progress class="progress {{ tx_digest.ratios.quick_ratio | fin_ratio_threshold_class:'quick_ratio' }}"
33
+ value="{{ tx_digest.ratios.return_on_equity }}"
34
+ max="{% fin_ratio_max_value ratio='return_on_equity' %}">
39
35
  {{ tx_digest.ratios.return_on_equity }}</progress>
40
36
 
41
37
  <h5 class="has-text-weight-light">Return on
42
38
  Assets: {{ tx_digest.ratios.return_on_assets | percentage }} </h5>
43
- <progress
44
- class="progress {{ tx_digest.ratios.return_on_assets | fin_ratio_threshold_class:'return_on_assets' }}"
45
- value="{{ tx_digest.ratios.return_on_assets }}"
46
- max="{% fin_ratio_max_value ratio='return_on_assets' %}">{{ tx_digest.ratios.return_on_assets }}</progress>
39
+ <progress class="progress {{ tx_digest.ratios.return_on_assets | fin_ratio_threshold_class:'return_on_assets' }}"
40
+ value="{{ tx_digest.ratios.return_on_assets }}"
41
+ max="{% fin_ratio_max_value ratio='return_on_assets' %}">{{ tx_digest.ratios.return_on_assets }}</progress>
47
42
 
48
43
  <h5 class="has-text-weight-light">Net Profit
49
44
  Margin: {{ tx_digest.ratios.net_profit_margin | percentage }} </h5>
50
- <progress
51
- class="progress {{ tx_digest.ratios.net_profit_margin | fin_ratio_threshold_class:'net_profit_margin' }}"
52
- value="{{ tx_digest.ratios.net_profit_margin }}"
53
- max="{% fin_ratio_max_value ratio='net_profit_margin' %}">{{ tx_digest.ratios.net_profit_margin }}</progress>
45
+ <progress class="progress {{ tx_digest.ratios.net_profit_margin | fin_ratio_threshold_class:'net_profit_margin' }}"
46
+ value="{{ tx_digest.ratios.net_profit_margin }}"
47
+ max="{% fin_ratio_max_value ratio='net_profit_margin' %}">{{ tx_digest.ratios.net_profit_margin }}</progress>
54
48
 
55
49
  <h5 class="has-text-weight-light">Gross Profit
56
50
  Margin: {{ tx_digest.ratios.gross_profit_margin | percentage }} </h5>
@@ -8,8 +8,8 @@
8
8
  <p class="subtitle has-text-grey has-text-right">
9
9
  <span class="icon">{% icon "bi:cash-stack" 16 %}</span>
10
10
  {% trans 'Invoice' %}</p>
11
- <p class="title">{{ invoice.customer.customer_name }}</p>
12
- <p class="subtitle has-text-weight-light">{{ invoice.customer.address_1 }}</p>
11
+ <h2 class="title">{{ invoice.customer.customer_name }}</h2>
12
+ <h3 class="has-text-weight-light">{{ invoice.customer.address_1 }}</h3>
13
13
  {% if not invoice.is_past_due %}
14
14
  <p class="is-size-5 has-text-info">{% trans 'Due in' %}: {{ invoice.date_due | timeuntil }}</p>
15
15
  {% else %}
@@ -31,7 +31,7 @@
31
31
  value="{{ invoice.get_progress_percent }}"
32
32
  max="100">{{ invoice.get_progress | percentage }}
33
33
  </progress>
34
- {% modal_action invoice 'get' entity_slug %}#}
34
+ {% modal_action invoice 'get' entity_slug %}
35
35
  </div>
36
36
  <footer class="card-footer">
37
37
  <a href="{% url 'django_ledger:invoice-detail' entity_slug=entity_slug invoice_pk=invoice.uuid %}"
@@ -7,8 +7,13 @@
7
7
  <head>
8
8
  <meta charset="utf-8">
9
9
  <meta name="viewport" content="width=device-width, initial-scale=1">
10
- <title>{% block page_title %}{% session_entity_name %} | {{ page_title }}{% endblock %}</title>
11
- <script src="{% static 'django_ledger/bundle/styles.bundle.js' %}"></script>
10
+ <title>{% block page_title %}{{ page_title }} | {{ entity_model.name | default:'' }}{% endblock %}</title>
11
+
12
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma@1.0.4/css/bulma.min.css">
13
+ <link rel="stylesheet" href="{% static 'django_ledger/css/djl_styles.css' %}">
14
+ <link rel="stylesheet"
15
+ href="https://cdn.rawgit.com/jenil/bulmaswatch/gh-pages/{{ DJANGO_LEDGER_THEME }}/bulmaswatch.min.css">
16
+
12
17
  <link rel="shortcut icon" type="image/jpg" href="{% static 'django_ledger/logo/favicon.png' %}">
13
18
 
14
19
  {% block header_extra_js %}{% endblock %}
@@ -8,7 +8,7 @@
8
8
 
9
9
  {# SIDE MENU #}
10
10
  {% if not hide_menu %}
11
- <div class="column is-3 is-hidden-mobile is-hidden-tablet-only">
11
+ <div class="column is-2 is-hidden-mobile is-hidden-tablet-only">
12
12
  <div class="columns is-multiline">
13
13
  {% block aux_menu %}{% endblock %}
14
14
  <div class="column is-12">
@@ -0,0 +1,115 @@
1
+ {% extends 'django_ledger/layouts/content_layout_1.html' %}
2
+ {% load i18n %}
3
+ {% load django_ledger %}
4
+
5
+ {% block view_content %}
6
+ <div class="box">
7
+ <div class="level">
8
+ <div class="level-left">
9
+ <div class="level-item">
10
+ {% if month %}
11
+ <h1 class="is-size-1 has-text-weight-thin">{{ month|date:'F Y' }} {% trans 'Customer Receipts' %} — {{ customer_model.customer_name }}</h1>
12
+ {% elif year %}
13
+ <h1 class="is-size-1 has-text-weight-thin">{{ year|date:'Y' }} {% trans 'Customer Receipts' %} — {{ customer_model.customer_name }}</h1>
14
+ {% else %}
15
+ <h1 class="is-size-1 has-text-weight-thin">{% trans 'Customer Receipts' %} — {{ customer_model.customer_name }}</h1>
16
+ {% endif %}
17
+ </div>
18
+ </div>
19
+ <div class="level-right">
20
+ {% if page_obj %}
21
+ {% if page_obj.has_previous %}
22
+ <div class="level-item">
23
+ <a href="?page={{ page_obj.previous_page_number }}"
24
+ class="button is-small is-dark is-outlined">
25
+ <span class="icon is-small">{% icon 'ant-design:left-circle-outlined' 24 %}</span>
26
+ </a>
27
+ </div>
28
+ {% endif %}
29
+ <div class="level-item">
30
+ <p class="is-italic">page {{ page_obj.number }} of {{ page_obj.paginator.num_pages }}</p>
31
+ </div>
32
+ {% if page_obj.has_next %}
33
+ <div class="level-item">
34
+ <a href="?page={{ page_obj.next_page_number }}"
35
+ class="button is-small is-dark is-outlined">
36
+ <span class="icon is-small">{% icon 'ant-design:right-circle-outlined' 24 %}</span>
37
+ </a>
38
+ </div>
39
+ {% endif %}
40
+ {% endif %}
41
+ </div>
42
+ </div>
43
+
44
+ <table class="table is-fullwidth is-striped">
45
+ <thead>
46
+ <tr>
47
+ <th>{% trans 'Date' %}</th>
48
+ <th>{% trans 'Receipt #' %}</th>
49
+ <th>{% trans 'Type' %}</th>
50
+ <th>{% trans 'Imported' %}</th>
51
+ <th>{% trans 'Actions' %}</th>
52
+ </tr>
53
+ </thead>
54
+ <tbody>
55
+ {% for r in receipt_list %}
56
+ <tr>
57
+ <td>{{ r.receipt_date }}</td>
58
+ <td><a href="{{ r.get_absolute_url }}">{{ r.receipt_number }}</a></td>
59
+ <td>{{ r.get_receipt_type_display }}</td>
60
+ <td>
61
+ {% if r.staged_transaction_model %}
62
+ <a href="{{ r.get_staged_tx_url }}">
63
+ {% trans 'Staged TX' %}
64
+ </a>
65
+ <span class="is-size-7 has-text-grey"> · </span>
66
+ <a href="{{ r.get_import_job_url }}">
67
+ {% trans 'Bank Feed Job' %}
68
+ </a>
69
+ {% else %}
70
+
71
+ {% endif %}
72
+ </td>
73
+ <td>
74
+ <a class="button is-small is-danger is-outlined" href="{{ r.get_delete_url }}">
75
+ {% trans 'Undo/Delete' %}
76
+ </a>
77
+ </td>
78
+ </tr>
79
+ {% empty %}
80
+ <tr>
81
+ <td colspan="5" class="has-text-centered">{% trans 'No receipts found.' %}</td>
82
+ </tr>
83
+ {% endfor %}
84
+ </tbody>
85
+ </table>
86
+
87
+ {% if year %}
88
+ <h5 class="is-size-5">{% trans 'Go to quarter:' %}</h5>
89
+ <p>
90
+ {% for q in '1234' %}
91
+ <a href="{% url 'django_ledger:receipt-report-customer-quarter' entity_slug=view.kwargs.entity_slug customer_pk=customer_model.uuid year=year quarter=q %}">Q{{ q }}{% if not forloop.last %} > {% endif %}</a>
92
+ {% endfor %}
93
+ </p>
94
+ <h5 class="is-size-5">{% trans 'Go to month:' %}</h5>
95
+ <p>
96
+ <a href="{% url 'django_ledger:receipt-report-customer' entity_slug=view.kwargs.entity_slug customer_pk=customer_model.uuid %}">{% trans 'All' %} |</a>
97
+ {% for date in date_list %}
98
+ <a href="{% url 'django_ledger:receipt-report-customer-month' entity_slug=view.kwargs.entity_slug customer_pk=customer_model.uuid year=date.year month=date.month %}">
99
+ {{ date | date:'F' }}{% if not forloop.last %} > {% endif %}
100
+ </a>
101
+ {% endfor %}
102
+ </p>
103
+ {% else %}
104
+ <h5 class="is-size-5">{% trans 'Go to year:' %}</h5>
105
+ <p>
106
+ <a href="{% url 'django_ledger:receipt-report-customer' entity_slug=view.kwargs.entity_slug customer_pk=customer_model.uuid %}">{% trans 'All' %} |</a>
107
+ {% for date in date_list %}
108
+ <a href="{% url 'django_ledger:receipt-report-customer-year' entity_slug=view.kwargs.entity_slug customer_pk=customer_model.uuid year=date.year %}">
109
+ {{ date.year }}{% if not forloop.last %} > {% endif %}
110
+ </a>
111
+ {% endfor %}
112
+ </p>
113
+ {% endif %}
114
+ </div>
115
+ {% endblock %}
@@ -0,0 +1,30 @@
1
+ {% extends 'django_ledger/layouts/content_layout_1.html' %}
2
+ {% load i18n %}
3
+ {% load django_ledger %}
4
+
5
+ {% block view_content %}
6
+ <div class="columns is-centered">
7
+ <div class="column is-6">
8
+ <form action="{{ receipt.get_delete_url }}"
9
+ method="post">
10
+ {% csrf_token %}
11
+ <div class="card">
12
+ <div class="card-content has-text-centered">
13
+ <p class="title has-text-weight-light">{% trans 'Are you sure you want to delete' %}
14
+ {% trans 'Receipt' %} {{ receipt.receipt_number }}?</p>
15
+ </div>
16
+ <div class="card-content has-text-centered">
17
+ <p class="subtitle">{% trans 'All transactions posted by this receipt will be removed from its ledger if deletion is allowed.' %}</p>
18
+ </div>
19
+ <div class="card-content has-text-centered">
20
+ <a href="{{ receipt.get_absolute_url }}"
21
+ class="button is-primary">{% trans 'Go Back' %}</a>
22
+ <button type="submit" class="button is-danger">{% trans 'Delete' %}</button>
23
+ </div>
24
+
25
+ </div>
26
+ </form>
27
+ </div>
28
+
29
+ </div>
30
+ {% endblock %}