django-ledger 0.6.1__py3-none-any.whl → 0.6.2__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/io/io_core.py +2 -2
- django_ledger/templates/django_ledger/financial_statements/tags/balance_sheet_statement.html +0 -1
- django_ledger/templatetags/django_ledger.py +1 -1
- django_ledger/views/entity.py +2 -2
- django_ledger/views/mixins.py +40 -19
- {django_ledger-0.6.1.dist-info → django_ledger-0.6.2.dist-info}/METADATA +1 -1
- {django_ledger-0.6.1.dist-info → django_ledger-0.6.2.dist-info}/RECORD +12 -12
- {django_ledger-0.6.1.dist-info → django_ledger-0.6.2.dist-info}/AUTHORS.md +0 -0
- {django_ledger-0.6.1.dist-info → django_ledger-0.6.2.dist-info}/LICENSE +0 -0
- {django_ledger-0.6.1.dist-info → django_ledger-0.6.2.dist-info}/WHEEL +0 -0
- {django_ledger-0.6.1.dist-info → django_ledger-0.6.2.dist-info}/top_level.txt +0 -0
django_ledger/__init__.py
CHANGED
django_ledger/io/io_core.py
CHANGED
|
@@ -343,7 +343,7 @@ class IODatabaseMixIn:
|
|
|
343
343
|
Returns results aggregated by accounting if needed. Defaults to False.
|
|
344
344
|
by_unit: bool
|
|
345
345
|
Returns results aggregated by unit if needed. Defaults to False.
|
|
346
|
-
|
|
346
|
+
use_closing_entries: bool
|
|
347
347
|
Overrides the DJANGO_LEDGER_USE_CLOSING_ENTRIES setting.
|
|
348
348
|
Returns
|
|
349
349
|
-------
|
|
@@ -587,7 +587,7 @@ class IODatabaseMixIn:
|
|
|
587
587
|
signs: bool
|
|
588
588
|
Changes the balance of an account to negative if it represents a "negative" for display purposes.
|
|
589
589
|
(i.e. Expense accounts will show balance as negative and Income accounts as positive.)
|
|
590
|
-
|
|
590
|
+
use_closing_entries: bool
|
|
591
591
|
Forces the use of closing entries if DJANGO_LEDGER_USE_CLOSING_ENTRIES setting is set to False.
|
|
592
592
|
force_queryset_sorting: bool
|
|
593
593
|
Forces sorting of the TransactionModelQuerySet before aggregation balances.
|
|
@@ -137,7 +137,7 @@ def cash_flow_statement(context, io_model):
|
|
|
137
137
|
|
|
138
138
|
@register.inclusion_tag('django_ledger/financial_statements/tags/income_statement.html', takes_context=True)
|
|
139
139
|
def income_statement_table(context, io_model, from_date=None, to_date=None):
|
|
140
|
-
user_model
|
|
140
|
+
user_model = context['user']
|
|
141
141
|
activity = context['request'].GET.get('activity')
|
|
142
142
|
activity = validate_activity(activity, raise_404=True)
|
|
143
143
|
entity_slug = context['view'].kwargs.get('entity_slug')
|
django_ledger/views/entity.py
CHANGED
|
@@ -199,8 +199,8 @@ class EntityModelDetailBaseView(DjangoLedgerSecurityMixIn,
|
|
|
199
199
|
FETCH_UNPAID_BILLS = True
|
|
200
200
|
FETCH_UNPAID_INVOICES = True
|
|
201
201
|
|
|
202
|
-
|
|
203
|
-
|
|
202
|
+
IO_DIGEST_UNBOUNDED = True
|
|
203
|
+
IO_DIGEST_BOUNDED = True
|
|
204
204
|
|
|
205
205
|
def get_context_data(self, **kwargs):
|
|
206
206
|
context = super().get_context_data(**kwargs)
|
django_ledger/views/mixins.py
CHANGED
|
@@ -24,7 +24,18 @@ from django_ledger.models.entity import EntityModelFiscalPeriodMixIn
|
|
|
24
24
|
from django_ledger.settings import DJANGO_LEDGER_PDF_SUPPORT_ENABLED, DJANGO_LEDGER_AUTHORIZED_SUPERUSER
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
class
|
|
27
|
+
class ContextFromToDateMixin:
|
|
28
|
+
FROM_DATE_CONTEXT_NAME = 'from_date'
|
|
29
|
+
TO_DATE_CONTEXT_NAME = 'to_date'
|
|
30
|
+
|
|
31
|
+
def get_from_date_context_name(self) -> str:
|
|
32
|
+
return self.FROM_DATE_CONTEXT_NAME
|
|
33
|
+
|
|
34
|
+
def get_to_date_context_name(self) -> str:
|
|
35
|
+
return self.TO_DATE_CONTEXT_NAME
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class YearlyReportMixIn(YearMixin, ContextFromToDateMixin, EntityModelFiscalPeriodMixIn):
|
|
28
39
|
|
|
29
40
|
def get_from_date(self, year: int = None, fy_start: int = None, **kwargs) -> date:
|
|
30
41
|
return self.get_year_start_date(year, fy_start)
|
|
@@ -58,16 +69,16 @@ class YearlyReportMixIn(YearMixin, EntityModelFiscalPeriodMixIn):
|
|
|
58
69
|
context['year_start'] = year_start
|
|
59
70
|
context['year_end'] = year_end
|
|
60
71
|
|
|
61
|
-
if
|
|
62
|
-
context[
|
|
63
|
-
if
|
|
64
|
-
context[
|
|
72
|
+
if self.get_from_date_context_name() not in context:
|
|
73
|
+
context[self.get_from_date_context_name()] = year_start
|
|
74
|
+
if self.get_to_date_context_name() not in context:
|
|
75
|
+
context[self.get_to_date_context_name()] = year_end
|
|
65
76
|
|
|
66
77
|
context['has_year'] = True
|
|
67
78
|
return context
|
|
68
79
|
|
|
69
80
|
|
|
70
|
-
class QuarterlyReportMixIn(YearMixin, EntityModelFiscalPeriodMixIn):
|
|
81
|
+
class QuarterlyReportMixIn(YearMixin, ContextFromToDateMixin, EntityModelFiscalPeriodMixIn):
|
|
71
82
|
quarter = None
|
|
72
83
|
quarter_url_kwarg = 'quarter'
|
|
73
84
|
|
|
@@ -137,10 +148,10 @@ class QuarterlyReportMixIn(YearMixin, EntityModelFiscalPeriodMixIn):
|
|
|
137
148
|
context['quarter_start'] = quarter_start
|
|
138
149
|
context['quarter_end'] = quarter_end
|
|
139
150
|
|
|
140
|
-
if
|
|
141
|
-
context[
|
|
142
|
-
if
|
|
143
|
-
context[
|
|
151
|
+
if self.get_from_date_context_name() not in context:
|
|
152
|
+
context[self.get_from_date_context_name()] = quarter_start
|
|
153
|
+
if self.get_to_date_context_name() not in context:
|
|
154
|
+
context[self.get_to_date_context_name()] = quarter_end
|
|
144
155
|
|
|
145
156
|
context['has_quarter'] = True
|
|
146
157
|
return context
|
|
@@ -154,7 +165,7 @@ class QuarterlyReportMixIn(YearMixin, EntityModelFiscalPeriodMixIn):
|
|
|
154
165
|
return quarter - 1
|
|
155
166
|
|
|
156
167
|
|
|
157
|
-
class MonthlyReportMixIn(YearlyReportMixIn, MonthMixin):
|
|
168
|
+
class MonthlyReportMixIn(YearlyReportMixIn, ContextFromToDateMixin, MonthMixin):
|
|
158
169
|
|
|
159
170
|
def get_from_date(self, month: int = None, year: int = None, **kwargs) -> date:
|
|
160
171
|
return self.get_month_start_date(month=month, year=year)
|
|
@@ -206,13 +217,17 @@ class MonthlyReportMixIn(YearlyReportMixIn, MonthMixin):
|
|
|
206
217
|
month_end = self.get_month_end_date(year=year, month=month)
|
|
207
218
|
context['month_start'] = month_start
|
|
208
219
|
context['month_end'] = month_end
|
|
209
|
-
|
|
210
|
-
|
|
220
|
+
|
|
221
|
+
if self.get_from_date_context_name() not in context:
|
|
222
|
+
context[self.get_from_date_context_name()] = month_start
|
|
223
|
+
if self.get_to_date_context_name() not in context:
|
|
224
|
+
context[self.get_to_date_context_name()] = month_end
|
|
225
|
+
|
|
211
226
|
context['has_month'] = True
|
|
212
227
|
return context
|
|
213
228
|
|
|
214
229
|
|
|
215
|
-
class DateReportMixIn(MonthlyReportMixIn, DayMixin):
|
|
230
|
+
class DateReportMixIn(MonthlyReportMixIn, ContextFromToDateMixin, DayMixin):
|
|
216
231
|
|
|
217
232
|
def get_context_data(self, **kwargs):
|
|
218
233
|
context = super(MonthlyReportMixIn, self).get_context_data(**kwargs)
|
|
@@ -221,8 +236,12 @@ class DateReportMixIn(MonthlyReportMixIn, DayMixin):
|
|
|
221
236
|
context['next_day'] = view_date + timedelta(days=1)
|
|
222
237
|
context['previous_day'] = view_date - timedelta(days=1)
|
|
223
238
|
context['view_date'] = view_date
|
|
224
|
-
|
|
225
|
-
|
|
239
|
+
|
|
240
|
+
if self.get_from_date_context_name() not in context:
|
|
241
|
+
context[self.get_from_date_context_name()] = view_date
|
|
242
|
+
if self.get_to_date_context_name() not in context:
|
|
243
|
+
context[self.get_to_date_context_name()] = view_date
|
|
244
|
+
|
|
226
245
|
return context
|
|
227
246
|
|
|
228
247
|
def get_date(self) -> date:
|
|
@@ -243,7 +262,8 @@ class DateReportMixIn(MonthlyReportMixIn, DayMixin):
|
|
|
243
262
|
return dt, dt
|
|
244
263
|
|
|
245
264
|
|
|
246
|
-
|
|
265
|
+
# todo: need to incorporate in base view...
|
|
266
|
+
class FromToDatesParseMixIn:
|
|
247
267
|
DJL_FROM_DATE_PARAM: str = 'from_date'
|
|
248
268
|
DJL_TO_DATE_PARAM: str = 'to_date'
|
|
249
269
|
DJL_NO_FROM_DATE_RAISE_404: bool = True
|
|
@@ -369,6 +389,7 @@ class EntityUnitMixIn:
|
|
|
369
389
|
|
|
370
390
|
|
|
371
391
|
class DigestContextMixIn:
|
|
392
|
+
|
|
372
393
|
IO_DIGEST_UNBOUNDED = False
|
|
373
394
|
IO_DIGEST_BOUNDED = False
|
|
374
395
|
|
|
@@ -435,8 +456,8 @@ class DigestContextMixIn:
|
|
|
435
456
|
from_date=from_date,
|
|
436
457
|
unit_slug=unit_slug,
|
|
437
458
|
by_period=True if by_period else False,
|
|
438
|
-
process_ratios=
|
|
439
|
-
process_roles=
|
|
459
|
+
process_ratios=True,
|
|
460
|
+
process_roles=True,
|
|
440
461
|
process_groups=True)
|
|
441
462
|
|
|
442
463
|
context[self.get_io_manager_bounded_context_name()] = io_digest_equity
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: django-ledger
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.2
|
|
4
4
|
Summary: Double entry accounting system built on the Django Web Framework.
|
|
5
5
|
Author-email: Miguel Sanda <msanda@arrobalytics.com>
|
|
6
6
|
Maintainer-email: Miguel Sanda <msanda@arrobalytics.com>
|
|
@@ -48,7 +48,7 @@ assets/node_modules/node-gyp/gyp/tools/pretty_gyp.py,sha256=2ZCRPW-MZfK7gdnCIaqh
|
|
|
48
48
|
assets/node_modules/node-gyp/gyp/tools/pretty_sln.py,sha256=b_Fxm-SXUCPL3Tix4EyNwZNmQ-zkeRIFFmuL0R5wFhw,5482
|
|
49
49
|
assets/node_modules/node-gyp/gyp/tools/pretty_vcproj.py,sha256=AwQrxK1F-jhjsbbT35XQjrvWNbc3IBFaKXoJogqMh_o,10633
|
|
50
50
|
assets/node_modules/node-gyp/test/fixtures/test-charmap.py,sha256=5raXzaQnO2eJnrlFtlDtWftryhZX7Fj0amFW3hdSnhE,547
|
|
51
|
-
django_ledger/__init__.py,sha256=
|
|
51
|
+
django_ledger/__init__.py,sha256=XWsm2GPCPw5ayJIKYpT2rO83Yxp4iYr5a0vNyC4ao3Y,456
|
|
52
52
|
django_ledger/apps.py,sha256=H-zEWUjKGakgSDSZmLIoXChZ2h6e0dth0ZO5SpoT-8U,163
|
|
53
53
|
django_ledger/exceptions.py,sha256=rML8sQQ0Hq-DYMLZ76dfw2RYSAsXWUoyHuyC_yP9o1o,491
|
|
54
54
|
django_ledger/settings.py,sha256=bZyPKgjmRcO_Rj7hDi4gGlW0VFr_LP2yKeUVIkmWgQM,6321
|
|
@@ -116,7 +116,7 @@ django_ledger/forms/utils.py,sha256=sgkwBZs15_rZ5NT7h-8Z7wi3-ItM1E1sqoVDo3NQ5Jc,
|
|
|
116
116
|
django_ledger/forms/vendor.py,sha256=Nuh8MmSpz4ycMZwiVe--U9Ec6ezIsfACHDkhA2SyiZ4,2215
|
|
117
117
|
django_ledger/io/__init__.py,sha256=8m5AoBRiG2ymrX0Y4LVjq0275i7I5Sk7YRa1BTzVofI,369
|
|
118
118
|
django_ledger/io/io_context.py,sha256=xgykRoB6hVSN2q20f62j_4zbOeAHU5ZgbZaSwRaSkOU,4444
|
|
119
|
-
django_ledger/io/io_core.py,sha256=
|
|
119
|
+
django_ledger/io/io_core.py,sha256=b_-je0NNPkMOglkJwObxfKA6eWa0YvEod9LODm5RRIg,46922
|
|
120
120
|
django_ledger/io/io_generator.py,sha256=JF4plsABUkCIrtI2X-YD7o5eNghRIgLUseNcBIGOj3U,34613
|
|
121
121
|
django_ledger/io/io_library.py,sha256=vvQm3IQRLFdH7HS_DYX46Xe-U9IvgZ6MQnHjy0-fyjk,22480
|
|
122
122
|
django_ledger/io/io_middleware.py,sha256=c-vwpcjg2HbYbb4O36fdf6011dFOnoNsDHOAQXmJgB8,20052
|
|
@@ -275,7 +275,7 @@ django_ledger/templates/django_ledger/expense/tags/expense_item_table.html,sha25
|
|
|
275
275
|
django_ledger/templates/django_ledger/financial_statements/balance_sheet.html,sha256=rFzmK2-AjV_11fp7b6ou-KtMSwm7jN3vfpd4Ki_9-s0,2793
|
|
276
276
|
django_ledger/templates/django_ledger/financial_statements/cash_flow.html,sha256=zeu7OcXl2T_vDoFyJvb0htFIjQz0IfyJBiOcck2skus,3031
|
|
277
277
|
django_ledger/templates/django_ledger/financial_statements/income_statement.html,sha256=pfrv12Bu_PmU-MrL7JXYX7Wv4PZ06fKvOdydzzgeEnw,2731
|
|
278
|
-
django_ledger/templates/django_ledger/financial_statements/tags/balance_sheet_statement.html,sha256=
|
|
278
|
+
django_ledger/templates/django_ledger/financial_statements/tags/balance_sheet_statement.html,sha256=u2o3krlo_I7w-erXI9DO4gNChbYn0KpdeLRZs7UckOQ,6430
|
|
279
279
|
django_ledger/templates/django_ledger/financial_statements/tags/cash_flow_statement.html,sha256=elJsMVmVJHZbZVhuo-bSykrrLoSZrN0JpUYm0LukY80,8961
|
|
280
280
|
django_ledger/templates/django_ledger/financial_statements/tags/income_statement.html,sha256=kLmnxHN5G9H7xYKFANLbfM0jAtNsmfhIrdltW-bhoPY,10442
|
|
281
281
|
django_ledger/templates/django_ledger/includes/breadcrumbs.html,sha256=mSzAPpn7uCx33oXuNhbM-MQdam3QFOxl9TRH93hrS4w,183
|
|
@@ -353,7 +353,7 @@ django_ledger/templates/django_ledger/vendor/vendor_update.html,sha256=4kBUlGgrg
|
|
|
353
353
|
django_ledger/templates/django_ledger/vendor/includes/card_vendor.html,sha256=oCXyuqyF7CnJnDQdK0G0jdYLqtPWYSzwlv8oddyGJg8,1290
|
|
354
354
|
django_ledger/templates/django_ledger/vendor/tags/vendor_table.html,sha256=YC-3T5x4oua3VBg1q690CRzoogKL8qFgQRp5jTKLFgk,3400
|
|
355
355
|
django_ledger/templatetags/__init__.py,sha256=N7iaeMO5xTU-q7RXTVYUy-fu8nMZbiIJ9QEtDCjsTdI,205
|
|
356
|
-
django_ledger/templatetags/django_ledger.py,sha256=
|
|
356
|
+
django_ledger/templatetags/django_ledger.py,sha256=2fzaHJVc3O9t0UuQICx7YAwAPzsP2lv4rOYFPiRAlfA,31676
|
|
357
357
|
django_ledger/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
358
358
|
django_ledger/tests/base.py,sha256=Be7BS_bc_m-hCTkBRnvHYfvAfgCcVOsU-He9ON6rOCc,10279
|
|
359
359
|
django_ledger/tests/test_accounts.py,sha256=WznTiYkxGcmeZ0W75ATpMsZGWrtmNV4voe4oLMCpveo,717
|
|
@@ -401,7 +401,7 @@ django_ledger/views/coa.py,sha256=WnWQVz-4Ik9v28KHzD_WiKcgix7l6bBj1A60p4k-eos,49
|
|
|
401
401
|
django_ledger/views/customer.py,sha256=RoBsXBxZC9b79DSNNHaoSZtQ2AoXf7DJAGmZEO3xdxs,3672
|
|
402
402
|
django_ledger/views/data_import.py,sha256=_H8gjGRIE2Jm97ivvEQn0uEWrM3VvKkYQeXQ1GbKn3g,11950
|
|
403
403
|
django_ledger/views/djl_api.py,sha256=6ADX9fBK8DroTeg8UIeCf2x4wt6-AF5xLlDQnqXBfsM,4411
|
|
404
|
-
django_ledger/views/entity.py,sha256=
|
|
404
|
+
django_ledger/views/entity.py,sha256=f6Fd5YsGbym5Jf3XvbhYCQVm4o5odNLrqVmch8vpGsg,9468
|
|
405
405
|
django_ledger/views/estimate.py,sha256=ZFG0k2_nAV10EjO-p8yp7EVMa4x2qOcFSHl2xFpNDaM,12811
|
|
406
406
|
django_ledger/views/feedback.py,sha256=qoIN44fJnblPx-pJFe5yYeO-dMqp-FReFZiyw0qQb_s,2460
|
|
407
407
|
django_ledger/views/financial_statement.py,sha256=B4FE9qyBYs8tJvBJ1n9-7kR-pH2EJWn6SnjBdtbRfuE,7335
|
|
@@ -411,14 +411,14 @@ django_ledger/views/invoice.py,sha256=iUzTG-EbdYqNX-eYwHBnQRUD_1wTOGutw0BfDMKcI6
|
|
|
411
411
|
django_ledger/views/item.py,sha256=FY53vk_giTRgvJ47FRqChQ8vyDYPDp4DGTvVhGAb36E,21347
|
|
412
412
|
django_ledger/views/journal_entry.py,sha256=21kuiRBlhlkgv8xZKM4mj9djv0Fu0BhB80QOEOHCa-w,12135
|
|
413
413
|
django_ledger/views/ledger.py,sha256=Yk6uDoYhJs5vf5JRqsy8n0nUNDEHk7NzjR1PglyqaAM,12647
|
|
414
|
-
django_ledger/views/mixins.py,sha256=
|
|
414
|
+
django_ledger/views/mixins.py,sha256=SgsR9XWKgsJoQ2pCKkdHlNt93XiUa8bkTKTD0fjj8NI,23370
|
|
415
415
|
django_ledger/views/purchase_order.py,sha256=1J3u4QnCkM7z1Y6DePijVdM67x4CQgfmQJcs3Y4kclU,21082
|
|
416
416
|
django_ledger/views/transactions.py,sha256=5taQRGLSMkM_N8paQJ07HMspI_Nl7PawF8OohCiRmao,206
|
|
417
417
|
django_ledger/views/unit.py,sha256=_RgPJO9mR6v5ohBXlnL3T8nTWgS1lwlCvERQcHk0wHE,10232
|
|
418
418
|
django_ledger/views/vendor.py,sha256=gUdBPTFLeSwlNfdHSA1KFdE_y3QpwpkFhEB0r3-UYdI,3461
|
|
419
|
-
django_ledger-0.6.
|
|
420
|
-
django_ledger-0.6.
|
|
421
|
-
django_ledger-0.6.
|
|
422
|
-
django_ledger-0.6.
|
|
423
|
-
django_ledger-0.6.
|
|
424
|
-
django_ledger-0.6.
|
|
419
|
+
django_ledger-0.6.2.dist-info/AUTHORS.md,sha256=SRM2cynD89ZfEsL09zrbUVeO17r9zE2ZM7y6ReMqVRo,713
|
|
420
|
+
django_ledger-0.6.2.dist-info/LICENSE,sha256=ixuiBLtpoK3iv89l7ylKkg9rs2GzF9ukPH7ynZYzK5s,35148
|
|
421
|
+
django_ledger-0.6.2.dist-info/METADATA,sha256=hGmUnvHJ9byl1Du4AKDEwNxw5aWk1ibCATLKSjM2sDc,9641
|
|
422
|
+
django_ledger-0.6.2.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
|
423
|
+
django_ledger-0.6.2.dist-info/top_level.txt,sha256=0U3SjF63ND36grQNWDONVe-T9-T07lFl5e6QkG7bR2E,44
|
|
424
|
+
django_ledger-0.6.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|