├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── dependabot.yml │ └── feature_request.md └── workflows │ ├── Django.yml │ └── pylint.yml ├── .gitignore ├── .graphqlconfig ├── .readthedocs.yaml ├── .vscode ├── .devcontainer │ └── devcontainer.json └── launch.json ├── AUTHORS.md ├── Contribute.md ├── LICENSE ├── MANIFEST.in ├── Pipfile ├── Pipfile.lock ├── README.md ├── assets ├── .yarnrc.yml ├── package-lock.json ├── package.json ├── src │ ├── AppCharts.ts │ ├── DjangoLedgerApp.ts │ ├── djetler.scss │ ├── djetler_styles.less │ ├── entry.ts │ └── styles.js ├── tsconfig.json └── webpack.config.js ├── dev_env ├── __init__.py ├── asgi.py ├── settings.py ├── urls.py └── wsgi.py ├── django_ledger ├── __init__.py ├── admin.py ├── apps.py ├── contrib │ ├── __init__.py │ └── django_ledger_graphene │ │ ├── README.md │ │ ├── __init__.py │ │ ├── accounts │ │ └── schema.py │ │ ├── api.py │ │ ├── apps.py │ │ ├── auth │ │ ├── mutations.py │ │ └── schema.py │ │ ├── bank_account │ │ ├── mutations.py │ │ └── schema.py │ │ ├── bill │ │ ├── mutations.py │ │ └── schema.py │ │ ├── coa │ │ ├── mutations.py │ │ └── schema.py │ │ ├── customers │ │ ├── __init__.py │ │ ├── mutations.py │ │ └── schema.py │ │ ├── data_import │ │ ├── mutations.py │ │ └── schema.py │ │ ├── entity │ │ ├── mutations.py │ │ └── schema.py │ │ ├── examples │ │ └── entity │ │ │ ├── entityModelDetailQuery.graphql │ │ │ └── entityModelListQuery.graphql │ │ ├── http │ │ ├── access_token.http │ │ └── http-client.env.json │ │ ├── item │ │ ├── mutations.py │ │ └── schema.py │ │ ├── journal_entry │ │ ├── mutations.py │ │ └── schema.py │ │ ├── ledger │ │ ├── mutations.py │ │ └── schema.py │ │ ├── purchase_order │ │ ├── mutations.py │ │ └── schema.py │ │ ├── schema.graphql │ │ ├── schema.json │ │ ├── transaction │ │ ├── mutations.py │ │ └── schema.py │ │ ├── unit │ │ ├── mutations.py │ │ └── schema.py │ │ ├── vendor │ │ ├── mutations.py │ │ └── schema.py │ │ └── views.py ├── exceptions.py ├── forms │ ├── __init__.py │ ├── account.py │ ├── app_filters.py │ ├── auth.py │ ├── bank_account.py │ ├── bill.py │ ├── closing_entry.py │ ├── coa.py │ ├── customer.py │ ├── data_import.py │ ├── entity.py │ ├── estimate.py │ ├── feedback.py │ ├── invoice.py │ ├── item.py │ ├── journal_entry.py │ ├── ledger.py │ ├── purchase_order.py │ ├── transactions.py │ ├── unit.py │ ├── utils.py │ └── vendor.py ├── io │ ├── __init__.py │ ├── data_generator.py │ ├── io_context.py │ ├── io_digest.py │ ├── io_mixin.py │ ├── ofx.py │ ├── ratios.py │ └── roles.py ├── management │ ├── __init__.py │ └── commands │ │ ├── __init__.py │ │ └── generate_oauth2_codes.py ├── migrations │ ├── 0001_initial.py │ ├── 0002_alter_journalentrymodel_managers_and_more.py │ ├── 0003_remove_accountmodel_django_ledg_role_1bff96_idx_and_more.py │ ├── 0004_remove_itemmodel_depth_remove_itemmodel_numchild_and_more.py │ ├── 0005_remove_itemmodel_django_ledg_invento_dbf206_idx_and_more.py │ ├── 0006_alter_journalentrymodel_je_number_and_more.py │ ├── 0007_remove_customermodel_django_ledg_custome_16f95a_idx_and_more.py │ ├── 0008_closingentrymodel_closingentrytransactionmodel_and_more.py │ ├── 0009_delete_stagedtransactionmodel.py │ ├── 0010_delete_importjobmodel.py │ ├── 0011_importjobmodel_alter_accountmodel_role_and_more.py │ ├── 0012_stagedtransactionmodel_activity.py │ ├── 0013_stagedtransactionmodel_bundle_split.py │ └── __init__.py ├── models │ ├── __init__.py │ ├── accounts.py │ ├── bank_account.py │ ├── bill.py │ ├── closing_entry.py │ ├── coa.py │ ├── coa_default.py │ ├── customer.py │ ├── data_import.py │ ├── entity.py │ ├── estimate.py │ ├── invoice.py │ ├── items.py │ ├── journal_entry.py │ ├── ledger.py │ ├── mixins.py │ ├── purchase_order.py │ ├── schemas │ │ ├── __init__.py │ │ ├── digest.py │ │ ├── net_payable.py │ │ ├── net_receivable.py │ │ └── pnl.py │ ├── transactions.py │ ├── unit.py │ ├── utils.py │ └── vendor.py ├── report │ ├── __init__.py │ ├── balance_sheet.py │ ├── cash_flow_statement.py │ ├── core.py │ └── income_statement.py ├── settings.py ├── static │ └── django_ledger │ │ ├── bundle │ │ ├── djetler.bundle.js │ │ └── styles.bundle.js │ │ ├── img │ │ ├── daniel-weiss-aj2Os9mYgJU-unsplash.jpg │ │ └── made-with-bulma.png │ │ └── logo │ │ ├── django-ledger-logo-report.png │ │ ├── django-ledger-logo.png │ │ ├── django-ledger-logo@2x.png │ │ ├── django-ledger-logo@3x.png │ │ ├── django-ledger-logo@4x.png │ │ ├── django-ledger-logo_1.png │ │ ├── django-ledger-logo_1@2x.png │ │ ├── django-ledger-logo_1@3x.png │ │ ├── django-ledger-logo_1@4x.png │ │ ├── django-ledger-tagline.png │ │ ├── django-ledger-tagline@2x.png │ │ ├── django-ledger-tagline@3x.png │ │ ├── django-ledger-tagline@4x.png │ │ ├── django-ledger-text.png │ │ ├── django-ledger-text@2x.png │ │ ├── django-ledger-text@3x.png │ │ ├── django-ledger-text@4x.png │ │ └── favicon.png ├── templates │ └── django_ledger │ │ ├── account │ │ ├── account_create.html │ │ ├── account_create_child.html │ │ ├── account_detail.html │ │ ├── account_list.html │ │ ├── account_update.html │ │ └── tags │ │ │ ├── account_txs_table.html │ │ │ └── accounts_table.html │ │ ├── auth │ │ └── login.html │ │ ├── bank_account │ │ ├── bank_account_create.html │ │ ├── bank_account_list.html │ │ ├── bank_account_update.html │ │ └── tags │ │ │ └── bank_accounts_table.html │ │ ├── bills │ │ ├── bill_create.html │ │ ├── bill_delete.html │ │ ├── bill_detail.html │ │ ├── bill_list.html │ │ ├── bill_update.html │ │ ├── bill_void.html │ │ ├── includes │ │ │ └── card_bill.html │ │ └── tags │ │ │ ├── bill_item_formset.html │ │ │ └── bill_table.html │ │ ├── closing_entry │ │ ├── closing_entry_create.html │ │ ├── closing_entry_delete.html │ │ ├── closing_entry_detail.html │ │ ├── closing_entry_list.html │ │ ├── closing_entry_update.html │ │ ├── includes │ │ │ └── card_closing_entry.html │ │ └── tags │ │ │ ├── closing_entry_table.html │ │ │ └── closing_entry_txs_table.html │ │ ├── code_of_accounts │ │ └── coa_update.html │ │ ├── components │ │ ├── activity_form.html │ │ ├── breadcrumbs.html │ │ ├── chart_container.html │ │ ├── date_picker.html │ │ ├── default_entity.html │ │ ├── feedback_button.html │ │ ├── filters.html │ │ ├── icon.html │ │ ├── menu.html │ │ ├── modals.html │ │ ├── modals_v2.html │ │ └── period_navigator.html │ │ ├── customer │ │ ├── customer_create.html │ │ ├── customer_list.html │ │ ├── customer_update.html │ │ ├── includes │ │ │ └── card_customer.html │ │ └── tags │ │ │ └── customer_table.html │ │ ├── data_import │ │ ├── data_import_job_list.html │ │ ├── data_import_job_txs.html │ │ ├── import_job_create.html │ │ ├── import_job_delete.html │ │ ├── import_job_update.html │ │ └── tags │ │ │ ├── data_import_job_list_table.html │ │ │ ├── data_import_job_txs_imported.html │ │ │ └── data_import_job_txs_table.html │ │ ├── entity │ │ ├── entitiy_list.html │ │ ├── entity_create.html │ │ ├── entity_dashboard.html │ │ ├── entity_delete.html │ │ ├── entity_update.html │ │ ├── home.html │ │ └── includes │ │ │ └── card_entity.html │ │ ├── estimate │ │ ├── estimate_create.html │ │ ├── estimate_detail.html │ │ ├── estimate_list.html │ │ ├── estimate_update.html │ │ ├── includes │ │ │ ├── card_estimate.html │ │ │ ├── estimate_item_table.html │ │ │ └── estimate_table.html │ │ └── tags │ │ │ └── ce_item_formset.html │ │ ├── expense │ │ ├── expense_create.html │ │ ├── expense_list.html │ │ ├── expense_update.html │ │ └── tags │ │ │ └── expense_item_table.html │ │ ├── financial_statements │ │ ├── balance_sheet.html │ │ ├── cash_flow.html │ │ ├── income_statement.html │ │ └── tags │ │ │ ├── balance_sheet_statement.html │ │ │ ├── cash_flow_statement.html │ │ │ └── income_statement.html │ │ ├── includes │ │ ├── breadcrumbs.html │ │ ├── card_markdown.html │ │ ├── footer.html │ │ ├── messages.html │ │ ├── nav.html │ │ ├── page_header.html │ │ ├── widget_bs.html │ │ ├── widget_ic.html │ │ └── widget_ratios.html │ │ ├── inventory │ │ ├── inventory_item_create.html │ │ ├── inventory_item_list.html │ │ ├── inventory_item_update.html │ │ ├── inventory_list.html │ │ ├── inventory_recount.html │ │ └── tags │ │ │ ├── inventory_item_table.html │ │ │ └── inventory_table.html │ │ ├── invoice │ │ ├── includes │ │ │ └── card_invoice.html │ │ ├── invoice_create.html │ │ ├── invoice_delete.html │ │ ├── invoice_detail.html │ │ ├── invoice_list.html │ │ ├── invoice_update.html │ │ └── tags │ │ │ ├── invoice_item_formset.html │ │ │ └── invoice_table.html │ │ ├── journal_entry │ │ ├── includes │ │ │ └── card_journal_entry.html │ │ ├── je_create.html │ │ ├── je_delete.html │ │ ├── je_detail.html │ │ ├── je_detail_txs.html │ │ ├── je_list.html │ │ ├── je_update.html │ │ └── tags │ │ │ ├── je_table.html │ │ │ └── je_txs_table.html │ │ ├── layouts │ │ ├── base.html │ │ ├── content_layout_1.html │ │ └── content_layout_2.html │ │ ├── ledger │ │ ├── ledger_create.html │ │ ├── ledger_delete.html │ │ ├── ledger_list.html │ │ ├── ledger_update.html │ │ └── tags │ │ │ └── ledgers_table.html │ │ ├── product │ │ ├── product_create.html │ │ ├── product_delete.html │ │ ├── product_list.html │ │ ├── product_update.html │ │ └── tags │ │ │ └── product_table.html │ │ ├── purchase_order │ │ ├── includes │ │ │ ├── card_po.html │ │ │ ├── po_item_formset.html │ │ │ └── po_table.html │ │ ├── po_create.html │ │ ├── po_delete.html │ │ ├── po_detail.html │ │ ├── po_list.html │ │ ├── po_update.html │ │ └── tags │ │ │ └── po_item_table.html │ │ ├── service │ │ ├── service_create.html │ │ ├── service_delete.html │ │ ├── service_list.html │ │ ├── service_update.html │ │ └── tags │ │ │ └── services_table.html │ │ ├── unit │ │ ├── unit_create.html │ │ ├── unit_detail.html │ │ ├── unit_list.html │ │ └── unit_update.html │ │ ├── uom │ │ ├── tags │ │ │ └── uom_table.html │ │ ├── uom_create.html │ │ ├── uom_delete.html │ │ ├── uom_list.html │ │ └── uom_update.html │ │ └── vendor │ │ ├── includes │ │ └── card_vendor.html │ │ ├── tags │ │ └── vendor_table.html │ │ ├── vendor_create.html │ │ ├── vendor_list.html │ │ └── vendor_update.html ├── templatetags │ ├── __init__.py │ └── django_ledger.py ├── tests │ ├── __init__.py │ ├── base.py │ ├── bdd │ │ ├── __init__.py │ │ └── features │ │ │ ├── README.feature │ │ │ └── steps │ │ │ └── README.py │ ├── test_auth.py │ ├── test_bill.py │ ├── test_closing_entry.py │ ├── test_entity.py │ ├── test_io.py │ └── test_purchase_order.py ├── urls │ ├── __init__.py │ ├── account.py │ ├── auth.py │ ├── bank_account.py │ ├── bill.py │ ├── chart_of_accounts.py │ ├── closing_entry.py │ ├── customer.py │ ├── data_import.py │ ├── djl_api.py │ ├── entity.py │ ├── estimate.py │ ├── feedback.py │ ├── financial_statement.py │ ├── home.py │ ├── inventory.py │ ├── invoice.py │ ├── item.py │ ├── journal_entry.py │ ├── ledger.py │ ├── purchase_order.py │ ├── transactions.py │ ├── unit.py │ └── vendor.py ├── utils.py └── views │ ├── __init__.py │ ├── account.py │ ├── auth.py │ ├── bank_account.py │ ├── bill.py │ ├── closing_entry.py │ ├── coa.py │ ├── customer.py │ ├── data_import.py │ ├── djl_api.py │ ├── entity.py │ ├── estimate.py │ ├── feedback.py │ ├── financial_statement.py │ ├── home.py │ ├── inventory.py │ ├── invoice.py │ ├── item.py │ ├── journal_entry.py │ ├── ledger.py │ ├── mixins.py │ ├── purchase_order.py │ ├── transactions.py │ ├── unit.py │ └── vendor.py ├── docs ├── Makefile ├── make.bat └── source │ ├── assets │ └── img │ │ ├── ModelDependency.png │ │ └── ModelDependencyDetail.png │ ├── conf.py │ ├── index.rst │ ├── io.rst │ ├── models.rst │ ├── ntemplates │ └── django_ledger │ │ └── purchase_order │ │ └── po_item_table.html │ ├── quickstart.rst │ ├── quickstart_notebook.md │ └── requirements.txt ├── manage.py ├── notebooks └── QuickStart Notebook.ipynb ├── pyproject.toml ├── screenshots ├── BalanceSheetStatement.png ├── CashFlowStatement.png ├── IncomeStatement.png └── django_ledger_screenshot.png └── setup.py /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/dependabot.yml: -------------------------------------------------------------------------------- 1 | # Set update schedule for GitHub Actions 2 | 3 | version: 2 4 | updates: 5 | - package-ecosystem: 'github-actions' 6 | directory: '/' 7 | schedule: 8 | # Check for updates to GitHub Actions every weekday 9 | interval: 'daily' 10 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/workflows/Django.yml: -------------------------------------------------------------------------------- 1 | name: Django CI 2 | 3 | on: 4 | push: 5 | branches: [develop] 6 | pull_request: 7 | branches: 8 | - develop 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build: 13 | runs-on: ubuntu-latest 14 | # strategy: 15 | # matrix: 16 | # python-version: [ '3.8.10', '3.9.0', '3.10.0' ] 17 | 18 | steps: 19 | - uses: actions/checkout@v2 20 | 21 | # - name: Set up Python ${{ matrix.python-version }} 22 | - name: Set up Python 3.9 23 | uses: actions/setup-python@v2 24 | with: 25 | python-version: 3.9 26 | # python-version: ${{ matrix.python-version }} 27 | 28 | - name: Install Dependencies 29 | run: | 30 | python -m pip install --upgrade pip 31 | pip install -r requirements.txt 32 | - name: Run Tests 33 | run: | 34 | python manage.py test --noinput 35 | -------------------------------------------------------------------------------- /.github/workflows/pylint.yml: -------------------------------------------------------------------------------- 1 | name: Code Quality 2 | 3 | on: 4 | push: 5 | branches: 6 | - develop 7 | workflow_dispatch: 8 | 9 | jobs: 10 | lint: 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v2 15 | 16 | - name: Set up Python 3.9 17 | uses: actions/setup-python@v2 18 | with: 19 | python-version: 3.9 20 | 21 | - name: Install Dependencies 22 | run: | 23 | python3 -m pip install --upgrade pip 24 | pip3 install pylint 25 | pip3 install pylint-exit 26 | pip3 install pylint-django 27 | if [ -f requirements.txt ]; then pip3 install -r requirements.txt; fi 28 | - name: Lint Project Level 29 | run: | 30 | find . -path '**/migrations' -prune -false -o -name '*.py' | xargs pylint -E --load-plugins pylint_django --disable=django-not-configured,R0901 --ignore-patterns=manage.py 31 | - name: Lint brickbox 32 | run: | 33 | cd brickbox/ 34 | find . -type f -name "*.py" | xargs pylint --load-plugins pylint_django --disable=django-not-configured --ignore-patterns=settings.py,wsgi.py 35 | -------------------------------------------------------------------------------- /.graphqlconfig: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Django Ledger GraphQL Schema", 3 | "schemaPath": "schema.graphql", 4 | "extensions": { 5 | "endpoints": { 6 | "Default GraphQL Endpoint": { 7 | "url": "http://127.0.0.1:8000/api/v1/graphql/", 8 | "headers": { 9 | "user-agent": "JS GraphQL", 10 | "Authorization": "Bearer " 11 | }, 12 | "introspect": true 13 | } 14 | } 15 | } 16 | } -------------------------------------------------------------------------------- /.readthedocs.yaml: -------------------------------------------------------------------------------- 1 | version: 2 2 | build: 3 | os: ubuntu-22.04 4 | tools: 5 | python: "3.10" 6 | formats: 7 | - htmlzip 8 | - epub 9 | - pdf 10 | sphinx: 11 | configuration: docs/source/conf.py 12 | python: 13 | install: 14 | - requirements: docs/source/requirements.txt -------------------------------------------------------------------------------- /.vscode/.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Django Ledger Development Codespace", 3 | "image": "python:3.11-bookworm" 4 | } 5 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "DJL RunServer", 9 | "type": "python", 10 | "request": "launch", 11 | "program": "${workspaceFolder}/manage.py", 12 | "args": [ 13 | "runserver" 14 | ], 15 | "django": true, 16 | "justMyCode": true 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | ![django ledger logo](https://us-east-1.linodeobjects.com/django-ledger/logo/django-ledger-logo@2x.png) 2 | 3 | Django Ledger was created by [Miguel Sanda](https://github.com/elarroba). 4 | 5 | # __Authors & Contributors of Django Ledger__ 6 | 7 | ### Project Maintainers 8 | * Miguel Sanda [@elarroba](https://github.com/elarroba) 9 | 10 | ### Developers & Contributors 11 | * Miguel Sanda [@elarroba](https://github.com/elarroba) 12 | * Michael Noel [@mnooel](https://github.com/mnooel) 13 | * Eric Owuor [@Ericpaul](https://github.com/25-do) 14 | 15 | ### Accountants, CPAs & Bookkeepers 16 | * Miguel Sanda [@elarroba](https://github.com/elarroba) 17 | * Albert Salazar [@Beachwood619](https://github.com/Beachwood619) 18 | * Michael Noel, CPA [@mnooel](https://github.com/mnooel) -------------------------------------------------------------------------------- /Contribute.md: -------------------------------------------------------------------------------- 1 | # Django Ledger Contribution Guidelines 2 | 3 | * UI 4 | * Django Ledger UI is based on the [Bulma](https://bulma.io/) CSS Framework via [WebPack](https://webpack.js.org/). 5 | Any template contributions must follow Bulma's best practices. 6 | * Icons are implemented through [Iconify](https://iconify.design/) and Django Ledger has the built-in template tag 7 | [icon](https://github.com/arrobalytics/django-ledger/blob/5f61251ce3ee8a9b159211a98d8d00c53b5cb942/django_ledger/templatetags/django_ledger.py#L78) 8 | which can be used to render any icon using Iconify. 9 | * JavaScript 10 | * Django Ledger uses [TypeScript](https://www.typescriptlang.org/) to ship JavaScript to the browser. Webpack is used to bundle all CSS/JS into two 11 | javascript files respectively. See [bundle](https://github.com/arrobalytics/django-ledger/tree/develop/django_ledger/static/django_ledger/bundle) 12 | in the static file directory. The build command in the [assets/package.json](https://github.com/arrobalytics/django-ledger/blob/develop/assets/package.json) 13 | file will build styles and javascript and 14 | automatically update the application bundle with the latest compiled version. 15 | * Models 16 | * Changes and contributions to Models are limited to those with proven Django experience. Also, in addition to Django 17 | experience, some accounting and domain knowledge is required. Changes to models must be justified and susbtantiated 18 | with proper accounting best practices. 19 | * Documentation 20 | * All documentation contributions are welcome. [Sphinx](https://github.com/sphinx-doc/sphinx) has been set up to 21 | automatically generate static HTML documentation. 22 | * Unit Tests 23 | * All unit tests contributions are welcome if they are intended to validate program logic and/or accounting logic. -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | recursive-include django_ledger/templates * 2 | recursive-include django_ledger/static * -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.org/simple" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | django = ">=2.2" 8 | django-treebeard = ">=4.5.1" 9 | ofxtools = ">=0.9.5" 10 | markdown = ">=3.4.1" 11 | faker = ">=15.3.3" 12 | pillow = ">=9.3.0" 13 | 14 | [graphql] 15 | django-filter = ">=2.1.0" 16 | graphene = ">=3.2.1" 17 | graphene_django = ">=3.0.0" 18 | django-oauth-toolkit = ">=2.2.0" 19 | 20 | [pdf] 21 | fpdf2 = ">=2.7.4" 22 | 23 | [dev-packages] 24 | jupyterlab = "*" 25 | sphinx = "*" 26 | behave = "*" 27 | pipenv-setup = "*" 28 | pylint = "*" 29 | furo = "*" 30 | twine = "*" 31 | python-dotenv = "*" 32 | tabulate = "*" 33 | myst_parser = "*" 34 | pandas = "*" 35 | 36 | [requires] 37 | python_version = "3.11" 38 | 39 | [scripts] 40 | publish-package-test = "twine upload --repository testpypi -u __token__ -p ${DJL_PYPI_TEST_TOKEN} dist/*" 41 | publish-package = "twine upload -u __token__ -p ${DJL_PYPI_TOKEN} dist/*" 42 | 43 | generate-graphql-schema = "python manage.py graphql_schema --schema django_ledger.contrib.django_ledger_graphene.api.schema --out django_ledger/contrib/django_ledger_graphene/schema.graphql --indent 2" 44 | generate-graphql-introspection = "python manage.py graphql_schema --schema django_ledger.contrib.django_ledger_graphene.api.schema --out django_ledger/contrib/django_ledger_graphene/schema.json --indent 2" 45 | -------------------------------------------------------------------------------- /assets/.yarnrc.yml: -------------------------------------------------------------------------------- 1 | nodeLinker: node-modules 2 | 3 | yarnPath: .yarn/releases/yarn-3.4.1.cjs 4 | -------------------------------------------------------------------------------- /assets/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@iconify/iconify": "^1.0.7", 4 | "@types/chart.js": "^2.9.31", 5 | "@types/lodash": "^4.14.168", 6 | "animate.css": "^4.1.1", 7 | "axios": "^0.21.3", 8 | "bulma": "^0.9.4", 9 | "bulmaswatch": "^0.8.1", 10 | "chart.js": "^2.9.4", 11 | "json-schema": "^0.4.0", 12 | "pikaday": "^1.8.2", 13 | "scss-tokenizer": "^0.4.3", 14 | "trim-newlines": "^4.0.2", 15 | "vue": "^2.7.14", 16 | "vue-class-component": "^7.2.6" 17 | }, 18 | "devDependencies": { 19 | "css-loader": "^6.8.1", 20 | "file-loader": "^6.2.0", 21 | "less": "^4.2.0", 22 | "less-loader": "^11.1.3", 23 | "node-sass": "^9.0.0", 24 | "sass-loader": "^13.3.2", 25 | "style-loader": "^3.3.3", 26 | "ts-loader": "^9.4.4", 27 | "typescript": "^4.2.4", 28 | "url-loader": "^4.1.1", 29 | "webpack": "^5.33.2", 30 | "webpack-cli": "^4.6.0" 31 | }, 32 | "scripts": { 33 | "build": "webpack", 34 | "watch": "webpack --watch" 35 | }, 36 | "main": "../django_ledger/static/django_ledger/bundle/djetler.bundle.js", 37 | "packageManager": "yarn@3.4.1" 38 | } 39 | -------------------------------------------------------------------------------- /assets/src/djetler.scss: -------------------------------------------------------------------------------- 1 | @import "../node_modules/bulma/bulma"; 2 | @import "../node_modules/bulmaswatch/litera/bulmaswatch"; 3 | @import "../node_modules/pikaday/css/pikaday.css"; 4 | 5 | -------------------------------------------------------------------------------- /assets/src/djetler_styles.less: -------------------------------------------------------------------------------- 1 | @margins: range(1, 10, 1); 2 | @sectionMinHeights: range(100, 500, 100); 3 | @pf: djetler; 4 | 5 | each(@margins, { 6 | .@{pf}_my_@{value} { 7 | margin-top: (@value * 1rem); 8 | margin-bottom: (@value * 1rem); 9 | } 10 | .@{pf}_mt_@{value} { 11 | margin-top: (@value * 1rem); 12 | } 13 | .@{pf}_mb_@{value} { 14 | margin-bottom: (@value * 1rem); 15 | } 16 | }) 17 | 18 | each(@margins, { 19 | .@{pf}_mx_@{value} { 20 | margin-left: (@value * 1rem); 21 | margin-right: (@value * 1rem); 22 | } 23 | .@{pf}_ml_@{value} { 24 | margin-left: (@value * 1rem); 25 | } 26 | .@{pf}_mr_@{value} { 27 | margin-right: (@value * 1rem); 28 | } 29 | }) 30 | 31 | each(@sectionMinHeights, { 32 | .@{pf}-section-min@{value} { 33 | min-height: (@value * 1px); 34 | } 35 | }) 36 | 37 | 38 | .djetler-box-green { 39 | background-color: #18ff6f; 40 | } 41 | 42 | .djetler-box-yellow { 43 | background-color: #ffd931; 44 | } 45 | 46 | .djetler-box-blue { 47 | background-color: #374bff; 48 | } 49 | 50 | .django-ledger-login { 51 | height: 100vh; 52 | background-size: cover; 53 | background-position: center; 54 | } 55 | 56 | @iconSizes: range(12, 120, 12); 57 | 58 | each(@iconSizes, { 59 | .djl-icon-@{value} { 60 | font-size: (@value * 1px); 61 | } 62 | }) 63 | 64 | .django-ledger-table-bottom-margin-75 { 65 | margin-bottom: 75px; 66 | } 67 | 68 | .django-ledger-table-bottom-margin-150 { 69 | margin-bottom: 150px; 70 | } 71 | 72 | .djl-is-strikethrough { 73 | text-decoration: line-through; 74 | } 75 | 76 | #djl-login-bg-image { 77 | background-repeat: no-repeat; 78 | background-size: cover; 79 | } -------------------------------------------------------------------------------- /assets/src/styles.js: -------------------------------------------------------------------------------- 1 | import './djetler.scss' 2 | import './djetler_styles.less' 3 | import 'animate.css/animate.min.css' -------------------------------------------------------------------------------- /assets/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | 3 | module.exports = { 4 | mode: "production", 5 | entry: { 6 | djetler: "./src/entry", 7 | styles: "./src/styles" 8 | }, 9 | output: { 10 | filename: "[name].bundle.js", 11 | path: path.resolve(__dirname, '../django_ledger/static/django_ledger/bundle/'), 12 | library: "djLedger", 13 | // libraryTarget: "umd" 14 | }, 15 | resolve: { 16 | extensions: [".ts", ".tsx", ".js"], 17 | modules: ["node_modules"], 18 | alias: { 19 | vue: 'vue/dist/vue.js' 20 | }, 21 | }, 22 | module: { 23 | rules: [ 24 | { 25 | test: /\.less$/, 26 | use: [ 27 | { 28 | loader: 'style-loader', 29 | }, 30 | { 31 | loader: 'css-loader', 32 | }, 33 | { 34 | loader: 'less-loader', 35 | options: { 36 | lessOptions: { 37 | strictMath: true, 38 | }, 39 | }, 40 | }, 41 | ], 42 | }, 43 | { 44 | test: /\.css$/i, 45 | use: [ 46 | 'style-loader', 47 | 'css-loader', 48 | ], 49 | }, 50 | { 51 | test: /\.s[ac]ss$/i, 52 | use: [ 53 | 'style-loader', 54 | 'css-loader', 55 | 'sass-loader', 56 | ], 57 | }, 58 | { 59 | test: /\.tsx?$/, 60 | use: [ 61 | "ts-loader" 62 | ], 63 | }, 64 | ] 65 | } 66 | }; -------------------------------------------------------------------------------- /dev_env/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/dev_env/__init__.py -------------------------------------------------------------------------------- /dev_env/asgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from django.core.asgi import get_asgi_application 4 | 5 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dev_env.settings') 6 | 7 | application = get_asgi_application() 8 | -------------------------------------------------------------------------------- /dev_env/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf import settings 2 | from django.contrib import admin 3 | from django.urls import path, include 4 | 5 | from django_ledger.settings import DJANGO_LEDGER_GRAPHQL_SUPPORT_ENABLED 6 | 7 | urlpatterns = [ 8 | path('admin/', admin.site.urls), 9 | path('', include('django_ledger.urls', namespace='django_ledger')), 10 | ] 11 | 12 | # GraphQl API Support... 13 | try: 14 | if DJANGO_LEDGER_GRAPHQL_SUPPORT_ENABLED: 15 | from django_ledger.contrib.django_ledger_graphene.api import schema 16 | from django_ledger.contrib.django_ledger_graphene.views import DjangoLedgerOAuth2GraphQLView 17 | 18 | urlpatterns += [ 19 | path('api/v1/graphql/', DjangoLedgerOAuth2GraphQLView.as_view(graphiql=settings.DEBUG, schema=schema)), 20 | path('api/v1/o/', include('oauth2_provider.urls', namespace='oauth2_provider')), 21 | ] 22 | 23 | except ImportError: 24 | pass 25 | -------------------------------------------------------------------------------- /dev_env/wsgi.py: -------------------------------------------------------------------------------- 1 | import os 2 | 3 | from django.core.wsgi import get_wsgi_application 4 | 5 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dev_env.settings') 6 | 7 | application = get_wsgi_application() 8 | -------------------------------------------------------------------------------- /django_ledger/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | * Miguel Sanda 7 | """ 8 | 9 | default_app_config = 'django_ledger.apps.DjangoLedgerConfig' 10 | 11 | """Django Ledger""" 12 | __version__ = '0.5.5.4' 13 | __license__ = 'GPLv3 License' 14 | 15 | __author__ = 'Miguel Sanda' 16 | __email__ = 'msanda@arrobalytics.com' 17 | 18 | __url__ = 'https://www.djangoledger.com' 19 | -------------------------------------------------------------------------------- /django_ledger/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DjangoLedgerConfig(AppConfig): 5 | name = 'django_ledger' 6 | label = 'django_ledger' 7 | verbose_name = 'Django Ledger' 8 | -------------------------------------------------------------------------------- /django_ledger/contrib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/__init__.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/__init__.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/accounts/schema.py: -------------------------------------------------------------------------------- 1 | 2 | import graphene 3 | from graphene import relay 4 | from graphene_django import DjangoObjectType 5 | from graphene_django.filter import DjangoFilterConnectionField 6 | 7 | from django_ledger.models import AccountModel 8 | 9 | 10 | class AccountNode(DjangoObjectType): 11 | class Meta: 12 | model = AccountModel 13 | filter_fields = { 14 | 'code': ['exact', 'icontains', 'istartswith'], 15 | 'name': ['exact', 'icontains', 'istartswith'], 16 | 'locked': ['exact'], 17 | 'active': ['exact'] 18 | } 19 | interfaces = (relay.Node,) 20 | 21 | 22 | class Accountlist_Query(graphene.ObjectType): 23 | all_accounts = DjangoFilterConnectionField(AccountNode, slug_name=graphene.String(required=True)) 24 | 25 | def resolve_all_accounts(self, info, slug_name, **kwargs): 26 | if info.context.user.is_authenticated: 27 | return AccountModel.objects.for_entity( 28 | entity_slug=slug_name, 29 | user_model=info.context.user, 30 | ).select_related('parent').order_by('code') 31 | else: 32 | return AccountModel.objects.none() 33 | 34 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/api.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | 3 | from django_ledger.contrib.django_ledger_graphene.coa.schema import ChartOfAccountsModelType 4 | from django_ledger.contrib.django_ledger_graphene.entity.schema import EntityModelQuery, EntityModelType 5 | 6 | 7 | class Query( 8 | EntityModelQuery, 9 | # ChartOfAccountsModelQuery 10 | # CustomerQuery, 11 | # Bill_list_Query, 12 | # Accountlist_Query, 13 | # Bank_account_Query , 14 | # ChartOfAccountsQuery, 15 | # UnitOfMeasureQuery, 16 | # VendorsQuery, 17 | # EntityUnitQuery, 18 | # LedgerQuery, 19 | # TransactionsQuery, 20 | # JournalEntryQuery, 21 | # PurchaseOrderQuery, 22 | # QueryUser, 23 | ): 24 | pass 25 | 26 | 27 | # class Mutation( 28 | # # CustomerMutations, 29 | # # BankAccountMutations, 30 | # # AuthMutation, 31 | # ): 32 | # pass 33 | 34 | 35 | schema = graphene.Schema( 36 | types=[ 37 | EntityModelType, 38 | ChartOfAccountsModelType 39 | ], 40 | query=Query, 41 | # mutation=Mutation 42 | ) 43 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class DjangoLedgerGraphqlConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'django_ledger_graphene' 7 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/auth/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | 3 | from graphql_auth.schema import UserQuery, MeQuery 4 | 5 | class QueryUser(UserQuery, MeQuery, graphene.ObjectType): 6 | pass -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/bank_account/schema.py: -------------------------------------------------------------------------------- 1 | 2 | import graphene 3 | from graphene import relay 4 | from graphene_django import DjangoObjectType 5 | from django_ledger.models import BankAccountModel 6 | from graphene_django.filter import DjangoFilterConnectionField 7 | 8 | 9 | class BankaccountNode(DjangoObjectType): 10 | class Meta: 11 | model = BankAccountModel 12 | filter_fields = { 13 | 'name': ['exact', 'icontains', 'istartswith'], 14 | 'account_type': ['exact', 'icontains', 'istartswith'], 15 | 'account_number': ['exact', 'icontains', 'istartswith'], 16 | 'routing_number': ['exact', 'icontains', 'istartswith'], 17 | 'aba_number': ['exact', 'icontains', 'istartswith'], 18 | 'cash_account': ['exact'], 19 | 'active': ['exact'] 20 | } 21 | interfaces = (relay.Node,) 22 | 23 | class Bank_account_Query(graphene.ObjectType): 24 | all_bankaccounts = DjangoFilterConnectionField(BankaccountNode, slug_name=graphene.String(required=True)) 25 | 26 | def resolve_all_bankaccounts(self, info, slug_name, **kwargs): 27 | if info.context.user.is_authenticated: 28 | return BankAccountModel.objects.for_entity( 29 | entity_slug=slug_name, 30 | user_model=info.context.user 31 | ).select_related('cash_account') 32 | else: 33 | return BankAccountModel.objects.none() 34 | 35 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/bill/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/bill/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/bill/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import BillModel 7 | 8 | 9 | class BillNode(DjangoObjectType): 10 | class Meta: 11 | model = BillModel 12 | filter_fields = { 13 | 'vendor': ['exact'], 14 | 'xref': ['exact', 'icontains', 'istartswith'], 15 | 'date_draft': ['exact', 'icontains', 'istartswith'], 16 | 'terms': ['exact', 'icontains', 'istartswith'], 17 | 'cash_account': ['exact'], 18 | 'prepaid_account': ['exact'], 19 | 'unearned_account': ['exact'], 20 | } 21 | interfaces = (relay.Node,) 22 | 23 | 24 | class Bill_list_Query(graphene.ObjectType): 25 | all_bills = DjangoFilterConnectionField(BillNode, slug_name=graphene.String(required=True)) 26 | 27 | def resolve_all_bills(self, info, slug_name, **kwargs): 28 | if info.context.user.is_authenticated: 29 | return BillModel.objects.for_entity( 30 | entity_slug=slug_name, 31 | user_model=info.context.user 32 | ).select_related('vendor').order_by('-updated') 33 | else: 34 | return BillModel.objects.none() 35 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/coa/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/coa/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/coa/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | 5 | from django_ledger.models import ChartOfAccountModel 6 | 7 | 8 | class ChartOfAccountsModelType(DjangoObjectType): 9 | class Meta: 10 | model = ChartOfAccountModel 11 | fields = [ 12 | 'uuid', 13 | 'slug', 14 | 'name', 15 | 'locked' 16 | ] 17 | interfaces = (relay.Node,) 18 | 19 | # class ChartOfAccountsModelQuery(graphene.ObjectType): 20 | # all_coa = graphene.List(ChartOfAccountsModelType, slug=graphene.String(required=True)) 21 | # 22 | # def resolve_all_coa(self, info, slug, **kwargs): 23 | # 24 | # if info.context.user.is_authenticated: 25 | # return ChartOfAccountModel.objects.for_entity( 26 | # entity_slug=slug, 27 | # user_model=info.context.user, 28 | # ) 29 | # else: 30 | # return ChartOfAccountModel.objects.none() 31 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/customers/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/customers/__init__.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/customers/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import CustomerModel, EntityModel 7 | 8 | 9 | class CustomerNode(DjangoObjectType): 10 | class Meta: 11 | model = CustomerModel 12 | filter_fields = { 13 | 'customer_name': ['exact', 'icontains', 'istartswith'], 14 | 'address_1': ['exact', 'icontains', 'istartswith'], 15 | 'address_2': ['exact', 'icontains', 'istartswith'], 16 | 'city': ['exact', 'icontains', 'istartswith'], 17 | 'state': ['exact', 'icontains', 'istartswith'], 18 | 'zip_code': ['exact', 'icontains', 'istartswith'], 19 | 'country': ['exact', 'icontains', 'istartswith'], 20 | 'phone': ['exact', 'icontains', 'istartswith'], 21 | 'email': ['exact', 'icontains', 'istartswith'], 22 | 'website': ['exact', 'icontains', 'istartswith'], 23 | } 24 | interfaces = (relay.Node,) 25 | class EntityList(DjangoObjectType): 26 | class Meta: 27 | model = EntityModel 28 | 29 | class CustomerQuery(graphene.ObjectType): 30 | all_customers = DjangoFilterConnectionField(CustomerNode, slug_name=graphene.String(required=True)) 31 | 32 | def resolve_all_customers(self, info, slug_name, **kwargs): 33 | if info.context.user.is_authenticated: 34 | CustomerModel.objects.for_entity( 35 | entity_slug=slug_name, 36 | user_model=info.context.user 37 | ).order_by('-updated') 38 | else: 39 | return CustomerModel.objects.none() 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/data_import/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/data_import/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/data_import/schema.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/data_import/schema.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/entity/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/entity/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/examples/entity/entityModelDetailQuery.graphql: -------------------------------------------------------------------------------- 1 | { 2 | entityDetailBySlug(slug: "miguel-sanda-5ocug9kr") { 3 | uuid 4 | slug 5 | name 6 | defaultCoa { 7 | uuid 8 | slug 9 | name 10 | locked 11 | } 12 | created 13 | updated 14 | } 15 | 16 | entityDetailByUuid(uuid: "5046db64-b558-49ff-a07a-545bcce8f409") { 17 | uuid 18 | slug 19 | name 20 | defaultCoa { 21 | uuid 22 | slug 23 | name 24 | locked 25 | } 26 | created 27 | updated } 28 | } -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/examples/entity/entityModelListQuery.graphql: -------------------------------------------------------------------------------- 1 | { 2 | visibleEntityList { 3 | uuid 4 | slug 5 | name 6 | accrualMethod 7 | fyStartMonth 8 | hidden 9 | picture 10 | isAdmin 11 | } 12 | 13 | hiddenEntityList { 14 | uuid 15 | slug 16 | name 17 | accrualMethod 18 | fyStartMonth 19 | hidden 20 | picture 21 | isAdmin } 22 | } -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/http/access_token.http: -------------------------------------------------------------------------------- 1 | # curl -X POST 2 | # -H "Cache-Control: no-cache" 3 | # -H "Content-Type: application/x-www-form-urlencoded" 4 | # "http://127.0.0.1:8000/o/token/" 5 | # -d "client_id=${ID}" 6 | # -d "client_secret=${SECRET}" 7 | # -d "code=${CODE}" 8 | # -d "code_verifier=${CODE_VERIFIER}" 9 | # -d "redirect_uri=http://127.0.0.1:8000/noexist/callback" 10 | # -d "grant_type=authorization_code" 11 | POST http://192.168.1.101:8000/api/v1/o/token/ 12 | Cache-Control: no-cache 13 | Content-Type: application/x-www-form-urlencoded 14 | 15 | client_id={{client_id}}&client_secret={{client_secret}}&code={{auth_code}}&code_verifier={{code_verifier}}&redirect_uri={{redirect_uri}}&grant_type=authorization_code 16 | 17 | ### 18 | 19 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/http/http-client.env.json: -------------------------------------------------------------------------------- 1 | { 2 | "dev": { 3 | "host": "http://192.168.1.101", 4 | "port": "8000" 5 | } 6 | } -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/item/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/item/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/item/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import UnitOfMeasureModel 7 | 8 | 9 | class UnitOfMeasureNode(DjangoObjectType): 10 | class Meta: 11 | model = UnitOfMeasureModel 12 | filter_fields = { 13 | 'name' : ['exact', 'icontains', 'istartswith'], 14 | 'unit_abbr': ['exact', 'icontains', 'istartswith'], 15 | 'is_active' : ['exact'] 16 | } 17 | interfaces = (relay.Node,) 18 | 19 | 20 | class UnitOfMeasureQuery(graphene.ObjectType): 21 | all_unit_of_measure = DjangoFilterConnectionField(UnitOfMeasureNode, slug_name=graphene.String(required=True)) 22 | #token=graphene.String(required=True) 23 | 24 | def resolve_all_unit_of_measure(self, info, slug_name): 25 | if info.context.user.is_authenticated: 26 | return UnitOfMeasureModel.objects.for_entity( 27 | entity_slug=slug_name, 28 | user_model=info.context.user 29 | ) 30 | else: 31 | return UnitOfMeasureModel.objects.none() 32 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/journal_entry/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/journal_entry/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/journal_entry/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import JournalEntryModel 7 | 8 | 9 | class JournalEntryNode(DjangoObjectType): 10 | class Meta: 11 | model = JournalEntryModel 12 | filter_fields = { 13 | 'activity': ['exact', 'icontains', 'istartswith'], 14 | 'timestamp': ['exact'], 15 | 'description': ['exact'], 16 | } 17 | interfaces = (relay.Node,) 18 | 19 | 20 | class JournalEntryQuery(graphene.ObjectType): 21 | all_journal_entries = DjangoFilterConnectionField( 22 | JournalEntryNode, slug_name=graphene.String( 23 | required=True), pk_ledger=graphene.UUID()) 24 | 25 | def resolve_all_journal_entry(self, info, slug_name, pk_ledger, **kwargs): 26 | if info.context.user.is_authenticated: 27 | sort = info.context.GET.get('sort') 28 | if not sort: 29 | sort = '-updated' 30 | return JournalEntryModel.objects.for_ledger( 31 | ledger_pk=pk_ledger, 32 | entity_slug=slug_name, 33 | user_model=info.context.user 34 | ).order_by(sort) 35 | else: 36 | return JournalEntryModel.objects.none() 37 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/ledger/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/ledger/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/ledger/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import LedgerModel 7 | 8 | 9 | class LedgerNode(DjangoObjectType): 10 | class Meta: 11 | model = LedgerModel 12 | filter_fields = { 13 | 'name': ['exact', 'icontains', 'istartswith'], 14 | } 15 | interfaces = (relay.Node,) 16 | 17 | 18 | class LedgerQuery(graphene.ObjectType): 19 | all_ledger = DjangoFilterConnectionField( 20 | LedgerNode, slug_name=graphene.String(required=True)) 21 | 22 | def resolve_all_vendors(self, info, slug_name, **kwargs): 23 | if info.context.user.is_authenticated: 24 | sort = info.context.GET.get('sort') 25 | if not sort: 26 | sort = '-updated' 27 | return LedgerModel.objects.for_entity( 28 | entity_slug=slug_name, 29 | user_model=info.context.user 30 | ).order_by(sort) 31 | else: 32 | return LedgerModel.objects.none() 33 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/purchase_order/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/purchase_order/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/purchase_order/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import PurchaseOrderModel 7 | 8 | 9 | class PurchaseOrderNode(DjangoObjectType): 10 | class Meta: 11 | model = PurchaseOrderModel 12 | filter_fields = { 13 | 'date_draft': ['exact'], 14 | 'po_title': ['exact', 'icontains', 'istartswith'], 15 | } 16 | interfaces = (relay.Node,) 17 | 18 | 19 | class PurchaseOrderQuery(graphene.ObjectType): 20 | all_purchase_order = DjangoFilterConnectionField( 21 | PurchaseOrderNode, slug_name=graphene.String(required=True)) 22 | 23 | def resolve_all_purchase_order(self, info, slug_name, **kwargs): 24 | if info.context.user.is_authenticated: 25 | return PurchaseOrderModel.objects.for_entity( 26 | entity_slug=slug_name, 27 | user_model=info.context.user 28 | ).order_by('-date_draft') 29 | 30 | else: 31 | return PurchaseOrderModel.objects.none() 32 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/transaction/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/transaction/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/transaction/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import TransactionModel 7 | 8 | 9 | class TransactionNode(DjangoObjectType): 10 | class Meta: 11 | model = TransactionModel 12 | filter_fields = { 13 | 'journal_entry': ['exact'], 14 | 'account': ['exact'], 15 | 'tx_type': ['exact', 'icontains', 'istartswith'], 16 | 'amount': ['exact', 'icontains', 'istartswith'], 17 | 'description': ['exact', 'icontains', 'istartswith'], 18 | } 19 | interfaces = (relay.Node,) 20 | class TransactionsQuery(graphene.ObjectType): 21 | all_transactions = DjangoFilterConnectionField(TransactionNode, slug_name=graphene.String(required=True), 22 | pk_je=graphene.UUID(), pk_ledger=graphene.UUID()) 23 | 24 | def resolve_all_transactions(self, info, slug_name, pk_je, pk_ledger, **kwargs): 25 | if info.context.user.is_authenticated: 26 | return TransactionModel.objects.for_journal_entry( 27 | entity_slug=slug_name, 28 | user_model=info.context.user, 29 | je_model=pk_je, 30 | ledger_model=pk_ledger 31 | ).order_by('account__code') 32 | else: 33 | return TransactionModel.objects.none() 34 | 35 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/unit/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/unit/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/unit/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import EntityUnitModel 7 | 8 | 9 | class EntityUnitNode(DjangoObjectType): 10 | class Meta: 11 | model = EntityUnitModel 12 | filter_fields = { 13 | 'name': ['exact', 'icontains', 'istartswith'], 14 | } 15 | interfaces = (relay.Node,) 16 | class EntityUnitQuery(graphene.ObjectType): 17 | all_entity_unit = DjangoFilterConnectionField(EntityUnitNode, slug_name=graphene.String(required=True)) 18 | 19 | def resolve_all_vendors(self, info, slug_name, **kwargs): 20 | if info.context.user.is_authenticated: 21 | return EntityUnitModel.objects.for_entity( 22 | entity_slug=slug_name, 23 | user_model=info.context.user 24 | ) 25 | else: 26 | return EntityUnitModel.objects.none() 27 | 28 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/vendor/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/contrib/django_ledger_graphene/vendor/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/vendor/schema.py: -------------------------------------------------------------------------------- 1 | import graphene 2 | from graphene import relay 3 | from graphene_django import DjangoObjectType 4 | from graphene_django.filter import DjangoFilterConnectionField 5 | 6 | from django_ledger.models import VendorModel 7 | 8 | 9 | class VendorNode(DjangoObjectType): 10 | class Meta: 11 | model = VendorModel 12 | filter_fields = { 13 | 'vendor_name': ['exact', 'icontains', 'istartswith'], 14 | 'address_1': ['exact', 'icontains', 'istartswith'], 15 | 'address_2': ['exact', 'icontains', 'istartswith'], 16 | 'city': ['exact', 'icontains', 'istartswith'], 17 | 'state': ['exact', 'icontains', 'istartswith'], 18 | 'zip_code': ['exact', 'icontains', 'istartswith'], 19 | 'country': ['exact', 'icontains', 'istartswith'], 20 | 'phone': ['exact', 'icontains', 'istartswith'], 21 | 'email': ['exact', 'icontains', 'istartswith'], 22 | 'website': ['exact', 'icontains', 'istartswith'], 23 | } 24 | interfaces = (relay.Node,) 25 | 26 | 27 | class VendorsQuery(graphene.ObjectType): 28 | all_vendors = DjangoFilterConnectionField(VendorNode, slug_name=graphene.String(required=True)) 29 | 30 | def resolve_all_vendors(self, info, slug_name, **kwargs): 31 | if info.context.user.is_authenticated: 32 | return VendorModel.objects.for_entity( 33 | entity_slug=slug_name, 34 | user_model=info.context.user 35 | ).order_by('-updated') 36 | else: 37 | return VendorModel.objects.none() 38 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/views.py: -------------------------------------------------------------------------------- 1 | from django.utils.decorators import method_decorator 2 | from django.views.decorators.csrf import csrf_exempt 3 | from graphene_django.views import GraphQLView 4 | from oauth2_provider.views import ProtectedResourceView 5 | 6 | 7 | @method_decorator(csrf_exempt, name='dispatch') 8 | class DjangoLedgerOAuth2GraphQLView( 9 | ProtectedResourceView, 10 | GraphQLView 11 | ): 12 | raise_exception = True 13 | -------------------------------------------------------------------------------- /django_ledger/exceptions.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | from django.core.exceptions import ValidationError 10 | 11 | 12 | class DjangoLedgerConfigurationError(Exception): 13 | pass 14 | 15 | 16 | class InvalidDateInputError(ValidationError): 17 | pass 18 | 19 | 20 | class InvalidRoleError(ValidationError): 21 | pass 22 | 23 | 24 | class TransactionNotInBalanceError(ValidationError): 25 | pass 26 | -------------------------------------------------------------------------------- /django_ledger/forms/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ -------------------------------------------------------------------------------- /django_ledger/forms/auth.py: -------------------------------------------------------------------------------- 1 | from django.contrib.auth.forms import AuthenticationForm, UsernameField 2 | from django.forms import TextInput, CharField, PasswordInput 3 | from django.utils.translation import gettext_lazy as _ 4 | 5 | 6 | class LogInForm(AuthenticationForm): 7 | username = UsernameField( 8 | widget=TextInput( 9 | attrs={ 10 | 'autofocus': True, 11 | 'class': 'input', 12 | 'id': 'djl-el-login-form-username-field' 13 | })) 14 | password = CharField( 15 | label=_("Password"), 16 | strip=False, 17 | widget=PasswordInput( 18 | attrs={ 19 | 'autocomplete': 'current-password', 20 | 'class': 'input', 21 | 'id': 'djl-el-login-form-password-field' 22 | }), 23 | ) 24 | -------------------------------------------------------------------------------- /django_ledger/forms/closing_entry.py: -------------------------------------------------------------------------------- 1 | from django.forms import DateInput, ValidationError, ModelForm, Textarea 2 | from django import forms 3 | from django.utils.timezone import localdate 4 | 5 | from django_ledger.models.closing_entry import ClosingEntryModel 6 | from django_ledger.settings import DJANGO_LEDGER_FORM_INPUT_CLASSES 7 | from django.utils.translation import gettext_lazy as _ 8 | 9 | 10 | class ClosingEntryCreateForm(ModelForm): 11 | 12 | def clean_closing_date(self): 13 | closing_date = self.cleaned_data['closing_date'] 14 | if closing_date > localdate(): 15 | raise ValidationError( 16 | message=_('Cannot create a closing entry with a future date.'), code='invalid_date' 17 | ) 18 | return closing_date 19 | 20 | class Meta: 21 | model = ClosingEntryModel 22 | fields = [ 23 | 'closing_date' 24 | ] 25 | 26 | widgets = { 27 | 'closing_date': DateInput(attrs={ 28 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES + ' is-large', 29 | 'placeholder': _('Closing Date (YYYY-MM-DD)...'), 30 | 'id': 'djl-datepicker' 31 | }) 32 | } 33 | labels = { 34 | 'closing_date': _('Select a Closing Date') 35 | } 36 | 37 | 38 | class ClosingEntryUpdateForm(ModelForm): 39 | class Meta: 40 | model = ClosingEntryModel 41 | fields = [ 42 | 'markdown_notes' 43 | ] 44 | 45 | widgets = { 46 | 'markdown_notes': Textarea(attrs={ 47 | 'class': 'textarea' 48 | }), 49 | } 50 | labels = { 51 | 'markdown_notes': _('Closing Entry Notes') 52 | } 53 | -------------------------------------------------------------------------------- /django_ledger/forms/coa.py: -------------------------------------------------------------------------------- 1 | from django.forms import ModelForm, TextInput, Textarea 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | from django_ledger.models.coa import ChartOfAccountModel 5 | from django_ledger.settings import DJANGO_LEDGER_FORM_INPUT_CLASSES 6 | 7 | 8 | class ChartOfAccountsModelForm(ModelForm): 9 | class Meta: 10 | model = ChartOfAccountModel 11 | fields = [ 12 | # 'slug', 13 | 'name', 14 | 'description' 15 | ] 16 | labels = { 17 | 'slug': _('CoA ID'), 18 | 'name': _('Name'), 19 | 'description': _('Description'), 20 | } 21 | widgets = { 22 | # 'slug': TextInput(attrs={ 23 | # 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 24 | # }), 25 | 'name': TextInput(attrs={ 26 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 27 | }), 28 | 'description': Textarea(attrs={ 29 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 30 | }), 31 | } 32 | 33 | 34 | class ChartOfAccountsModelUpdateForm(ModelForm): 35 | class Meta: 36 | model = ChartOfAccountModel 37 | fields = [ 38 | 'name', 39 | 'locked' 40 | ] 41 | labels = { 42 | 'name': _('Name'), 43 | 'description': _('Description'), 44 | } 45 | widgets = { 46 | 'name': TextInput(attrs={ 47 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 48 | }), 49 | 'description': Textarea(attrs={ 50 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 51 | }), 52 | } 53 | -------------------------------------------------------------------------------- /django_ledger/forms/ledger.py: -------------------------------------------------------------------------------- 1 | from django.forms import ModelForm, TextInput, Select 2 | 3 | from django_ledger.models.ledger import LedgerModel 4 | from django_ledger.settings import DJANGO_LEDGER_FORM_INPUT_CLASSES 5 | 6 | 7 | class LedgerModelCreateForm(ModelForm): 8 | 9 | def __init__(self, entity_slug: str, user_model, *args, **kwargs): 10 | super().__init__(*args, **kwargs) 11 | self.ENTITY_SLUG: str = entity_slug 12 | self.USER_MODEL = user_model 13 | 14 | class Meta: 15 | model = LedgerModel 16 | fields = [ 17 | 'name', 18 | ] 19 | widgets = { 20 | 'name': TextInput( 21 | attrs={ 22 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 23 | } 24 | ), 25 | } 26 | 27 | 28 | class LedgerModelUpdateForm(LedgerModelCreateForm): 29 | class Meta: 30 | model = LedgerModel 31 | fields = [ 32 | 'name', 33 | 'hidden' 34 | ] 35 | widgets = { 36 | 'name': TextInput(attrs={ 37 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 38 | }), 39 | 'entity_unit': Select(attrs={ 40 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 41 | }), 42 | } 43 | -------------------------------------------------------------------------------- /django_ledger/forms/unit.py: -------------------------------------------------------------------------------- 1 | from django.forms import ModelForm, TextInput, ValidationError 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | from django_ledger.models import EntityUnitModel 5 | from django_ledger.settings import DJANGO_LEDGER_FORM_INPUT_CLASSES 6 | 7 | 8 | class EntityUnitModelCreateForm(ModelForm): 9 | def __init__(self, *args, entity_slug, user_model, **kwargs): 10 | super().__init__(*args, **kwargs) 11 | self.ENTITY_SLUG = entity_slug 12 | self.USER_MODEL = user_model 13 | 14 | def clean_name(self): 15 | name = self.cleaned_data['name'] 16 | if len(name) < 10: 17 | raise ValidationError(_('Unit name must be at least 10 characters long')) 18 | return name 19 | 20 | class Meta: 21 | model = EntityUnitModel 22 | fields = [ 23 | 'name', 24 | 'document_prefix' 25 | ] 26 | widgets = { 27 | 'name': TextInput(attrs={ 28 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 29 | }), 30 | 'document_prefix': TextInput(attrs={ 31 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES 32 | }), 33 | } 34 | 35 | 36 | class EntityUnitModelUpdateForm(EntityUnitModelCreateForm): 37 | pass 38 | -------------------------------------------------------------------------------- /django_ledger/forms/utils.py: -------------------------------------------------------------------------------- 1 | from django.forms import ValidationError 2 | from django.utils.translation import gettext_lazy as _ 3 | 4 | 5 | def validate_cszc(cleaned_data): 6 | if any([ 7 | cleaned_data['city'], 8 | cleaned_data['state'], 9 | cleaned_data['zip_code'], 10 | cleaned_data['country'], 11 | ]) and not all([ 12 | cleaned_data['city'], 13 | cleaned_data['state'], 14 | cleaned_data['zip_code'], 15 | cleaned_data['country'], 16 | ]): 17 | raise ValidationError(message=_('Must provide all City/State/Zip/Country')) 18 | -------------------------------------------------------------------------------- /django_ledger/io/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | from django_ledger.io.io_mixin import * 10 | from django_ledger.io.ratios import * 11 | from django_ledger.io.roles import * 12 | -------------------------------------------------------------------------------- /django_ledger/io/ofx.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | from typing import List 10 | 11 | from ofxtools import OFXTree 12 | from ofxtools.models.bank import STMTRS 13 | from ofxtools.models.ofx import OFX 14 | 15 | 16 | class OFXFileManager: 17 | 18 | def __init__(self, ofx_file_or_path, parse_on_load: bool = True): 19 | self.FILE = ofx_file_or_path 20 | self.ofx_tree: OFXTree = OFXTree() 21 | self.ofx_data: OFX or None = None 22 | self.statements: List[STMTRS] or None = None 23 | self.NUMBER_OF_STATEMENTS: int or None = None 24 | 25 | if parse_on_load: 26 | self.parse_ofx() 27 | 28 | def parse_ofx(self): 29 | self.ofx_tree.parse(self.FILE) 30 | self.ofx_data = self.ofx_tree.convert() 31 | self.statements = self.ofx_data.statements 32 | self.NUMBER_OF_STATEMENTS = len(self.statements) 33 | 34 | def get_accounts(self): 35 | return [ 36 | { 37 | 'bank': self.ofx_data.org, 38 | 'fid': self.ofx_data.fid, 39 | 'account_type': acc.accttype, 40 | 'account_number': acc.acctid, 41 | 'routing_number': acc.bankid, 42 | } for acc in self.statements 43 | ] 44 | 45 | def get_account_txs(self, account: str): 46 | acc_statement = next(iter( 47 | st for st in self.ofx_data.statements if st.account.acctid == account 48 | )) 49 | return acc_statement.banktranlist 50 | -------------------------------------------------------------------------------- /django_ledger/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/management/__init__.py -------------------------------------------------------------------------------- /django_ledger/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/management/commands/__init__.py -------------------------------------------------------------------------------- /django_ledger/management/commands/generate_oauth2_codes.py: -------------------------------------------------------------------------------- 1 | import base64 2 | import hashlib 3 | import json 4 | import random 5 | import string 6 | from pathlib import Path 7 | 8 | from django.conf import settings 9 | from django.core.management.base import BaseCommand 10 | 11 | 12 | class Command(BaseCommand): 13 | help = 'Creates a code challenge and a code verifier used for Authorization Code grants when using OAuth2' 14 | 15 | def add_arguments(self, parser): 16 | parser.add_argument('--output', type=str, choices=['stdout', 'json'], default='stdout') 17 | 18 | def handle(self, *args, **options): 19 | code_verifier = ''.join( 20 | random.choice(string.ascii_uppercase + string.digits) for _ in range(random.randint(43, 128))) 21 | code_verifier = base64.urlsafe_b64encode(code_verifier.encode('utf-8')) 22 | 23 | code_challenge = hashlib.sha256(code_verifier).digest() 24 | code_challenge = base64.urlsafe_b64encode(code_challenge).decode('utf-8').replace('=', '') 25 | 26 | code_verifier = code_verifier.decode("utf-8") 27 | 28 | if options['output'] == 'stdout': 29 | self.stdout.write(self.style.SUCCESS(f'Code Verifier: {code_verifier}')) 30 | self.stdout.write(self.style.SUCCESS(f'Code Challenge: {code_challenge}')) 31 | 32 | elif options['output'] == 'json': 33 | out_file = Path(settings.BASE_DIR).joinpath('oauth_codes.json') 34 | 35 | codes = { 36 | 'code_verifier': code_verifier, 37 | 'code_challenge': code_challenge 38 | } 39 | 40 | with open(out_file, 'w') as io: 41 | json.dump(codes, io, indent=4) 42 | -------------------------------------------------------------------------------- /django_ledger/migrations/0002_alter_journalentrymodel_managers_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.4 on 2023-01-09 17:12 2 | 3 | import django.core.validators 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('django_ledger', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterModelManagers( 15 | name='journalentrymodel', 16 | managers=[ 17 | ], 18 | ), 19 | migrations.AlterField( 20 | model_name='transactionmodel', 21 | name='amount', 22 | field=models.DecimalField(decimal_places=2, default=0.0, help_text='Account of the transaction.', max_digits=20, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Amount'), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /django_ledger/migrations/0004_remove_itemmodel_depth_remove_itemmodel_numchild_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-10 12:56 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0003_remove_accountmodel_django_ledg_role_1bff96_idx_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='itemmodel', 15 | name='depth', 16 | ), 17 | migrations.RemoveField( 18 | model_name='itemmodel', 19 | name='numchild', 20 | ), 21 | migrations.RemoveField( 22 | model_name='itemmodel', 23 | name='path', 24 | ), 25 | ] 26 | -------------------------------------------------------------------------------- /django_ledger/migrations/0005_remove_itemmodel_django_ledg_invento_dbf206_idx_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-15 14:12 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0004_remove_itemmodel_depth_remove_itemmodel_numchild_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveIndex( 14 | model_name='itemmodel', 15 | name='django_ledg_invento_dbf206_idx', 16 | ), 17 | migrations.RemoveIndex( 18 | model_name='itemmodel', 19 | name='django_ledg_cogs_ac_82d441_idx', 20 | ), 21 | migrations.RemoveIndex( 22 | model_name='itemmodel', 23 | name='django_ledg_earning_229a60_idx', 24 | ), 25 | migrations.RemoveIndex( 26 | model_name='itemmodel', 27 | name='django_ledg_expense_f65128_idx', 28 | ), 29 | migrations.RemoveIndex( 30 | model_name='itemmodel', 31 | name='django_ledg_item_id_972760_idx', 32 | ), 33 | migrations.AddField( 34 | model_name='itemmodel', 35 | name='item_role', 36 | field=models.CharField(blank=True, choices=[('expense', 'Expense'), ('inventory', 'Inventory'), ('service', 'Service'), ('product', 'Product')], max_length=10, null=True), 37 | ), 38 | migrations.AlterField( 39 | model_name='journalentrymodel', 40 | name='timestamp', 41 | field=models.DateTimeField(verbose_name='Timestamp'), 42 | ), 43 | migrations.AddIndex( 44 | model_name='itemmodel', 45 | index=models.Index(fields=['item_role'], name='django_ledg_item_ro_6040aa_idx'), 46 | ), 47 | ] 48 | -------------------------------------------------------------------------------- /django_ledger/migrations/0006_alter_journalentrymodel_je_number_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.1.5 on 2023-02-17 19:35 2 | 3 | import django.utils.timezone 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('django_ledger', '0005_remove_itemmodel_django_ledg_invento_dbf206_idx_and_more'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='journalentrymodel', 16 | name='je_number', 17 | field=models.SlugField(editable=False, max_length=25, verbose_name='Journal Entry Number'), 18 | ), 19 | migrations.AlterField( 20 | model_name='journalentrymodel', 21 | name='timestamp', 22 | field=models.DateTimeField(default=django.utils.timezone.localtime, verbose_name='Timestamp'), 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /django_ledger/migrations/0009_delete_stagedtransactionmodel.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.2 on 2023-09-22 20:05 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0008_closingentrymodel_closingentrytransactionmodel_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='StagedTransactionModel', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /django_ledger/migrations/0010_delete_importjobmodel.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.2 on 2023-09-22 20:05 2 | 3 | from django.db import migrations 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0009_delete_stagedtransactionmodel'), 10 | ] 11 | 12 | operations = [ 13 | migrations.DeleteModel( 14 | name='ImportJobModel', 15 | ), 16 | ] 17 | -------------------------------------------------------------------------------- /django_ledger/migrations/0012_stagedtransactionmodel_activity.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.2 on 2023-10-08 03:51 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0011_importjobmodel_alter_accountmodel_role_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='stagedtransactionmodel', 15 | name='activity', 16 | field=models.CharField(blank=True, choices=[('Operating', (('op', 'Operating'),)), ('Investing', (('inv_ppe', 'Purchase/Disposition of PPE'), ('inv_securities', 'Purchase/Disposition of Securities'), ('inv', 'Investing Activity Other'))), ('Financing', (('fin_std', 'Payoff of Short Term Debt'), ('fin_ltd', 'Payoff of Long Term Debt'), ('fin_equity', 'Issuance of Common Stock, Preferred Stock or Capital Contribution'), ('fin_dividends', 'Dividends or Distributions to Shareholders'), ('fin', 'Financing Activity Other')))], max_length=20, null=True, verbose_name='Proposed Activity'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /django_ledger/migrations/0013_stagedtransactionmodel_bundle_split.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.2 on 2023-10-11 22:00 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0012_stagedtransactionmodel_activity'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='stagedtransactionmodel', 15 | name='bundle_split', 16 | field=models.BooleanField(default=True, verbose_name='Bundle Split Transactions'), 17 | ), 18 | ] 19 | -------------------------------------------------------------------------------- /django_ledger/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/migrations/__init__.py -------------------------------------------------------------------------------- /django_ledger/models/__init__.py: -------------------------------------------------------------------------------- 1 | from django_ledger.models.mixins import * 2 | from django_ledger.models.bank_account import * 3 | from django_ledger.models.coa import * 4 | from django_ledger.models.bill import * 5 | from django_ledger.models.invoice import * 6 | from django_ledger.models.items import * 7 | from django_ledger.models.accounts import * 8 | from django_ledger.models.ledger import * 9 | from django_ledger.models.transactions import * 10 | from django_ledger.models.journal_entry import * 11 | from django_ledger.models.customer import * 12 | from django_ledger.models.estimate import * 13 | from django_ledger.models.vendor import * 14 | from django_ledger.models.unit import * 15 | from django_ledger.models.purchase_order import * 16 | from django_ledger.models.closing_entry import * 17 | from django_ledger.models.entity import * 18 | from django_ledger.models.data_import import * -------------------------------------------------------------------------------- /django_ledger/models/schemas/__init__.py: -------------------------------------------------------------------------------- 1 | from .digest import SCHEMA_DIGEST 2 | from .net_payable import SCHEMA_NET_PAYABLES 3 | from .net_receivable import SCHEMA_NET_RECEIVABLE 4 | from .pnl import SCHEMA_PNL 5 | -------------------------------------------------------------------------------- /django_ledger/models/schemas/digest.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | SCHEMA_ROLE_ACCOUNT = { 10 | 'type': 'object' 11 | } 12 | 13 | SCHEMA_ROLE_BALANCE = { 14 | 'type': 'object' 15 | } 16 | 17 | SCHEMA_ROLE_BALANCE_BY_PERIOD = { 18 | 'type': ['object', 'null'] 19 | } 20 | 21 | SCHEMA_GROUP_ACCOUNT = { 22 | 'type': 'object' 23 | } 24 | 25 | SCHEMA_GROUP_BALANCE = { 26 | 'type': 'object' 27 | } 28 | 29 | SCHEMA_GROUP_BALANCE_BY_PERIOD = { 30 | 'type': ['object', 'null'] 31 | } 32 | 33 | SCHEMA_RATIOS = { 34 | 'type': 'object' 35 | } 36 | 37 | SCHEMA_ACCOUNTS = { 38 | 'type': 'array' 39 | } 40 | 41 | SCHEMA_DIGEST = { 42 | 'type': 'object', 43 | 'properties': { 44 | 'accounts': SCHEMA_ACCOUNTS, 45 | 'role_account': SCHEMA_ROLE_ACCOUNT, 46 | 'role_balance': SCHEMA_ROLE_BALANCE, 47 | 'role_balance_by_period': SCHEMA_ROLE_BALANCE_BY_PERIOD, 48 | 'group_account': SCHEMA_GROUP_ACCOUNT, 49 | 'group_balance': SCHEMA_GROUP_BALANCE, 50 | 'group_balance_by_period': SCHEMA_GROUP_BALANCE_BY_PERIOD, 51 | 'ratios': SCHEMA_RATIOS, 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /django_ledger/models/schemas/net_payable.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | SCHEMA_NET_PAYABLES_DATA = { 10 | 'type': 'object', 11 | 'properties': { 12 | 'net_0': { 13 | 'type': 'number' 14 | }, 15 | 'net_30': { 16 | 'type': 'number' 17 | }, 18 | 'net_60': { 19 | 'type': 'number' 20 | }, 21 | 'net_90': { 22 | 'type': 'number' 23 | }, 24 | 'net_90+': { 25 | 'type': 'number' 26 | }, 27 | }, 28 | 'required': [ 29 | 'net_0', 30 | 'net_30', 31 | 'net_60', 32 | 'net_90', 33 | 'net_90+' 34 | ] 35 | } 36 | 37 | SCHEMA_NET_PAYABLES = { 38 | 'type': 'object', 39 | 'properties': { 40 | 'entity_slug': { 41 | 'type': 'string' 42 | }, 43 | 'entity_name': { 44 | 'type': 'string' 45 | }, 46 | 'net_payable_data': SCHEMA_NET_PAYABLES_DATA 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /django_ledger/models/schemas/net_receivable.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | SCHEMA_NET_RECEIVABLE_DATA = { 10 | 'type': 'object', 11 | 'properties': { 12 | 'net_0': { 13 | 'type': 'number' 14 | }, 15 | 'net_30': { 16 | 'type': 'number' 17 | }, 18 | 'net_60': { 19 | 'type': 'number' 20 | }, 21 | 'net_90': { 22 | 'type': 'number' 23 | }, 24 | 'net_90+': { 25 | 'type': 'number' 26 | }, 27 | }, 28 | 'required': [ 29 | 'net_0', 30 | 'net_30', 31 | 'net_60', 32 | 'net_90', 33 | 'net_90+' 34 | ] 35 | } 36 | 37 | SCHEMA_NET_RECEIVABLE = { 38 | 'type': 'object', 39 | 'properties': { 40 | 'entity_slug': { 41 | 'type': 'string' 42 | }, 43 | 'entity_name': { 44 | 'type': 'string' 45 | }, 46 | 'net_receivable_data': SCHEMA_NET_RECEIVABLE_DATA 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /django_ledger/models/schemas/pnl.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | SCHEMA_PNL_DATA = { 10 | 'type': 'object', 11 | } 12 | 13 | SCHEMA_PNL = { 14 | 'type': 'object', 15 | 'properties': { 16 | 'entity_slug': { 17 | 'type': 'string' 18 | }, 19 | 'entity_name': { 20 | 'type': 'string' 21 | }, 22 | 'pnl_data': SCHEMA_PNL_DATA 23 | }, 24 | 'required': [ 25 | 'entity_slug', 26 | 'entity_name', 27 | 'pnl_data' 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /django_ledger/report/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/report/__init__.py -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/img/daniel-weiss-aj2Os9mYgJU-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/img/daniel-weiss-aj2Os9mYgJU-unsplash.jpg -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/img/made-with-bulma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/img/made-with-bulma.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo-report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo-report.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo@4x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo_1.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo_1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo_1@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo_1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo_1@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-logo_1@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-logo_1@4x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-tagline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-tagline.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-tagline@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-tagline@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-tagline@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-tagline@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-tagline@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-tagline@4x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-text.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-text@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-text@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-text@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-text@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/django-ledger-text@4x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/django-ledger-text@4x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/static/django_ledger/logo/favicon.png -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/account/account_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 | {{ form.as_p }} 14 | 15 | Back 17 |
18 |
19 |
20 |
21 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/account/account_create_child.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |

{{ page_title }}

11 |

{{ account }}

12 |
14 | {% csrf_token %} 15 | {{ form.as_p }} 16 | 17 | Back 19 |
20 |
21 |
22 |
23 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/account/account_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block aux_menu %} 7 | {% period_navigation 'account-detail' %} 8 | {% endblock %} 9 | 10 | {% block view_content %} 11 |
12 |
13 |

{{ account.code }}: {{ account.name }}

14 |

{% trans 'Account Transaction List Report' %}

15 |

16 | {% if view_date %} 17 | {{ from_date | date:'m/d/Y' }} 18 | {% else %} 19 | {{ from_date | date:'m/d/Y' }} - {{ to_date | date:'m/d/Y' }} 20 | {% endif %} 21 |

22 |
23 |
{% account_txs_table transactions %}
24 |
25 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/account/account_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 | 16 |
17 |
18 | {% accounts_table accounts %} 19 |
20 |
21 |
22 | {% endblock %} 23 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/account/account_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 | {% csrf_token %} 12 | {{ form.as_p }} 13 | 14 | 16 | {% trans 'Back' %} 17 | 18 |
19 |
20 |
21 |
22 | {% endblock %} 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/bank_account/bank_account_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 | {{ form.as_p }} 14 | 17 | {% trans 'Back' %} 19 |
20 |
21 |
22 |
23 | {% endblock %} 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/bank_account/bank_account_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 | 8 |
9 | 18 | {% bank_account_table bank_accounts %} 19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/bank_account/bank_account_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{{ bank_account.name }}

13 |

{% trans 'Account' %}: {{ bank_account.account_number }}

14 |

{% trans 'Routing' %}: {{ bank_account.routing_number }}

15 |

{% trans 'ABA' %}: {{ bank_account.aba_number }}

16 |
17 |
18 |
20 | {% csrf_token %} 21 | {{ form.as_p }} 22 | 25 | {% trans 'Back' %} 27 |
28 |
29 |
30 |
31 | {% endblock %} 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/bills/bill_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

Are you sure you want to delete 15 | Bill {{ bill.bill_number }}

16 |
17 |
18 |

All transactions associated with this Bill will be deleted. 19 | If you want to void the bill instead, click 21 | here 22 | 23 |

24 |
25 |
26 | {% trans 'Go Back' %} 28 | 29 |
30 |
31 |
32 |
33 | 34 |
35 | 36 | {% endblock %} 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/bills/bill_void.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 | 8 |
9 |
10 |
12 | {% csrf_token %} 13 |
14 |
15 |

Are you sure you want to void 16 | Bill {{ bill.bill_number }}?

17 |
18 |
19 |

All transactions associated with this Bill will be reversed as of today 20 | {% now "jS F Y" %}.

21 |
22 |
23 | {% trans 'Go Back' %} 25 | 26 |
27 |
28 |
29 |
30 |
31 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/closing_entry/closing_entry_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |

{% trans 'Create Closing Entry' %}

10 |
11 |
12 |
14 | {% csrf_token %} 15 | {{ form }} 16 |
17 |
18 | 22 | {% trans 'Back To Closing Entries' %} 25 |
26 |
27 | 28 |
29 |
30 |
31 | {% endblock %} 32 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/closing_entry/closing_entry_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_2.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

{{ closing_entry.get_delete_message }}

15 |
16 |
17 | {% trans 'Go Back' %} 19 | 20 |
21 |
22 |
23 |
24 |
25 | {% endblock %} 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/closing_entry/closing_entry_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 | {% include 'django_ledger/closing_entry/includes/card_closing_entry.html' with closing_entry_model=object entity_slug=view.kwargs.entity_slug %} 11 |
12 | 18 |
19 |
20 |
21 | {% include 'django_ledger/includes/card_markdown.html' with style='card_1' title='Closing Entry Notes' notes_html=closing_entry_model.notes_html %} 22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |

{% trans 'Closing Entry Transactions' %}

30 |
31 |
32 |
33 | {% closing_entry_txs_table closing_entry_txs_qs %} 34 |
35 | 36 |
37 |
38 |
39 | 40 |
41 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/closing_entry/closing_entry_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 | {% include 'django_ledger/closing_entry/includes/card_closing_entry.html' with closing_entry_model=object entity_slug=view.kwargs.entity_slug %} 11 |
12 |
13 |
14 |
15 |
16 | {% csrf_token %} 17 | {{ form }} 18 | 21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |

{% trans 'Closing Entry Transactions' %}

30 |
31 |
32 |
33 | {% closing_entry_txs_table closing_entry_txs_qs %} 34 |
35 | 36 |
37 |
38 |
39 | 40 |
41 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/closing_entry/tags/closing_entry_txs_table.html: -------------------------------------------------------------------------------- 1 | {% load django_ledger %} 2 | {% load i18n %} 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {% for ce_tx in ce_txs_list %} 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {% endfor %} 25 | 26 |
{% trans 'Account' %}{% trans 'Unit' %}{% trans 'Activity' %}{% trans 'TX Type' %}{% trans 'Balance' %}
{{ ce_tx.account_model }}{{ ce_tx.unit_model.name }}{% if ce_tx.activity %}{{ ce_tx.get_activity_display }}{% endif %}{{ ce_tx.get_tx_type_display | upper }}{% currency_symbol %}{{ ce_tx.balance | currency_format }}
27 |
28 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/code_of_accounts/coa_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | 5 | {% block view_content %} 6 |
7 |
8 |
9 |
10 | {% csrf_token %} 11 | {{ form.as_p }} 12 | 15 | Back 18 |
19 |
20 |
21 |
22 | {% endblock %} 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/activity_form.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 | 5 |
6 | 7 |
8 | 11 |
12 | 13 |
14 |
15 |
16 |
{{ activity_form.activity }}
17 |
18 |
19 | 20 |
21 |
22 |
23 | 24 |
25 | 26 |
27 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/chart_container.html: -------------------------------------------------------------------------------- 1 |
2 | 4 |
-------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/date_picker.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 | {% if date_navigation_url %} 4 | 6 | {% endif %} 7 | 8 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/default_entity.html: -------------------------------------------------------------------------------- 1 |
4 | {% csrf_token %} 5 |
6 |
7 |
8 | {{ default_entity_form.entity_model }} 9 |
10 |
11 |
12 |
-------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/filters.html: -------------------------------------------------------------------------------- 1 | {% load django_ledger %} 2 | 3 |
4 |
5 |

Filters

6 |
7 |
8 | {% activity_filter %} 9 |
10 |
-------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/icon.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/modals.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/components/modals_v2.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/customer/customer_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load django_ledger %} 4 | 5 | {% block view_content %} 6 | 7 |
8 |
9 |
10 |
11 |

{% trans 'Create Customer' %}

12 |
13 |
14 |
16 | 17 |
18 | {{ form.as_p }} 19 | {% csrf_token %} 20 |
21 | 22 |
23 | 24 | {% trans 'Go Back' %} 26 |
27 |
28 | 29 |
30 |
31 |
32 |
33 | {% endblock %} 34 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/customer/customer_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 | 8 | 9 |
10 | 19 | 20 | {% customer_table %} 21 | 22 |
23 | 24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/customer/customer_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load django_ledger %} 4 | 5 | {% block view_content %} 6 | 7 |
8 |
9 |
10 |
11 |

{% trans 'Update Customer' %}

12 |
13 |
14 |
16 | 17 |
18 | {{ form.as_p }} 19 | {% csrf_token %} 20 |
21 | 22 |
23 | 24 | {% trans 'Go Back' %} 26 |
27 |
28 | 29 |
30 |
31 |
32 |
33 | {% endblock %} 34 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/customer/includes/card_customer.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% load django_ledger %} 3 | 4 |
5 |
6 |

7 | 8 | {% icon 'bi:person-lines-fill' 36 %} 9 | {% trans 'Customer Information' %}

10 |
11 |
12 |
13 |

14 | {{ customer.customer_name }} 15 |

16 |

17 | {% if customer.address_1 %}{{ customer.address_1 }}
{% endif %} 18 | {% if customer.address_2 %}{{ customer.address_2 }}
{% endif %} 19 | {% if customer.get_cszc %}{{ customer.get_cszc }}
{% endif %} 20 | {% if customer.phone %}{{ customer.phone }}
{% endif %} 21 | {% if customer.email %}{{ customer.email }}
{% endif %} 22 | {% if customer.website %}{{ customer.website }}
{% endif %} 23 |

24 |
25 |
26 | 30 | 31 |
32 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/data_import/data_import_job_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 | 10 | {% trans 'Import OFX File' %} 11 | 13 | {% trans 'Back' %} 14 | {% data_import_job_list_table %} 15 |
16 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/data_import/data_import_job_txs.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |

{% trans 'Pending Transactions' %}

11 | {% data_import_job_txs_pending staged_txs_formset %} 12 |
13 |
14 |

{% trans 'Imported Transactions' %}

15 | {% data_import_job_txs_imported staged_txs_qs %} 16 |
17 | 23 |
24 |
25 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/data_import/import_job_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_2.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 | {% csrf_token %} 11 |
12 |
13 |

{{ import_job_model.get_delete_message }}

14 |
15 |
16 | {% trans 'Go Back' %} 18 | 19 |
20 |
21 |
22 |
23 |
24 | {% endblock %} 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/data_import/import_job_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 | {% csrf_token %} 12 | {{ form.as_p }} 13 | 16 | 18 | {% trans 'Import Job List' %} 19 | 20 |
21 |
22 |
23 |
24 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/data_import/tags/data_import_job_txs_imported.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {% for imported_tx in imported_txs %} 17 | 18 | 19 | 20 | 22 | 23 | 24 | 27 | 28 | {% endfor %} 29 | 30 |
Dated PostedDescriptionAmountMap ToTXActions
{{ imported_tx.date_posted }}{{ imported_tx.name }} 21 | ${{ imported_tx.get_amount }}{{ imported_tx.account_model }}{{ imported_tx.transaction_model }} 25 | {% trans 'View JE' %} 26 |
31 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/entity/entitiy_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/base.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | 5 | {% block content %} 6 | 7 |
8 |
9 |
10 |
11 |
12 |
13 |
{% trans 'My Entities' %}
14 |
15 |
16 | 26 | {% trans 'New Entity' %} 28 |
29 |
30 |
31 |
32 |
33 | 34 |
35 | 36 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/entity/entity_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_2.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
9 |
10 | {% csrf_token %} 11 |
12 |
13 |
14 |

15 | 16 | 18 | 19 | {% trans 'New Entity Information' %}

20 |
21 |
22 | {{ form.as_p }} 23 | 26 | Back 28 |
29 |
30 |
31 |
32 |
33 | {% endblock %} 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/entity/entity_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_2.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

Are you sure you want to delete 15 | Entity {{ entity.name }}?

16 |
17 |
18 |

All data associated with this entity will be deleted.

19 |
20 |
21 | {% trans 'Go Back' %} 23 | 24 |
25 |
26 |
27 |
28 |
29 | 30 | 31 | {% endblock %} 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/entity/entity_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/base.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | 5 | {% block content %} 6 | 7 |
8 |
9 |
10 |
11 |
13 | {% csrf_token %} 14 | {{ form.as_p }} 15 | 18 | 20 | {% trans 'Back' %} 21 | 22 |
23 | 24 |
25 |
26 |
27 | 28 |
29 | 30 | {% endblock %} 31 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/entity/home.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/base.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | 7 | {% block content %} 8 |
9 |
10 |
11 | {% for entity in entities %} 12 |
13 | {% include 'django_ledger/entity/includes/card_entity.html' with entity=entity %} 14 |
15 | {% endfor %} 16 |
17 |
18 | 19 | {% icon "ic:baseline-add-circle-outline" 48 %} 20 |

{% trans 'New Entity' %}

21 |
22 |
23 |
24 |
25 |
26 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/entity/includes/card_entity.html: -------------------------------------------------------------------------------- 1 | {% load django_ledger %} 2 | {% load i18n %} 3 | {% now "Y" as current_year %} 4 | 5 | 6 |
7 |
8 |

9 | {% icon "ic:baseline-business" 36 %}{{ entity.name }} 10 |

11 |

{{ entity.address_1 }}

12 |

13 | {% if entity.is_accrual_method %} 14 | 15 | {% icon 'mdi:cash-clock' 24 %} 16 | {% trans 'Accrual Method' %} 17 | {% elif entity.is_cash_method %} 18 | 19 | {% icon 'bi:cash-stack' 24 %} 20 | {% trans 'Cash Method' %} 21 | {% endif %} 22 | 23 |

24 | 25 |

Created: {{ entity.created | timesince }} ago

26 |

{% trans 'Last Closing Date' %}: {{ entity.last_closing_date }}

27 |
28 | 33 |
-------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/estimate/estimate_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load django_ledger %} 3 | {% load i18n %} 4 | 5 | {% block view_content %} 6 |
7 |
8 |
9 |
10 |

11 | 12 | {% icon header_subtitle_icon 36 %} 13 | {{ page_title }}

14 |
15 |
16 |
18 | {% csrf_token %} 19 | {{ form }} 20 | 24 | {% trans 'Back' %} 26 |
27 |
28 | 29 |
30 |
31 |
32 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/expense/expense_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 |
14 |

15 | 16 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 17 | {{ page_title }}

18 |
19 |
20 | {{ form.as_p }} 21 | 25 | {% trans 'Back' %} 27 |
28 |
29 |
30 |
31 |
32 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/expense/expense_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{% trans 'The Things I Pay For' %}

13 | 17 |
18 |
19 | {% expense_item_table expense_list %} 20 |
21 |
22 | {% endblock %} 23 | 24 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/expense/expense_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 |
14 |

15 | 16 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 17 | {{ page_title }}

18 |
19 |
20 | {{ form }} 21 | 25 | {% trans 'Back' %} 27 |
28 |
29 |
30 |
31 |
32 | {% endblock %} 33 | 34 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/includes/breadcrumbs.html: -------------------------------------------------------------------------------- 1 | {% load django_ledger %} 2 |
3 |
4 |
5 | {% nav_breadcrumbs %} 6 |
7 |
8 |
-------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/includes/card_markdown.html: -------------------------------------------------------------------------------- 1 | {% load trans from i18n %} 2 | {% load django_ledger %} 3 | 4 | {% if style == 'card_1' %} 5 |
6 |
7 |
8 |

{% if title %}{{ title }}{% else %} 9 | {% trans 'Notes' %} 10 | {% endif %}

11 |
12 |
13 |
14 |
15 | {% if notes_html %} 16 | {% autoescape off %} 17 | {{ notes_html | safe }} 18 | {% endautoescape %} 19 | {% else %} 20 |

{% trans 'No available notes to display...' %}

21 | {% endif %} 22 |
23 |
24 |
25 | {% endif %} 26 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/includes/footer.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/includes/messages.html: -------------------------------------------------------------------------------- 1 | {% if messages %} 2 | {# Messages Container #} 3 |
4 | {% for msg in messages %} 5 |
6 | 7 | {{ msg | safe }} 8 |
9 | {% endfor %} 10 |
11 | {% endif %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/includes/nav.html: -------------------------------------------------------------------------------- 1 | {% load static %} 2 | {% load django_ledger %} 3 | {% load cache %} 4 | {% load i18n %} 5 | {% now "Y" as current_year %} 6 | 7 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/includes/widget_bs.html: -------------------------------------------------------------------------------- 1 | {% load django_ledger %} 2 | {% load i18n %} 3 | 4 |
5 |

{% trans 'Assets' %}

6 |

7 | {% currency_symbol %}{{ tx_digest.group_balance.GROUP_ASSETS | currency_format }}

8 |

{% trans 'Liabilities' %}

9 |

10 | {% currency_symbol %}{{ tx_digest.group_balance.GROUP_LIABILITIES | currency_format }}

11 |

{% trans 'Equity' %}

12 |

13 | {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EQUITY | currency_format }}

14 |

{% trans 'Cash' %}

15 |

16 | {% currency_symbol %}{{ tx_digest.role_balance.ASSET_CA_CASH | currency_format }}

17 |
18 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/includes/widget_ic.html: -------------------------------------------------------------------------------- 1 | {% load django_ledger %} 2 | {% load i18n %} 3 | 4 |
5 |

{% trans 'Revenue' %}

6 |

7 | {% currency_symbol %}{{ tx_digest.group_balance.GROUP_INCOME | currency_format }}

8 |

{% trans 'Expenses' %}

9 |

10 | {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EXPENSES | reverse_sing | currency_format }}

11 |

{% trans 'Earnings (Loss)' %}

12 |

13 | {% currency_symbol %}{{ tx_digest.group_balance.GROUP_EARNINGS | currency_format }}

14 |

{% trans 'Accounting Period' %}

15 | {% if not has_date %} 16 |

{{ from_date | date }} {% trans 'thru' %} {{ to_date | date }}

18 | {% else %} 19 |

{{ from_date | date }}

20 | {% endif %} 21 |
-------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/inventory/inventory_item_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 |
14 |

15 | 16 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 17 | {{ page_title }}

18 |
19 |
20 | {{ form.as_p }} 21 | 25 | {% trans 'Back' %} 27 |
28 |
29 |
30 |
31 |
32 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/inventory/inventory_item_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{% trans 'My Inventory Items' %}

13 | 17 |
18 |
19 | 20 | {% inventory_item_table inventory_item_list %} 21 | 22 |
23 |
24 | {% endblock %} 25 | 26 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/inventory/inventory_item_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 |
14 |

15 | 16 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 17 | {{ page_title }}

18 |
19 |
20 | {{ form.as_p }} 21 | 25 | {% trans 'Back' %} 27 |
28 |
29 |
30 |
31 |
32 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/inventory/tags/inventory_table.html: -------------------------------------------------------------------------------- 1 | {% load django_ledger %} 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | {% for i in inventory_list %} 14 | 15 | 16 | 17 | 18 | 19 | 20 | {% endfor %} 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
ItemUOMQuantityValue
{{ i.item_model__name }}{{ i.item_model__uom__name }}{{ i.total_quantity | floatformat:3 }}{% currency_symbol %}{{ i.total_value | currency_format }}
Total Value{% currency_symbol %}{{ inventory_total_value | currency_format }}
31 |
-------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/invoice/invoice_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

Are you sure you want to delete 15 | Invoice {{ invoice.invoice_number }}

16 |
17 |
18 |

All transactions associated with this invoice will be deleted. 19 | If you want to void the invoice instead, click here

20 |
21 |
22 | {% trans 'Go Back' %} 24 | 25 |
26 | 27 |
28 |
29 |
30 | 31 |
32 | {% endblock %} 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/journal_entry/je_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | 5 | {% block view_content %} 6 |
7 |
8 |

{% trans 'Create Journal Entry' %}

9 |

{{ ledger_model.name }}

10 |
11 |
12 |
13 |
15 | {% csrf_token %} 16 | {{ form.as_p }} 17 | 19 | Back 21 |
22 |
23 |
24 |
25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/journal_entry/je_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_2.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

{{ je_model.get_delete_message }}

15 |
16 |
17 | {% trans 'Go Back' %} 19 | 20 |
21 |
22 |
23 |
24 |
25 | 26 | 27 | {% endblock %} 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/journal_entry/je_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | 5 | {% block view_content %} 6 |
7 |
8 |
9 |
11 | {% csrf_token %} 12 | {{ form.as_p }} 13 | 15 | Back 17 |
18 |
19 |
20 |
21 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/layouts/content_layout_1.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/base.html' %} 2 | {% load navigation_menu from django_ledger %} 3 | 4 | {% block content %} 5 |
6 |
7 |
8 | 9 | {# SIDE MENU #} 10 | {% if not hide_menu %} 11 |
12 |
13 | {% block aux_menu %}{% endblock %} 14 |
15 | {% navigation_menu 'desktop' %} 16 |
17 |
18 |
19 | {% endif %} 20 | 21 |
22 | {% block view_content %}{% endblock %} 23 |
24 | 25 |
26 |
27 |
28 | {% endblock content %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/layouts/content_layout_2.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/base.html' %} 2 | 3 | {% block content %} 4 |
5 |
6 |
7 |
8 | {% block view_content %}{% endblock %} 9 |
10 |
11 |
12 |
13 | {% endblock content %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/ledger/ledger_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 | {{ form.as_p }} 14 | 16 | Back 18 |
19 |
20 |
21 |
22 | {% endblock %} 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/ledger/ledger_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_2.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

{{ ledger_model.get_delete_message }}

15 |
16 |
17 | {% trans 'Go Back' %} 19 | 20 |
21 |
22 |
23 |
24 |
25 | 26 | 27 | {% endblock %} 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/ledger/ledger_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 | {{ form.as_p }} 14 | 17 | Back 19 |
20 |
21 |
22 |
23 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/product/product_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 | 11 |
13 | {% csrf_token %} 14 |
15 |

16 | 17 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 18 | {{ page_title }}

19 |
20 |
21 | {{ form.as_p }} 22 | 26 | {% trans 'Back' %} 28 |
29 |
30 | 31 |
32 |
33 |
34 | {% endblock %} 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/product/product_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

Are you sure you want to delete 15 | {{ item_model }}

16 |
17 |
18 | {% trans 'Go Back' %} 20 | 21 |
22 |
23 |
24 |
25 |
26 | {% endblock %} 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/product/product_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{% trans 'Products List' %}

13 | 17 |
18 |
19 | {% product_table product_list %} 20 |
21 |
22 | {% endblock %} 23 | 24 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/product/product_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 |
14 |

15 | 16 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 17 | {{ page_title }}

18 |
19 |
20 | {{ form }} 21 | 25 | {% trans 'Back' %} 27 |
28 |
29 | 30 |
31 |
32 |
33 | {% endblock %} 34 | 35 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/purchase_order/po_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 | 8 | 9 |
10 | {% if estimate_model %} 11 |
12 |

{% trans 'PO for Estimate' %}: {{ estimate_model.title }}

13 |

{{ estimate_model.estimate_number }}

14 |

{{ estimate_model.customer }}

15 | 17 | {% trans 'Back to Estimate' %} 18 |
19 | {% endif %} 20 | 21 |
22 |
23 | {% csrf_token %} 24 | {{ form }} 25 | 29 |
30 |
31 |
32 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/purchase_order/po_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

Are you sure you want to delete 15 | Purchase Order {{ po_model.po_number }}

16 |
17 |
18 |

All transactions associated with this Purchase Order will be deleted. 19 | If you want to void the PO instead, click here

20 |
21 |
22 | {% trans 'Go Back' %} 24 | 25 |
26 |
27 |
28 |
29 |
30 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/service/service_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 | 11 |
13 | {% csrf_token %} 14 |
15 |

16 | 17 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 18 | {{ page_title }}

19 |
20 |
21 | {{ form.as_p }} 22 | 26 | {% trans 'Back' %} 28 |
29 |
30 | 31 |
32 |
33 |
34 | {% endblock %} 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/service/service_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

Are you sure you want to delete 15 | {{ item_model }}

16 |
17 |
18 | {% trans 'Go Back' %} 20 | 21 |
22 |
23 |
24 |
25 | 26 |
27 | 28 | {% endblock %} 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/service/service_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{% trans 'Service List' %}

13 | 17 |
18 |
19 | {% service_table service_list %} 20 |
21 |
22 | {% endblock %} 23 | 24 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/service/service_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
12 | {% csrf_token %} 13 |
14 |

15 | 16 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 17 | {{ page_title }}

18 |
19 |
20 | {{ form }} 21 | 25 | {% trans 'Back' %} 27 |
28 |
29 | 30 |
31 |
32 |
33 | {% endblock %} 34 | 35 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/unit/unit_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{% trans 'Create Entity Unit' %}

13 |
14 |
15 | 16 |
17 |
18 |
20 | {% csrf_token %} 21 | {{ form.as_p }} 22 | 23 | {% trans 'Back' %} 25 |
26 |
27 |
28 | 29 |
30 |
31 | {% endblock %} 32 | 33 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/unit/unit_detail.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{{ unit.name }}

13 |
14 |
15 | 16 |
17 | 18 |
19 |

{% trans 'JE Document Prefix' %}: {{ unit.document_prefix }}

20 |
21 | 31 | 32 |
33 | 34 | 35 |
36 |
37 | {% endblock %} 38 | 39 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/unit/unit_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |
12 |

{% trans 'Update Entity Unit' %}

13 |
14 |
15 | 16 |
17 |
18 |
20 | {% csrf_token %} 21 | {{ form.as_p }} 22 | 23 | {% trans 'Back' %} 25 |
26 |
27 |
28 | 29 |
30 |
31 | {% endblock %} 32 | 33 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/uom/uom_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 | 11 |
13 | {% csrf_token %} 14 |
15 |

16 | 17 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 18 | {{ page_title }}

19 |
20 |
21 | {{ form.as_p }} 22 | 26 | {% trans 'Back' %} 28 |
29 |
30 | 31 |
32 |
33 |
34 | {% endblock %} 35 | 36 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/uom/uom_delete.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
11 | {% csrf_token %} 12 |
13 |
14 |

Are you sure you want to delete 15 | {{ uom_model }}

16 |
17 | {#
#} 18 | {#

All transactions associated with this Bill will be deleted.#} 19 | {# If you want to void the bill instead, click #} 21 | {# here#} 22 | {# #} 23 | {#

#} 24 | {#
#} 25 |
26 | {% trans 'Go Back' %} 28 | 29 |
30 |
31 |
32 |
33 | 34 |
35 | 36 | {% endblock %} 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/uom/uom_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 | 10 |
11 |
12 |
13 |

{% trans 'Unit of Measures List' %}

14 | 18 |
19 |
20 | 21 | {% uom_table uom_list %} 22 | 23 |
24 |
25 | {% endblock %} 26 | 27 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/uom/uom_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 | 11 |
13 | {% csrf_token %} 14 |
15 |

16 | 17 | {% icon 'ic:baseline-production-quantity-limits' 36 %} 18 | {{ page_title }}

19 |
20 |
21 | {{ form.as_p }} 22 | 26 | {% trans 'Back' %} 28 |
29 |
30 | 31 |
32 |
33 |
34 | {% endblock %} 35 | 36 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/vendor/includes/card_vendor.html: -------------------------------------------------------------------------------- 1 | {% load i18n %} 2 | {% load django_ledger %} 3 | 4 |
5 |
6 |

7 | 8 | {% icon 'bi:person-lines-fill' 36 %} 9 | {% trans 'Vendor Info' %}

10 |
11 |
12 |
13 |

14 | {{ vendor.vendor_name }} 15 |

16 |

17 | {% if vendor.address_1 %}{{ vendor.address_1 }}
{% endif %} 18 | {% if vendor.address_2 %}{{ vendor.address_2 }}
{% endif %} 19 | {% if vendor.get_cszc %}{{ vendor.get_cszc }}
{% endif %} 20 | {% if vendor.phone %}{{ vendor.phone }}
{% endif %} 21 | {% if vendor.email %}{{ vendor.email }}
{% endif %} 22 | {% if vendor.website %}{{ vendor.website }}
{% endif %} 23 |

24 |
25 |
26 | 30 |
31 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/vendor/vendor_create.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load django_ledger %} 4 | 5 | {% block view_content %} 6 |
7 |
8 |
9 |
10 |

{% trans 'Create Vendor' %}

11 |
12 |
13 |
15 | 16 |
17 | {{ form.as_p }} 18 | {% csrf_token %} 19 |
20 | 21 |
22 | 23 | {% trans 'Go Back' %} 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/vendor/vendor_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load django_ledger %} 5 | 6 | {% block view_content %} 7 | 8 |
9 | 18 | 19 | {% vendor_table %} 20 | 21 |
22 | 23 | {% endblock %} 24 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/vendor/vendor_update.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load django_ledger %} 4 | 5 | {% block view_content %} 6 |
7 |
8 |
9 |
10 |

{% trans 'Update Vendor' %}

11 |
12 |
13 |
15 | 16 |
17 | {{ form.as_p }} 18 | {% csrf_token %} 19 |
20 | 21 |
22 | 23 | {% trans 'Go Back' %} 25 |
26 |
27 |
28 |
29 | 30 |
31 |
32 | {% endblock %} 33 | -------------------------------------------------------------------------------- /django_ledger/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ -------------------------------------------------------------------------------- /django_ledger/tests/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/tests/__init__.py -------------------------------------------------------------------------------- /django_ledger/tests/bdd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/django_ledger/tests/bdd/__init__.py -------------------------------------------------------------------------------- /django_ledger/tests/bdd/features/README.feature: -------------------------------------------------------------------------------- 1 | Feature: Explaining Behavioral Driven Development Tests 2 | 3 | Scenario Outline: The user wants to know how much is the sum of two numbers 4 | Given that we know what the two numbers are and 5 | When we add both numbers 6 | Then we get back the correct result 7 | Examples: 8 | | n1 | n2 | result | 9 | | 3.4 | 2.5 | 5.9 | 10 | | 7.0 | -4.3 | 2.7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /django_ledger/tests/bdd/features/steps/README.py: -------------------------------------------------------------------------------- 1 | from behave import * 2 | 3 | 4 | def parse_float(value): 5 | return float(value) 6 | 7 | 8 | register_type(FloatNumber=parse_float) 9 | 10 | 11 | @given("that we know what the two numbers are {n1:FloatNumber} and {n2:FloatNumber}") 12 | def step_impl(context, n1: float, n2: float): 13 | context.n1 = n1 14 | context.n2 = n2 15 | 16 | 17 | @when("we add both numbers") 18 | def step_impl(context): 19 | assert isinstance(context.n1, float) 20 | assert isinstance(context.n2, float) 21 | context.result = context.n1 + context.n2 22 | 23 | 24 | @then("we get back the correct result {result:FloatNumber}") 25 | def step_impl(context, result): 26 | assert context.result == result 27 | -------------------------------------------------------------------------------- /django_ledger/tests/test_io.py: -------------------------------------------------------------------------------- 1 | from django_ledger.tests.base import DjangoLedgerBaseTest 2 | 3 | 4 | class IOTest(DjangoLedgerBaseTest): 5 | 6 | def test_this_runs(self): 7 | self.assertEqual(True, True) 8 | -------------------------------------------------------------------------------- /django_ledger/urls/account.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('/list/', 7 | views.AccountModelListView.as_view(), 8 | name='account-list'), 9 | path('/list/active/', 10 | views.AccountModelListView.as_view(active_only=True), 11 | name='account-list-active'), 12 | path('/create/', 13 | views.AccountModelCreateView.as_view(), 14 | name='account-create'), 15 | path('/update//', 16 | views.AccountModelUpdateView.as_view(), 17 | name='account-update'), 18 | path('/detail//', 19 | views.AccountModelDetailView.as_view(), 20 | name='account-detail'), 21 | path('/detail//year//', 22 | views.AccountModelYearDetailView.as_view(), 23 | name='account-detail-year'), 24 | path('/detail//quarter///', 25 | views.AccountModelQuarterDetailView.as_view(), 26 | name='account-detail-quarter'), 27 | path('/detail//month///', 28 | views.AccountModelMonthDetailView.as_view(), 29 | name='account-detail-month'), 30 | path('/detail//date////', 31 | views.AccountModelDateDetailView.as_view(), 32 | name='account-detail-date'), 33 | 34 | # Actions... 35 | path('/action//activate/', 36 | views.AccountModelModelActionView.as_view(action_name='activate'), 37 | name='account-action-activate'), 38 | path('/action//deactivate/', 39 | views.AccountModelModelActionView.as_view(action_name='deactivate'), 40 | name='account-action-deactivate'), 41 | 42 | ] 43 | -------------------------------------------------------------------------------- /django_ledger/urls/auth.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('login/', views.DjangoLedgerLoginView.as_view(), name='login'), 7 | path('logout/', views.DjangoLedgerLogoutView.as_view(), name='logout'), 8 | ] 9 | -------------------------------------------------------------------------------- /django_ledger/urls/bank_account.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('/list/', 7 | views.BankAccountModelListView.as_view(), 8 | name='bank-account-list'), 9 | path('/create/', 10 | views.BankAccountModelCreateView.as_view(), 11 | name='bank-account-create'), 12 | path('/update//', 13 | views.BankAccountModelUpdateView.as_view(), 14 | name='bank-account-update'), 15 | 16 | # Actions... 17 | path('/action//mark-as-active/', 18 | views.BankAccountModelActionMarkAsActiveView.as_view(), 19 | name='bank-account-mark-as-active'), 20 | path('/action//mark-as-inactive/', 21 | views.BankAccountModelActionMarkAsInactiveView.as_view(), 22 | name='bank-account-mark-as-inactive') 23 | ] 24 | -------------------------------------------------------------------------------- /django_ledger/urls/chart_of_accounts.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('//update/', views.ChartOfAccountsUpdateView.as_view(), name='coa-update'), 7 | ] 8 | -------------------------------------------------------------------------------- /django_ledger/urls/closing_entry.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('/latest/', 7 | views.ClosingEntryModelListView.as_view(), 8 | name='closing-entry-list'), 9 | path('/list/year//', 10 | views.ClosingEntryModelYearListView.as_view(), 11 | name='closing-entry-list-year'), 12 | path('/list/month///', 13 | views.ClosingEntryModelMonthListView.as_view(), 14 | name='closing-entry-list-month'), 15 | path('/create/', 16 | views.ClosingEntryModelCreateView.as_view(), 17 | name='closing-entry-create'), 18 | path('/detail//', 19 | views.ClosingEntryModelDetailView.as_view(), 20 | name='closing-entry-detail'), 21 | path('/update//', 22 | views.ClosingEntryModelUpdateView.as_view(), 23 | name='closing-entry-update'), 24 | path('/delete//', 25 | views.ClosingEntryDeleteView.as_view(), 26 | name='closing-entry-delete'), 27 | 28 | # ACTIONS... 29 | path('/action//post/', 30 | views.ClosingEntryModelActionView.as_view(action_name='mark_as_posted'), 31 | name='closing-entry-action-mark-as-posted'), 32 | path('/action//unpost/', 33 | views.ClosingEntryModelActionView.as_view(action_name='mark_as_unposted'), 34 | name='closing-entry-action-mark-as-unposted'), 35 | path('/action//update-txs/', 36 | views.ClosingEntryModelActionView.as_view(action_name='update_transactions'), 37 | name='closing-entry-action-update-txs'), 38 | 39 | ] 40 | -------------------------------------------------------------------------------- /django_ledger/urls/customer.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from django_ledger import views 3 | 4 | urlpatterns = [ 5 | path('/list/', views.CustomerModelListView.as_view(), name='customer-list'), 6 | path('/create/', views.CustomerModelCreateView.as_view(), name='customer-create'), 7 | path('/update//', 8 | views.CustomerModelUpdateView.as_view(), 9 | name='customer-update'), 10 | ] 11 | -------------------------------------------------------------------------------- /django_ledger/urls/data_import.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('/jobs/', 7 | views.ImportJobModelListView.as_view(), 8 | name='data-import-jobs-list'), 9 | path('/jobs//update/', 10 | views.ImportJobModelUpdateView.as_view(), 11 | name='data-import-jobs-update'), 12 | path('/jobs//delete/', 13 | views.ImportJobModelDeleteView.as_view(), 14 | name='data-import-jobs-delete'), 15 | path('/import-ofx/', 16 | views.ImportJobModelCreateView.as_view(), 17 | name='data-import-ofx'), 18 | path('/jobs//txs/', 19 | views.DataImportJobDetailView.as_view(), 20 | name='data-import-job-txs'), 21 | ] 22 | -------------------------------------------------------------------------------- /django_ledger/urls/djl_api.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('entity//data/pnl/', 7 | views.PnLAPIView.as_view(), 8 | name='entity-json-pnl'), 9 | path('entity//data/net-payables/', 10 | views.PayableNetAPIView.as_view(), 11 | name='entity-json-net-payables'), 12 | path('entity//data/net-receivables/', 13 | views.ReceivableNetAPIView.as_view(), 14 | name='entity-json-net-receivables'), 15 | path('unit///data/pnl/', 16 | views.PnLAPIView.as_view(), 17 | name='unit-json-pnl'), 18 | path('unit///data/net-payables/', 19 | views.PayableNetAPIView.as_view(), 20 | name='unit-json-net-payables'), 21 | path('unit///data/net-receivables/', 22 | views.ReceivableNetAPIView.as_view(), 23 | name='unit-json-net-receivables'), 24 | ] 25 | -------------------------------------------------------------------------------- /django_ledger/urls/entity.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | # Entity Views ---- 7 | path('list/', views.EntityModelListView.as_view(), name='entity-list'), 8 | path('create/', views.EntityModelCreateView.as_view(), name='entity-create'), 9 | 10 | # DASHBOARD Views... 11 | path('/dashboard/', 12 | views.EntityModelDetailView.as_view(), 13 | name='entity-dashboard'), 14 | path('/dashboard/year//', 15 | views.FiscalYearEntityModelDashboardView.as_view(), 16 | name='entity-dashboard-year'), 17 | path('/dashboard/quarter///', 18 | views.QuarterlyEntityDashboardView.as_view(), 19 | name='entity-dashboard-quarter'), 20 | path('/dashboard/month///', 21 | views.MonthlyEntityDashboardView.as_view(), 22 | name='entity-dashboard-month'), 23 | path('/dashboard/date////', 24 | views.DateEntityDashboardView.as_view(), 25 | name='entity-dashboard-date'), 26 | 27 | path('/update/', views.EntityModelUpdateView.as_view(), name='entity-update'), 28 | path('/delete/', views.EntityDeleteView.as_view(), name='entity-delete'), 29 | ] 30 | -------------------------------------------------------------------------------- /django_ledger/urls/feedback.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from django_ledger.views.feedback import BugReportView, RequestNewFeatureView 3 | 4 | urlpatterns = [ 5 | path('bug-report/', BugReportView.as_view(), name='bug-report'), 6 | path('new-feature/', RequestNewFeatureView.as_view(), name='new-feature') 7 | ] 8 | -------------------------------------------------------------------------------- /django_ledger/urls/home.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('my-dashboard/', views.DashboardView.as_view(), name='home'), 7 | ] 8 | -------------------------------------------------------------------------------- /django_ledger/urls/inventory.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('/list/', 7 | views.InventoryListView.as_view(), 8 | name='inventory-list'), 9 | path('/recount/', 10 | views.InventoryRecountView.as_view(), 11 | name='inventory-recount'), 12 | ] -------------------------------------------------------------------------------- /django_ledger/urls/transactions.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [] 6 | -------------------------------------------------------------------------------- /django_ledger/urls/unit.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | 3 | from django_ledger import views 4 | 5 | urlpatterns = [ 6 | path('/unit/list/', 7 | views.EntityUnitModelListView.as_view(), 8 | name='unit-list'), 9 | path('/detail//', 10 | views.EntityUnitModelDetailView.as_view(), 11 | name='unit-detail'), 12 | path('/unit/create/', 13 | views.EntityUnitModelCreateView.as_view(), 14 | name='unit-create'), 15 | path('/unit/update//', 16 | views.EntityUnitUpdateView.as_view(), 17 | name='unit-update'), 18 | 19 | 20 | # DASHBOARD Views ... 21 | path('/dashboard//', 22 | views.EntityModelDetailView.as_view(), 23 | name='unit-dashboard'), 24 | path('/dashboard//year//', 25 | views.FiscalYearEntityModelDashboardView.as_view(), 26 | name='unit-dashboard-year'), 27 | path('/dashboard//quarter///', 28 | views.QuarterlyEntityDashboardView.as_view(), 29 | name='unit-dashboard-quarter'), 30 | path('/dashboard//month///', 31 | views.MonthlyEntityDashboardView.as_view(), 32 | name='unit-dashboard-month'), 33 | path('/dashboard//date////', 34 | views.DateEntityDashboardView.as_view(), 35 | name='unit-dashboard-date'), 36 | 37 | ] 38 | -------------------------------------------------------------------------------- /django_ledger/urls/vendor.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | from django_ledger import views 3 | 4 | urlpatterns = [ 5 | path('/list/', views.VendorModelListView.as_view(), name='vendor-list'), 6 | path('/create/', views.VendorModelCreateView.as_view(), name='vendor-create'), 7 | path('/update//', views.VendorModelUpdateView.as_view(), name='vendor-update'), 8 | ] -------------------------------------------------------------------------------- /django_ledger/views/__init__.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | from django_ledger.views.account import * 10 | from django_ledger.views.auth import * 11 | from django_ledger.views.bank_account import * 12 | from django_ledger.views.bill import * 13 | from django_ledger.views.coa import * 14 | from django_ledger.views.customer import * 15 | from django_ledger.views.data_import import * 16 | from django_ledger.views.djl_api import * 17 | from django_ledger.views.entity import * 18 | from django_ledger.views.estimate import * 19 | from django_ledger.views.financial_statement import * 20 | from django_ledger.views.home import * 21 | from django_ledger.views.inventory import * 22 | from django_ledger.views.invoice import * 23 | from django_ledger.views.item import * 24 | from django_ledger.views.journal_entry import * 25 | from django_ledger.views.ledger import * 26 | from django_ledger.views.purchase_order import * 27 | from django_ledger.views.transactions import * 28 | from django_ledger.views.unit import * 29 | from django_ledger.views.vendor import * 30 | from django_ledger.views.closing_entry import * 31 | -------------------------------------------------------------------------------- /django_ledger/views/auth.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | from django.contrib.auth.views import LoginView, LogoutView 10 | from django.urls import reverse, reverse_lazy 11 | from django.utils.translation import gettext_lazy as _ 12 | 13 | from django_ledger.forms.auth import LogInForm 14 | 15 | 16 | class DjangoLedgerLoginView(LoginView): 17 | form_class = LogInForm 18 | template_name = 'django_ledger/auth/login.html' 19 | extra_context = { 20 | 'page_title': _('Login') 21 | } 22 | 23 | def get_success_url(self): 24 | return reverse('django_ledger:home') 25 | 26 | 27 | class DjangoLedgerLogoutView(LogoutView): 28 | next_page = reverse_lazy('django_ledger:login') 29 | -------------------------------------------------------------------------------- /django_ledger/views/coa.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | from django.urls import reverse 10 | from django.utils.translation import gettext_lazy as _ 11 | from django.views.generic import UpdateView 12 | 13 | from django_ledger.forms.coa import ChartOfAccountsModelUpdateForm 14 | from django_ledger.models.coa import ChartOfAccountModel 15 | from django_ledger.views.mixins import DjangoLedgerSecurityMixIn 16 | 17 | 18 | class ChartOfAccountsModelModelViewQuerySetMixIn: 19 | queryset = None 20 | 21 | def get_queryset(self): 22 | if self.queryset is None: 23 | self.queryset = ChartOfAccountModel.objects.for_entity( 24 | entity_slug=self.kwargs['entity_slug'], 25 | user_model=self.request.user, 26 | ).select_related('entity') 27 | return super().get_queryset() 28 | 29 | 30 | class ChartOfAccountsUpdateView(DjangoLedgerSecurityMixIn, ChartOfAccountsModelModelViewQuerySetMixIn, UpdateView): 31 | context_object_name = 'coa' 32 | slug_url_kwarg = 'coa_slug' 33 | template_name = 'django_ledger/code_of_accounts/coa_update.html' 34 | form_class = ChartOfAccountsModelUpdateForm 35 | 36 | def get_context_data(self, **kwargs): 37 | context = super().get_context_data(**kwargs) 38 | context['page_title'] = _('CoA: ') + self.object.name 39 | context['header_title'] = _('CoA: ') + self.object.name 40 | return context 41 | 42 | def get_success_url(self): 43 | entity_slug = self.kwargs.get('entity_slug') 44 | return reverse('django_ledger:entity-dashboard', 45 | kwargs={ 46 | 'entity_slug': entity_slug 47 | }) 48 | -------------------------------------------------------------------------------- /django_ledger/views/home.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | 9 | from django.urls import reverse 10 | from django.utils.translation import gettext as _ 11 | from django.views.generic import RedirectView, ListView 12 | 13 | from django_ledger.models.entity import EntityModel 14 | from django_ledger.views.mixins import DjangoLedgerSecurityMixIn 15 | 16 | 17 | class RootUrlView(RedirectView): 18 | 19 | def get_redirect_url(self, *args, **kwargs): 20 | if not self.request.user.is_authenticated: 21 | return reverse('django_ledger:login') 22 | return reverse('django_ledger:home') 23 | 24 | 25 | class DashboardView(DjangoLedgerSecurityMixIn, ListView): 26 | template_name = 'django_ledger/entity/home.html' 27 | PAGE_TITLE = _('My Dashboard') 28 | context_object_name = 'entities' 29 | extra_context = { 30 | 'page_title': PAGE_TITLE, 31 | 'header_title': PAGE_TITLE, 32 | } 33 | 34 | def get_context_data(self, **kwargs): 35 | context = super().get_context_data(**kwargs) 36 | context['header_subtitle'] = self.request.user.get_full_name() 37 | context['header_subtitle_icon'] = 'ei:user' 38 | return context 39 | 40 | def get_queryset(self): 41 | return EntityModel.objects.for_user( 42 | user_model=self.request.user 43 | ).order_by('-created') 44 | -------------------------------------------------------------------------------- /django_ledger/views/transactions.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django Ledger created by Miguel Sanda . 3 | Copyright© EDMA Group Inc licensed under the GPLv3 Agreement. 4 | 5 | Contributions to this module: 6 | Miguel Sanda 7 | """ 8 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Minimal makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line, and also 5 | # from the environment for the first two. 6 | SPHINXOPTS ?= 7 | SPHINXBUILD ?= sphinx-build 8 | SOURCEDIR = source 9 | BUILDDIR = build 10 | 11 | # Put it first so that "make" without argument is like "make help". 12 | help: 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 14 | 15 | .PHONY: help Makefile 16 | 17 | # Catch-all target: route all unknown targets to Sphinx using the new 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). 19 | %: Makefile 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) 21 | -------------------------------------------------------------------------------- /docs/make.bat: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | 3 | pushd %~dp0 4 | 5 | REM Command file for Sphinx documentation 6 | 7 | if "%SPHINXBUILD%" == "" ( 8 | set SPHINXBUILD=sphinx-build 9 | ) 10 | set SOURCEDIR=source 11 | set BUILDDIR=build 12 | 13 | if "%1" == "" goto help 14 | 15 | %SPHINXBUILD% >NUL 2>NUL 16 | if errorlevel 9009 ( 17 | echo. 18 | echo.The 'sphinx-build' command was not found. Make sure you have Sphinx 19 | echo.installed, then set the SPHINXBUILD environment variable to point 20 | echo.to the full path of the 'sphinx-build' executable. Alternatively you 21 | echo.may add the Sphinx directory to PATH. 22 | echo. 23 | echo.If you don't have Sphinx installed, grab it from 24 | echo.http://sphinx-doc.org/ 25 | exit /b 1 26 | ) 27 | 28 | %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 29 | goto end 30 | 31 | :help 32 | %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% 33 | 34 | :end 35 | popd 36 | -------------------------------------------------------------------------------- /docs/source/assets/img/ModelDependency.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/docs/source/assets/img/ModelDependency.png -------------------------------------------------------------------------------- /docs/source/assets/img/ModelDependencyDetail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/docs/source/assets/img/ModelDependencyDetail.png -------------------------------------------------------------------------------- /docs/source/index.rst: -------------------------------------------------------------------------------- 1 | .. Django Ledger documentation master file, created by 2 | sphinx-quickstart on Mon Jan 6 19:38:59 2020. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | Django Ledger - The Django Book Keeping Engine. 7 | =============================================== 8 | 9 | .. autosummary:: 10 | :toctree: generated 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | :caption: Contents: 15 | 16 | ./README.md 17 | ./quickstart 18 | ./io 19 | ./models 20 | 21 | 22 | 23 | Indices and tables 24 | ================== 25 | 26 | * :ref:`genindex` 27 | * :ref:`modindex` 28 | * :ref:`search` 29 | -------------------------------------------------------------------------------- /docs/source/io.rst: -------------------------------------------------------------------------------- 1 | IO Engine 2 | ========= 3 | 4 | IO MixIn 5 | -------- 6 | .. automodule:: django_ledger.io.io_mixin 7 | :members: -------------------------------------------------------------------------------- /docs/source/ntemplates/django_ledger/purchase_order/po_item_table.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/docs/source/ntemplates/django_ledger/purchase_order/po_item_table.html -------------------------------------------------------------------------------- /docs/source/quickstart.rst: -------------------------------------------------------------------------------- 1 | Quickstart 2 | ========== 3 | 4 | .. toctree:: 5 | ./quickstart_notebook.md -------------------------------------------------------------------------------- /docs/source/requirements.txt: -------------------------------------------------------------------------------- 1 | -i https://pypi.org/simple 2 | asgiref==3.7.2 ; python_version >= '3.7' 3 | django==4.2.6 4 | django-treebeard==4.5.1 5 | faker==8.16.0 6 | markdown==3.3.7 7 | ofxtools==0.9.5 8 | pillow==10.0.1 9 | furo==2022.9.29 10 | python-dateutil==2.8.2 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' 11 | six==1.16.0 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' 12 | sqlparse==0.4.4 ; python_version >= '3.5' 13 | text-unidecode==1.3 14 | tzdata==2022.2 ; sys_platform == 'win32' 15 | myst_parser==1.0.0 -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dev_env.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /screenshots/BalanceSheetStatement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/screenshots/BalanceSheetStatement.png -------------------------------------------------------------------------------- /screenshots/CashFlowStatement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/screenshots/CashFlowStatement.png -------------------------------------------------------------------------------- /screenshots/IncomeStatement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/screenshots/IncomeStatement.png -------------------------------------------------------------------------------- /screenshots/django_ledger_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ProgrammeChef/django/9bbf985e3f542d8f20359ffe64faaca04b79f5cf/screenshots/django_ledger_screenshot.png -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, find_namespace_packages 2 | 3 | PACKAGES = find_namespace_packages(exclude=["dev_env", "docs", "assets", "docs.source", "notebooks"]) 4 | 5 | setup(packages=PACKAGES) 6 | --------------------------------------------------------------------------------