├── .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 ├── Dockerfile ├── LICENSE ├── MANIFEST.in ├── Pipfile ├── Pipfile.lock ├── README.md ├── assets ├── .yarnrc.yml ├── package.json ├── pnpm-lock.yaml ├── src │ ├── AppCharts.ts │ ├── DjangoLedgerApp.ts │ ├── djl_styles.less │ ├── djl_styles.scss │ ├── 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 │ ├── __init__.py │ ├── chart_of_accounts.py │ ├── entity.py │ └── ledger.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 │ ├── chart_of_accounts.py │ ├── closing_entry.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 │ ├── io_context.py │ ├── io_core.py │ ├── io_generator.py │ ├── io_library.py │ ├── io_middleware.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 │ ├── 0014_ledgermodel_ledger_xid_and_more.py │ ├── 0015_remove_chartofaccountmodel_locked_and_more.py │ ├── 0016_remove_accountmodel_django_ledg_coa_mod_e19964_idx_and_more.py │ ├── 0017_alter_accountmodel_unique_together_and_more.py │ ├── 0018_transactionmodel_cleared_transactionmodel_reconciled_and_more.py │ ├── 0019_alter_transactionmodel_amount_and_more.py │ ├── 0020_remove_bankaccountmodel_django_ledg_cash_ac_59a8af_idx_and_more.py │ ├── 0021_alter_bankaccountmodel_account_model_and_more.py │ └── __init__.py ├── models │ ├── __init__.py │ ├── accounts.py │ ├── bank_account.py │ ├── bill.py │ ├── chart_of_accounts.py │ ├── closing_entry.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 │ ├── signals.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 │ │ └── logo_2 │ │ ├── django_ledger_logo_dark.png │ │ ├── django_ledger_logo_dark@0.5x.png │ │ ├── django_ledger_logo_dark@2x.png │ │ ├── django_ledger_logo_dark@3x.png │ │ ├── djl-full-vert.png │ │ ├── djl-full-vert@0.5x.png │ │ ├── djl-full-vert@2x.png │ │ ├── djl-full-vert@3x.png │ │ ├── djl-logo-full-horiz.png │ │ ├── djl-logo-full-horiz@0.5x.png │ │ ├── djl-logo-full-horiz@2x.png │ │ ├── djl-logo-full-horiz@3x.png │ │ ├── djl-logo-full-vert.png │ │ ├── djl-logo-full-vert@0.5x.png │ │ ├── djl-logo-full-vert@2x.png │ │ ├── djl-logo-full-vert@3x.png │ │ ├── djl-logo.png │ │ ├── djl-logo@0.5x.png │ │ ├── djl-logo@2x.png │ │ ├── djl-logo@3x.png │ │ ├── djl-txt-full-horiz.png │ │ ├── djl-txt-full-horiz@0.5x.png │ │ ├── djl-txt-full-horiz@2x.png │ │ ├── djl-txt-full-horiz@3x.png │ │ ├── djl-txt-full-vert.png │ │ ├── djl-txt-full-vert@0.5x.png │ │ ├── djl-txt-full-vert@2x.png │ │ ├── djl-txt-full-vert@3x.png │ │ ├── djl-txt-horiz.png │ │ ├── djl-txt-horiz@0.5x.png │ │ ├── djl-txt-horiz@2x.png │ │ └── djl-txt-horiz@3x.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 │ │ ├── chart_of_accounts │ │ ├── coa_create.html │ │ ├── coa_list.html │ │ ├── coa_update.html │ │ └── includes │ │ │ └── coa_card.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 │ │ ├── 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 │ │ ├── transactions │ │ └── tags │ │ │ └── txs_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_accounts.py │ ├── test_auth.py │ ├── test_bill.py │ ├── test_chart_of_accounts.py │ ├── test_closing_entry.py │ ├── test_entity.py │ ├── test_io.py │ ├── test_io_ofx │ │ ├── __init__.py │ │ ├── samples │ │ │ ├── v1_with_intu_bid.ofx │ │ │ ├── v1_with_open_tags.ofx │ │ │ └── v2_good.ofx │ │ └── tests.py │ ├── test_purchase_order.py │ └── test_transactions.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 │ ├── 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 │ ├── mixins.py │ ├── purchase_order.py │ ├── transactions.py │ ├── unit.py │ └── vendor.py ├── docker-compose.yml ├── 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 ├── entrypoint.sh ├── manage.py ├── notebooks ├── DjangoCon2024.ipynb └── 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-24.04 4 | tools: 5 | python: "3.13" 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 11 | * Miguel Sanda [@elarroba](https://github.com/elarroba) 12 | 13 | ### Contributors 14 | * Michael Noel [@mnooel](https://github.com/mnooel) 15 | * Eric Owuor [@Ericpaul](https://github.com/25-do) 16 | * Pranav P Tulshyan 17 | 18 | ### Accountants, CPAs & Bookkeepers 19 | * Miguel Sanda [@elarroba](https://github.com/elarroba) 20 | * Albert Salazar [@Beachwood619](https://github.com/Beachwood619) 21 | * Michael Noel, CPA [@mnooel](https://github.com/mnooel) 22 | 23 | ### Documentation Contributors 24 | * Miguel Sanda [@elarroba](https://github.com/elarroba) -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:latest 2 | 3 | ENV PYTHONDONTWRITEBYTECODE 1 4 | ENV PYTHONUNBUFFERED 1 5 | 6 | WORKDIR /app 7 | 8 | RUN apt-get update 9 | 10 | RUN pip3 install --upgrade pip 11 | 12 | RUN pip3 install -U pipenv 13 | 14 | COPY . /app/ 15 | 16 | RUN pipenv install 17 | 18 | EXPOSE 8000 19 | 20 | ENTRYPOINT ["./entrypoint.sh"] -------------------------------------------------------------------------------- /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 = ">=4.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 | sphinx = "*" 25 | myst_parser = "*" 26 | behave = "*" 27 | twine = "*" 28 | jupyterlab = "*" 29 | pandas = "*" 30 | numpy = "*" 31 | renku-sphinx-theme = "*" 32 | django-debug-toolbar = "*" 33 | 34 | [requires] 35 | python_version = "3.13" 36 | 37 | [scripts] 38 | publish-package-test = "twine upload --repository testpypi -u __token__ -p ${DJL_PYPI_TEST_TOKEN} dist/*" 39 | publish-package = "twine upload -u __token__ -p ${DJL_PYPI_TOKEN} dist/*" 40 | 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" 41 | 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" 42 | -------------------------------------------------------------------------------- /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 | "@types/lodash": "^4.17.16", 4 | "@vue/compiler-sfc": "^3.5.13", 5 | "animate.css": "^4.1.1", 6 | "axios": "^1.9.0", 7 | "bulma": "^1.0.4", 8 | "chart.js": "^4.4.9", 9 | "iconify-icon": "^2.3.0", 10 | "json-schema": "^0.4.0", 11 | "pikaday": "^1.8.2", 12 | "scss-tokenizer": "^0.4.3", 13 | "trim-newlines": "^4.1.1", 14 | "vue": "^3.5.13", 15 | "vue-loader": "^17.4.2" 16 | }, 17 | "devDependencies": { 18 | "css-loader": "^7.1.2", 19 | "file-loader": "^6.2.0", 20 | "less": "^4.3.0", 21 | "less-loader": "^12.3.0", 22 | "sass": "^1.88.0", 23 | "sass-loader": "^13.3.3", 24 | "style-loader": "^4.0.0", 25 | "ts-loader": "^9.5.2", 26 | "typescript": "^5.8.3", 27 | "url-loader": "^4.1.1", 28 | "webpack": "^5.99.8", 29 | "webpack-cli": "^6.0.1" 30 | }, 31 | "scripts": { 32 | "build": "webpack", 33 | "watch": "webpack --watch" 34 | }, 35 | "main": "../django_ledger/static/django_ledger/bundle/djetler.bundle.js", 36 | "packageManager": "pnpm@10.8.0+sha512.0e82714d1b5b43c74610193cb20734897c1d00de89d0e18420aebc5977fa13d780a9cb05734624e81ebd81cc876cd464794850641c48b9544326b5622ca29971" 37 | } 38 | -------------------------------------------------------------------------------- /assets/src/djl_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/djl_styles.scss: -------------------------------------------------------------------------------- 1 | @import "../node_modules/bulma/bulma"; 2 | @import "../node_modules/pikaday/css/pikaday.css"; 3 | 4 | .icon { 5 | margin: 5px; 6 | } -------------------------------------------------------------------------------- /assets/src/styles.js: -------------------------------------------------------------------------------- 1 | import './djl_styles.scss' 2 | import './djl_styles.less' 3 | import 'animate.css/animate.min.css' -------------------------------------------------------------------------------- /dev_env/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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 | 6 | default_app_config = 'django_ledger.apps.DjangoLedgerConfig' 7 | 8 | """Django Ledger""" 9 | __version__ = '0.7.7' 10 | __license__ = 'GPLv3 License' 11 | 12 | __author__ = 'Miguel Sanda' 13 | __email__ = 'msanda@arrobalytics.com' 14 | 15 | __url__ = 'https://www.djangoledger.com' 16 | -------------------------------------------------------------------------------- /django_ledger/admin/__init__.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | 3 | from django_ledger.admin.chart_of_accounts import ChartOfAccountsModelAdmin 4 | from django_ledger.admin.entity import EntityModelAdmin 5 | from django_ledger.admin.ledger import LedgerModelAdmin 6 | from django_ledger.models import EntityModel, ChartOfAccountModel, LedgerModel 7 | 8 | admin.site.register(EntityModel, EntityModelAdmin) 9 | admin.site.register(ChartOfAccountModel, ChartOfAccountsModelAdmin) 10 | admin.site.register(LedgerModel, LedgerModelAdmin) 11 | -------------------------------------------------------------------------------- /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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/contrib/__init__.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/README.md: -------------------------------------------------------------------------------- 1 | 2 | # Django ledger Graphql Api 3 | 4 | ## Usage and installation 5 | Install Required Packages 6 | 7 | First, install the necessary packages: 8 | ``` 9 | pip install graphene-django 10 | ``` 11 | ``` 12 | pip install django-oauth-toolkit 13 | ``` 14 | Enable Graphql by navigating to ./django_ledger/settings.py 15 | ``` 16 | DJANGO_LEDGER_GRAPHQL_SUPPORT_ENABLED = True 17 | ``` 18 | Makemigrations 19 | ``` 20 | python manage.py makemigrations 21 | python manage.py migrate 22 | ``` 23 | Start the Django development server: 24 | ``` 25 | python manage.py runserver 26 | ``` 27 | on the admin site ensure to add an Application with the fields 28 | ``` 29 | client type: confidential 30 | Authorization grant type: Resource owner password-based 31 | ``` 32 | 33 | Use Postman or Thunder Client to make a POST request to obtain an access token. Send a request to the following URL: 34 | 35 | ``` 36 | 37 | http://127.0.0.1:8000/api/v1/o/token/ 38 | ``` 39 | Include the following JSON body in your request: 40 | ``` 41 | { 42 | "username": "eric", 43 | "password": "eric", 44 | "client_id": "cXFFgnvWhWiZDofGkwiwUBdfuxfNnLsmBtAVsVXv", 45 | "client_secret": "dave101", 46 | "grant_type": "password" 47 | } 48 | ``` 49 | If the request is successful, you will receive a response like this: 50 | ``` 51 | { 52 | "access_token": "YPMh29n648qpahgtOjrDHMDy5bt81e", 53 | "expires_in": 36000, 54 | "token_type": "Bearer", 55 | "scope": "read write", 56 | "refresh_token": "huBiNKw9IhtuYPKVNR9i4WnQesMqEl" 57 | } 58 | ``` 59 | Now you can use the access token to authenticate your GraphQL requests. 60 | 61 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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_model=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('account_model') 32 | else: 33 | return BankAccountModel.objects.none() 34 | 35 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/bill/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/contrib/django_ledger_graphene/customers/__init__.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/data_import/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/contrib/django_ledger_graphene/data_import/mutations.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/data_import/schema.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/contrib/django_ledger_graphene/data_import/schema.py -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/entity/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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_entity( 31 | entity_slug=slug_name, 32 | user_model=info.context.user 33 | ).for_ledger(ledger_pk=pk_ledger).order_by(sort) 34 | else: 35 | return JournalEntryModel.objects.none() 36 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/ledger/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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 | 21 | 22 | class TransactionsQuery(graphene.ObjectType): 23 | all_transactions = DjangoFilterConnectionField( 24 | TransactionNode, 25 | slug_name=graphene.String(required=True), 26 | pk_je=graphene.UUID(), 27 | pk_ledger=graphene.UUID()) 28 | 29 | def resolve_all_transactions(self, info, slug_name, pk_je, pk_ledger, **kwargs): 30 | if info.context.user.is_authenticated: 31 | return TransactionModel.objects.for_entity( 32 | entity_slug=slug_name, 33 | user_model=info.context.user, 34 | ).for_journal_entry(je_model=pk_je).order_by('account__code') 35 | else: 36 | return TransactionModel.objects.none() 37 | -------------------------------------------------------------------------------- /django_ledger/contrib/django_ledger_graphene/unit/mutations.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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.utils.translation import gettext_lazy as _ 3 | 4 | from django_ledger.io.io_core import get_localdate 5 | from django_ledger.models.closing_entry import ClosingEntryModel 6 | from django_ledger.settings import DJANGO_LEDGER_FORM_INPUT_CLASSES 7 | 8 | 9 | class ClosingEntryCreateForm(ModelForm): 10 | 11 | def clean_closing_date(self): 12 | closing_date = self.cleaned_data['closing_date'] 13 | if closing_date > get_localdate(): 14 | raise ValidationError( 15 | message=_('Cannot create a closing entry with a future date.'), code='invalid_date' 16 | ) 17 | return closing_date 18 | 19 | class Meta: 20 | model = ClosingEntryModel 21 | fields = [ 22 | 'closing_date' 23 | ] 24 | 25 | widgets = { 26 | 'closing_date': DateInput(attrs={ 27 | 'class': DJANGO_LEDGER_FORM_INPUT_CLASSES + ' is-large', 28 | 'placeholder': _('Closing Date (YYYY-MM-DD)...'), 29 | 'id': 'djl-datepicker', 30 | 'type': 'date' 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/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_context import * 10 | from django_ledger.io.io_middleware import * 11 | from django_ledger.io.ratios import * 12 | from django_ledger.io.roles import * 13 | -------------------------------------------------------------------------------- /django_ledger/management/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/management/__init__.py -------------------------------------------------------------------------------- /django_ledger/management/commands/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/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/0014_ledgermodel_ledger_xid_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.6 on 2024-01-15 13:11 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0013_stagedtransactionmodel_bundle_split'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AddField( 14 | model_name='ledgermodel', 15 | name='ledger_xid', 16 | field=models.SlugField(allow_unicode=True, blank=True, help_text='User Defined Ledger ID', max_length=150, null=True, verbose_name='Ledger Slug'), 17 | ), 18 | migrations.AlterUniqueTogether( 19 | name='ledgermodel', 20 | unique_together={('entity', 'ledger_xid')}, 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /django_ledger/migrations/0015_remove_chartofaccountmodel_locked_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.0.3 on 2024-03-14 02:17 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | dependencies = [ 9 | ('django_ledger', '0014_ledgermodel_ledger_xid_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.RemoveField( 14 | model_name='chartofaccountmodel', 15 | name='locked', 16 | ), 17 | migrations.AddField( 18 | model_name='chartofaccountmodel', 19 | name='active', 20 | field=models.BooleanField(default=True, verbose_name='Is Active'), 21 | ), 22 | ] 23 | -------------------------------------------------------------------------------- /django_ledger/migrations/0017_alter_accountmodel_unique_together_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.1 on 2024-10-09 19:40 2 | 3 | import django.db.models.deletion 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('django_ledger', '0016_remove_accountmodel_django_ledg_coa_mod_e19964_idx_and_more'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterUniqueTogether( 15 | name='accountmodel', 16 | unique_together=set(), 17 | ), 18 | migrations.AlterField( 19 | model_name='accountmodel', 20 | name='coa_model', 21 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_ledger.chartofaccountmodel', verbose_name='Chart of Accounts'), 22 | ), 23 | migrations.AddConstraint( 24 | model_name='accountmodel', 25 | constraint=models.UniqueConstraint(fields=('coa_model', 'code'), name='unique_code_for_coa_model', violation_error_message='Account codes must be unique for each Chart of Accounts Model.'), 26 | ), 27 | migrations.AddConstraint( 28 | model_name='accountmodel', 29 | constraint=models.UniqueConstraint(fields=('coa_model', 'role', 'role_default'), name='only_one_account_assigned_as_default_for_role', violation_error_message='Only one default account for role permitted.'), 30 | ), 31 | ] 32 | -------------------------------------------------------------------------------- /django_ledger/migrations/0018_transactionmodel_cleared_transactionmodel_reconciled_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.2 on 2024-11-20 22:26 2 | 3 | import django.db.models.deletion 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('django_ledger', '0017_alter_accountmodel_unique_together_and_more'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AddField( 15 | model_name='transactionmodel', 16 | name='cleared', 17 | field=models.BooleanField(default=False, verbose_name='Cleared'), 18 | ), 19 | migrations.AddField( 20 | model_name='transactionmodel', 21 | name='reconciled', 22 | field=models.BooleanField(default=False, verbose_name='Reconciled'), 23 | ), 24 | migrations.AlterField( 25 | model_name='chartofaccountmodel', 26 | name='entity', 27 | field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_ledger.entitymodel', verbose_name='Entity'), 28 | ), 29 | migrations.AddIndex( 30 | model_name='transactionmodel', 31 | index=models.Index(fields=['cleared'], name='django_ledg_cleared_335c0b_idx'), 32 | ), 33 | migrations.AddIndex( 34 | model_name='transactionmodel', 35 | index=models.Index(fields=['reconciled'], name='django_ledg_reconci_75dbc7_idx'), 36 | ), 37 | ] 38 | -------------------------------------------------------------------------------- /django_ledger/migrations/0019_alter_transactionmodel_amount_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.5 on 2025-01-17 00:11 2 | 3 | import django.core.validators 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ('django_ledger', '0018_transactionmodel_cleared_transactionmodel_reconciled_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='transactionmodel', 15 | name='amount', 16 | field=models.DecimalField(decimal_places=2, default=0.0, help_text='Amount of the transaction.', 17 | max_digits=20, validators=[django.core.validators.MinValueValidator(0)], 18 | verbose_name='Amount'), 19 | ), 20 | migrations.AlterField( 21 | model_name='transactionmodel', 22 | name='description', 23 | field=models.CharField(blank=True, 24 | help_text='A description to be included with this individual transaction.', 25 | max_length=100, null=True, verbose_name='Transaction Description'), 26 | ), 27 | migrations.AlterField( 28 | model_name='transactionmodel', 29 | name='tx_type', 30 | field=models.CharField(choices=[('credit', 'Credit'), ('debit', 'Debit')], max_length=10, 31 | verbose_name='Transaction Type'), 32 | ), 33 | ] 34 | -------------------------------------------------------------------------------- /django_ledger/migrations/0021_alter_bankaccountmodel_account_model_and_more.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 5.1.6 on 2025-02-18 22:47 2 | 3 | import django.db.models.deletion 4 | from django.db import migrations, models 5 | 6 | 7 | class Migration(migrations.Migration): 8 | dependencies = [ 9 | ('django_ledger', '0020_remove_bankaccountmodel_django_ledg_cash_ac_59a8af_idx_and_more'), 10 | ] 11 | 12 | operations = [ 13 | migrations.AlterField( 14 | model_name='bankaccountmodel', 15 | name='account_model', 16 | field=models.ForeignKey( 17 | help_text='Account model be used to map transactions from financial institution', 18 | on_delete=django.db.models.deletion.RESTRICT, 19 | to='django_ledger.AccountModel', 20 | verbose_name='Associated Account Model' 21 | ), 22 | ), 23 | migrations.AlterField( 24 | model_name='importjobmodel', 25 | name='bank_account_model', 26 | field=models.ForeignKey( 27 | on_delete=django.db.models.deletion.CASCADE, 28 | to='django_ledger.BankAccountModel', 29 | verbose_name='Associated Bank Account Model' 30 | ), 31 | ), 32 | ] 33 | -------------------------------------------------------------------------------- /django_ledger/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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.chart_of_accounts 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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/report/__init__.py -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/img/daniel-weiss-aj2Os9mYgJU-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo/django-ledger-text@4x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo/favicon.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/django_ledger_logo_dark@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-full-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-full-vert.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-full-vert@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-full-vert@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-full-vert@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-full-vert@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-full-vert@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-full-vert@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-horiz@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-vert.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo-full-vert@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-logo@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-horiz@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-vert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-vert.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-full-vert@3x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-horiz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-horiz.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-horiz@0.5x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-horiz@0.5x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-horiz@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-horiz@2x.png -------------------------------------------------------------------------------- /django_ledger/static/django_ledger/logo_2/djl-txt-horiz@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/static/django_ledger/logo_2/djl-txt-horiz@3x.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 |

{% trans 'Create Account' %}

11 |

{{ coa_model.name }}

12 |

({{ coa_model.slug }})

13 |
14 |
15 |
16 |
17 | {% csrf_token %} 18 | {{ form.as_p }} 19 | 20 | Back 22 |
23 |
24 |
25 |
26 |
27 | {% 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 |
9 |
10 |

{% trans 'CoA Account List' %}

11 |

{{ coa_model.name }}

12 |

({{ coa_model.slug }})

13 |
14 |
15 | {% accounts_table accounts %} 16 |
17 | 23 |
24 |
25 | {% endblock %} 26 | -------------------------------------------------------------------------------- /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 |

{{ coa_model.name }}

11 |

({{ coa_model.slug }})

12 |

{{ account }}

13 |
14 |
15 |
16 |
17 | {% csrf_token %} 18 | {{ form.as_p }} 19 | 20 | Back 22 |
23 |
24 |
25 |
26 |
27 | {% endblock %} -------------------------------------------------------------------------------- /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 | 11 |
12 |
{% trans 'Create Bank Account' %}
13 |
14 | 15 | 16 |
17 |
19 | {% csrf_token %} 20 | {{ form }} 21 | 24 | {% trans 'Back' %} 26 |
27 |
28 | 29 |
30 |
31 |
32 | {% endblock %} 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /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_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/chart_of_accounts/coa_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 |

{% trans 'Create Chart of Accounts' %}

11 |
12 |
13 |
14 |
15 | {% csrf_token %} 16 | {{ form.as_p }} 17 | 18 | Back 20 |
21 |
22 |
23 |
24 |
25 | {% endblock %} -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/chart_of_accounts/coa_list.html: -------------------------------------------------------------------------------- 1 | {% extends 'django_ledger/layouts/content_layout_1.html' %} 2 | {% load i18n %} 3 | {% load static %} 4 | {% load icon from django_ledger %} 5 | 6 | {% block view_content %} 7 |
8 |
9 |
10 |
11 |

Chart of Accounts 12 | 13 | {% icon 'carbon:add-alt' 60 %} 14 |

15 | {% if not inactive %} 16 | 17 | {% trans 'Show Inactive' %} 18 | {% else %} 19 | 20 | {% trans 'Show Active' %} 21 | {% endif %} 22 | 23 |
24 |
25 |
26 | {% for coa_model in coa_list %} 27 |
28 | {% include 'django_ledger/chart_of_accounts/includes/coa_card.html' with coa_model=coa_model %} 29 |
30 | {% endfor %} 31 |
32 |
33 |
34 | {% endblock %} 35 | 36 | 37 | -------------------------------------------------------------------------------- /django_ledger/templates/django_ledger/chart_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 %} -------------------------------------------------------------------------------- /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_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/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 import_job %} 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/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/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_sign | 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 |
14 | {% csrf_token %} 15 | {{ form.as_p }} 16 | 18 | Back 20 |
21 |
22 |
23 |
24 | {% endblock %} 25 | -------------------------------------------------------------------------------- /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 |
10 | {% csrf_token %} 11 |
12 |
13 |

{{ je_model.get_delete_message }}

14 |
15 |
16 | {% trans 'Go Back' %} 18 | 19 |
20 |
21 |
22 |
23 |
24 | 25 | 26 | {% endblock %} 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /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 |
10 | {% csrf_token %} 11 | {{ form.as_p }} 12 | 14 | Back 16 |
17 |
18 |
19 |
20 | {% 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_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_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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/tests/__init__.py -------------------------------------------------------------------------------- /django_ledger/tests/bdd/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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_ofx/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/django_ledger/tests/test_io_ofx/__init__.py -------------------------------------------------------------------------------- /django_ledger/tests/test_io_ofx/samples/v1_with_open_tags.ofx: -------------------------------------------------------------------------------- 1 | OFXHEADER:100 2 | DATA:OFXSGML 3 | VERSION:102 4 | SECURITY:NONE 5 | ENCODING:USASCII 6 | CHARSET:1252 7 | COMPRESSION:NONE 8 | OLDFILEUID:NONE 9 | NEWFILEUID:NONE 10 | 11 | 12 | 13 | 14 | 15 | 0 16 | INFO 17 | 18 | 20211015063225[-5:EST] 19 | ENG 20 | 21 | 22 | 23 | 24 | 25 | 1 26 | 27 | 0 28 | INFO 29 | 30 | 31 | GBP 32 | 33 | 492900 34 | 11223312345678 35 | CHECKING 36 | 37 | 38 | 20210925063225[-5:EST] 39 | 20211015063225[-5:EST] 40 | 41 | 42 | PAYMENT 43 | 20211013000000[-5:EST] 44 | -17.28 45 | +202110130000001 46 | 47 | WWW.JUST-EAT.CO.UK ON 12 OCT BCC 48 | 49 | 50 | 51 | PAYMENT 52 | 20211012000000[-5:EST] 53 | -15.55 54 | +202110120000002 55 | 56 | AMZNMktplace ON 11 OCT BCC 57 | 58 | 59 | 60 | 61 | 1868.27 62 | 20211013000000[-5:EST] 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /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('/list/', 7 | views.ChartOfAccountModelListView.as_view(), 8 | name='coa-list'), 9 | path('/list/inactive/', 10 | views.ChartOfAccountModelListView.as_view(inactive=True), 11 | name='coa-list-inactive'), 12 | path('/create/', 13 | views.ChartOfAccountModelCreateView.as_view(), 14 | name='coa-create'), 15 | path('/detail//', 16 | views.ChartOfAccountModelListView.as_view(), 17 | name='coa-detail'), 18 | path('/update//', 19 | views.ChartOfAccountModelUpdateView.as_view(), 20 | name='coa-update'), 21 | 22 | # ACTIONS.... 23 | path('/action//mark-as-default/', 24 | views.CharOfAccountModelActionView.as_view(action_name='mark_as_default'), 25 | name='coa-action-mark-as-default'), 26 | path('/action//mark-as-active/', 27 | views.CharOfAccountModelActionView.as_view(action_name='mark_as_active'), 28 | name='coa-action-mark-as-active'), 29 | path('/action//mark-as-inactive/', 30 | views.CharOfAccountModelActionView.as_view(action_name='mark_as_inactive'), 31 | name='coa-action-mark-as-inactive'), 32 | 33 | ] 34 | -------------------------------------------------------------------------------- /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.EntityModelDetailHandlerView.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.EntityModelDetailHandlerView.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.chart_of_accounts 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/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 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | web: 3 | build: 4 | context: . 5 | dockerfile: Dockerfile 6 | ports: 7 | - "8000:8000" 8 | volumes: 9 | - .:/app -------------------------------------------------------------------------------- /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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/docs/source/assets/img/ModelDependency.png -------------------------------------------------------------------------------- /docs/source/assets/img/ModelDependencyDetail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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 | Created and developed by `Miguel Sanda `_. 10 | 11 | .. autosummary:: 12 | :toctree: generated 13 | 14 | .. toctree:: 15 | :maxdepth: 3 16 | :caption: Contents: 17 | 18 | ./../../README.md 19 | ./quickstart 20 | ./io 21 | ./models 22 | 23 | 24 | 25 | Indices and tables 26 | ================== 27 | 28 | * :ref:`genindex` 29 | * :ref:`modindex` 30 | * :ref:`search` 31 | -------------------------------------------------------------------------------- /docs/source/io.rst: -------------------------------------------------------------------------------- 1 | IO Engine 2 | ========= 3 | 4 | 5 | IO Middleware 6 | ------------- 7 | .. automodule:: django_ledger.io.io_middleware 8 | :members: 9 | 10 | IO Context 11 | ---------- 12 | .. automodule:: django_ledger.io.io_context 13 | :members: 14 | 15 | IO Library 16 | ---------- 17 | .. automodule:: django_ledger.io.io_library 18 | :members: 19 | 20 | IO Core 21 | --------- 22 | .. automodule:: django_ledger.io.io_core 23 | :members: 24 | 25 | Account Roles 26 | ------------- 27 | .. automodule:: django_ledger.io.roles 28 | :members: 29 | 30 | Financial Ratios 31 | ---------------- 32 | .. automodule:: django_ledger.io.ratios 33 | :members: 34 | 35 | Random Data Generation 36 | ---------------------- 37 | .. automodule:: django_ledger.io.io_generator 38 | :members: 39 | -------------------------------------------------------------------------------- /docs/source/ntemplates/django_ledger/purchase_order/po_item_table.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/docs/source/ntemplates/django_ledger/purchase_order/po_item_table.html -------------------------------------------------------------------------------- /docs/source/quickstart.rst: -------------------------------------------------------------------------------- 1 | API Quickstart 2 | ============== 3 | 4 | .. toctree:: 5 | ./quickstart_notebook.md -------------------------------------------------------------------------------- /docs/source/requirements.txt: -------------------------------------------------------------------------------- 1 | -i https://pypi.org/simple 2 | asgiref==3.8.1; python_version >= '3.8' 3 | django==4.2.19; python_version >= '3.10' 4 | django-treebeard==4.7.1; python_version >= '3.8' 5 | faker==36.1.0; python_version >= '3.9' 6 | markdown==3.7; python_version >= '3.8' 7 | ofxtools==0.9.5; python_version >= '3.8' 8 | pillow==11.1.0; python_version >= '3.9' 9 | sqlparse==0.5.3; python_version >= '3.8' 10 | tzdata==2025.1; python_version >= '2' 11 | renku-sphinx-theme>=0.5.0 12 | myst_parser==4.0.1 -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo "Going to run migrations" 4 | pipenv run python manage.py migrate 5 | 6 | echo "Going to run django server" 7 | pipenv run python manage.py runserver 0.0.0.0:8000 -------------------------------------------------------------------------------- /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/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/screenshots/BalanceSheetStatement.png -------------------------------------------------------------------------------- /screenshots/CashFlowStatement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/screenshots/CashFlowStatement.png -------------------------------------------------------------------------------- /screenshots/IncomeStatement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/screenshots/IncomeStatement.png -------------------------------------------------------------------------------- /screenshots/django_ledger_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/arrobalytics/django-ledger/19a0e8ae6c03b37668943b624f13747b12ae2a2d/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 | --------------------------------------------------------------------------------