django-ledger 0.6.2__py3-none-any.whl → 0.6.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/admin/coa.py +1 -2
- django_ledger/admin/ledger.py +1 -0
- django_ledger/forms/account.py +22 -11
- django_ledger/forms/data_import.py +2 -1
- django_ledger/io/ofx.py +3 -2
- django_ledger/io/roles.py +6 -0
- django_ledger/models/accounts.py +523 -196
- django_ledger/models/bill.py +28 -14
- django_ledger/models/closing_entry.py +8 -0
- django_ledger/models/entity.py +12 -5
- django_ledger/models/estimate.py +93 -21
- django_ledger/models/invoice.py +44 -14
- django_ledger/models/journal_entry.py +112 -49
- django_ledger/models/ledger.py +32 -0
- django_ledger/models/purchase_order.py +34 -3
- django_ledger/models/signals.py +58 -0
- django_ledger/report/cash_flow_statement.py +1 -1
- django_ledger/report/core.py +1 -1
- django_ledger/static/.DS_Store +0 -0
- django_ledger/static/django_ledger/.DS_Store +0 -0
- django_ledger/static/django_ledger/logo_2/.DS_Store +0 -0
- django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark.png +0 -0
- django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@3x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-full-vert.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-full-vert@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-full-vert@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-full-vert@3x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@3x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-vert.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@3x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-logo@3x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@3x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-vert.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@3x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-horiz.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-horiz@0.5x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-horiz@2x.png +0 -0
- django_ledger/static/django_ledger/logo_2/djl-txt-horiz@3x.png +0 -0
- django_ledger/templates/django_ledger/financial_statements/balance_sheet.html +2 -2
- django_ledger/tests/test_io_ofx/__init__.py +0 -0
- django_ledger/tests/test_io_ofx/tests.py +52 -0
- django_ledger/views/account.py +1 -1
- django_ledger/views/bill.py +1 -1
- {django_ledger-0.6.2.dist-info → django_ledger-0.6.4.dist-info}/METADATA +1 -1
- {django_ledger-0.6.2.dist-info → django_ledger-0.6.4.dist-info}/RECORD +65 -27
- {django_ledger-0.6.2.dist-info → django_ledger-0.6.4.dist-info}/top_level.txt +0 -1
- {django_ledger-0.6.2.dist-info → django_ledger-0.6.4.dist-info}/AUTHORS.md +0 -0
- {django_ledger-0.6.2.dist-info → django_ledger-0.6.4.dist-info}/LICENSE +0 -0
- {django_ledger-0.6.2.dist-info → django_ledger-0.6.4.dist-info}/WHEEL +0 -0
django_ledger/__init__.py
CHANGED
django_ledger/admin/coa.py
CHANGED
|
@@ -108,7 +108,6 @@ class ChartOfAccountsModelAdmin(ModelAdmin):
|
|
|
108
108
|
list_display_links = ['name']
|
|
109
109
|
fields = [
|
|
110
110
|
'name',
|
|
111
|
-
'locked',
|
|
112
111
|
'description',
|
|
113
112
|
]
|
|
114
113
|
inlines = [
|
|
@@ -132,4 +131,4 @@ class ChartOfAccountsModelAdmin(ModelAdmin):
|
|
|
132
131
|
def account_model_count(self, obj):
|
|
133
132
|
return obj.accountmodel__count
|
|
134
133
|
|
|
135
|
-
account_model_count.short_description = 'Accounts'
|
|
134
|
+
account_model_count.short_description = 'Accounts'
|
django_ledger/admin/ledger.py
CHANGED
django_ledger/forms/account.py
CHANGED
|
@@ -19,16 +19,20 @@ Update Form
|
|
|
19
19
|
|
|
20
20
|
class AccountModelCreateForm(ModelForm):
|
|
21
21
|
"""
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
The entity slug and the user model are the field which are internal and are predetermined in the lass itself
|
|
22
|
+
AccountModelCreateForm
|
|
23
|
+
======================
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
A form for creating and managing account models within the system.
|
|
26
|
+
|
|
27
|
+
Attributes
|
|
28
|
+
----------
|
|
29
|
+
ENTITY : Model
|
|
30
|
+
The entity model being used in the form.
|
|
31
|
+
COA_MODEL : Model
|
|
32
|
+
The Chart of Account Model being used in the form.
|
|
33
|
+
USER_MODEL : Model
|
|
34
|
+
The user model being used in the form.
|
|
27
35
|
|
|
28
|
-
code: The code will be used to uniquely identify the particular account
|
|
29
|
-
name: The name of the account. The name of the account should be resemblance of the nature of the transactions that will be in the account
|
|
30
|
-
role: The role needs to be selected rom list of the options available. Choices are given under ACCOUNT ROLES. Refer the account model documentation for more info
|
|
31
|
-
balance_type: Need to be selected from drop down as "Debit" or Credit"
|
|
32
36
|
"""
|
|
33
37
|
|
|
34
38
|
def __init__(self, entity_model, coa_model, user_model, *args, **kwargs):
|
|
@@ -84,9 +88,16 @@ class AccountModelCreateForm(ModelForm):
|
|
|
84
88
|
|
|
85
89
|
class AccountModelUpdateForm(MoveNodeForm):
|
|
86
90
|
"""
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
91
|
+
AccountModelUpdateForm
|
|
92
|
+
|
|
93
|
+
A form for updating account model, inheriting from MoveNodeForm.
|
|
94
|
+
|
|
95
|
+
Attributes
|
|
96
|
+
----------
|
|
97
|
+
_position : ChoiceField
|
|
98
|
+
A choice field for selecting the position.
|
|
99
|
+
_ref_node_id : ChoiceField
|
|
100
|
+
An optional choice field for selecting the relative node.
|
|
90
101
|
"""
|
|
91
102
|
|
|
92
103
|
_position = ChoiceField(required=True,
|
django_ledger/io/ofx.py
CHANGED
|
@@ -34,8 +34,9 @@ class OFXFileManager:
|
|
|
34
34
|
def get_accounts(self):
|
|
35
35
|
return [
|
|
36
36
|
{
|
|
37
|
-
|
|
38
|
-
'
|
|
37
|
+
# conditionally return the bank and fid if they are provided by the vendor
|
|
38
|
+
'bank': self.ofx_data.fi.org if hasattr(self.ofx_data.fi, 'org') else None,
|
|
39
|
+
'fid': self.ofx_data.fi.fid if hasattr(self.ofx_data.fi, 'fid') else None,
|
|
39
40
|
'account_type': acc.accttype,
|
|
40
41
|
'account_number': acc.acctid,
|
|
41
42
|
'routing_number': acc.bankid,
|
django_ledger/io/roles.py
CHANGED
|
@@ -660,3 +660,9 @@ def validate_roles(roles: Union[str, List[str]], raise_exception: bool = True) -
|
|
|
660
660
|
if raise_exception:
|
|
661
661
|
raise InvalidRoleError('{rls}) is invalid. Choices are {ch}'.format(ch=', '.join(VALID_ROLES), rls=r))
|
|
662
662
|
return set(roles)
|
|
663
|
+
|
|
664
|
+
VALID_PARENTS = {
|
|
665
|
+
ASSET_PPE_BUILDINGS_ACCUM_DEPRECIATION: [ASSET_PPE_BUILDINGS],
|
|
666
|
+
ASSET_PPE_EQUIPMENT_ACCUM_DEPRECIATION: [ASSET_PPE_EQUIPMENT],
|
|
667
|
+
ASSET_PPE_PLANT_ACCUM_DEPRECIATION: [ASSET_PPE_PLANT],
|
|
668
|
+
}
|