# alexizher/erpnext_colombia architecture

> Architecture diagram of the GitHub repository alexizher/erpnext_colombia, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alexizher/erpnext_colombia
- Repository: https://github.com/alexizher/erpnext_colombia

## Overview

ERPNext Colombia is a Frappe/ERPNext localization for Colombian accounting and tax-office workflows. Accountants maintain third-party records and obligations, then use third-party ledgers and NIIF statements; office staff configure recurring fees and tax deadlines, which produce invoice drafts, reconciled due dates, reminders, and reports. The graph preserves these distinct product areas and the calculation layers visible in sampled source. README documents several scheduled and UI workflows; where implementation wiring was not sampled, those relationships are marked as unverified or omitted.

Main entry points: [`erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py`](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py) (Third-party records), [`erpnext_colombia/vencimientos/generacion.py`](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/generacion.py) (Deadline reconciliation), [`erpnext_colombia/honorarios/facturacion.py`](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/facturacion.py) (Invoice generation), [`erpnext_colombia/vencimientos/avisos.py`](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/avisos.py) (Reminders and notices)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_localization["Colombian localization"]
  node_company_rules["Company rules<br/>[pais.py]"]
  node_account_setup["PUC setup<br/>[cuentas.py]"]
end

subgraph group_thirdparties["Third parties and accounting"]
  node_third_party["Third-party records<br/>[tercero.py]"]
  node_identity["Tax identity rules<br/>[contribuyente.py]"]
  node_party_links["Customer and supplier links<br/>[partes.py]"]
  node_third_party_books["Third-party ledgers"]
  node_trial_balance["Third-party trial balance"]
  node_ledger_detail["Third-party ledger detail"]
  node_financial_rows["Statement calculations<br/>[filas.py]"]
  node_group2_statements["NIIF group 2 statements<br/>[grupo2.py]"]
  node_group3_statements["NIIF group 3 statements<br/>[grupo3.py]"]
end

subgraph group_fees["Client fees"]
  node_fee_config["Fee configuration"]
  node_fee_periods["Fee periodicity<br/>[periodicidad.py]"]
  node_fee_billing["Invoice generation<br/>[facturacion.py]"]
  node_fee_report["Client fee report"]
end

subgraph group_deadlines["Tax deadlines"]
  node_due_configuration["Deadline configuration"]
  node_tax_dates["Tax calendar dates<br/>[fechas.py]"]
  node_deadline_rules["Deadline rules<br/>[reglas.py]"]
  node_deadline_generation["Deadline reconciliation<br/>[generacion.py]"]
  node_deadline_records["Client deadlines<br/>[vencimiento.py]"]
  node_deadline_alerts["Reminders and notices<br/>[avisos.py]"]
  node_deadline_summary["Weekly summary<br/>[resumen.py]"]
  node_deadline_report["Client deadline report"]
  node_calendar_watch["DIAN calendar watch<br/>[vigilancia.py]"]
end

subgraph group_office["Office navigation"]
  node_office_profile["Office profile navigation<br/>[perfil.py]"]
end

node_accountant(("Accountant"))
node_office_staff(("Office staff"))
node_erpnext["ERPNext"]
node_gl_store[("General ledger")]
node_sales_invoices[("Sales invoices")]
node_todos_email["ToDos and email"]
node_dian["DIAN calendar"]

node_accountant -->|"maintains records"| node_third_party
node_third_party -->|"validates identity"| node_identity
node_third_party -->|"creates linked parties"| node_party_links
node_third_party -.->|"checks country"| node_company_rules
node_accountant -->|"runs report"| node_trial_balance
node_accountant -->|"runs report"| node_ledger_detail
node_trial_balance -->|"queries balances"| node_third_party_books
node_ledger_detail -->|"queries movements"| node_third_party_books
node_third_party_books -->|"reads entries"| node_gl_store
node_accountant -->|"opens statements"| node_group2_statements
node_accountant -->|"opens statements"| node_group3_statements
node_group2_statements -->|"builds rows"| node_financial_rows
node_group3_statements -->|"builds rows"| node_financial_rows
node_accountant -->|"uses PUC"| node_account_setup
node_erpnext -.->|"checks applicability"| node_company_rules
node_office_staff -->|"configures fees"| node_fee_config
node_fee_config -->|"starts billing"| node_fee_billing
node_fee_billing -->|"checks periods"| node_fee_periods
node_fee_billing -->|"creates drafts"| node_sales_invoices
node_office_staff -->|"reviews fees"| node_fee_report
node_office_staff -->|"configures deadlines"| node_due_configuration
node_due_configuration -.->|"sets parameters"| node_deadline_generation
node_deadline_generation -->|"uses rules"| node_deadline_rules
node_deadline_generation -.->|"selects dates"| node_tax_dates
node_deadline_generation -->|"creates and reconciles"| node_deadline_records
node_deadline_records -->|"triggers notices"| node_deadline_alerts
node_deadline_alerts -->|"uses thresholds"| node_deadline_rules
node_office_staff -->|"reviews deadlines"| node_deadline_report
node_calendar_watch -->|"checks changes"| node_dian
node_calendar_watch -->|"prepares summary"| node_deadline_summary
node_deadline_alerts -.->|"notifies staff"| node_todos_email
node_deadline_summary -.->|"emails weekly"| node_todos_email
node_office_staff -->|"sets profile"| node_office_profile

click node_company_rules "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/pais.py"
click node_account_setup "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/cuentas.py"
click node_third_party "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py"
click node_identity "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/contribuyente.py"
click node_party_links "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/partes.py"
click node_third_party_books "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/libros_por_tercero.py"
click node_trial_balance "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/erpnext_colombia/report/balance_de_prueba_por_tercero/balance_de_prueba_por_tercero.py"
click node_ledger_detail "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/erpnext_colombia/report/auxiliar_por_tercero/auxiliar_por_tercero.py"
click node_financial_rows "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/estados_financieros/filas.py"
click node_group2_statements "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/estados_financieros/grupo2.py"
click node_group3_statements "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/estados_financieros/grupo3.py"
click node_fee_config "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/doctype/configuracion_de_honorarios/configuracion_de_honorarios.py"
click node_fee_periods "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/periodicidad.py"
click node_fee_billing "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/facturacion.py"
click node_fee_report "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/report/honorarios_por_cliente/honorarios_por_cliente.py"
click node_due_configuration "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/doctype/configuracion_de_vencimientos/configuracion_de_vencimientos.py"
click node_tax_dates "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/fechas.py"
click node_deadline_rules "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/reglas.py"
click node_deadline_generation "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/generacion.py"
click node_deadline_records "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/doctype/vencimiento/vencimiento.py"
click node_deadline_alerts "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/avisos.py"
click node_deadline_summary "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/resumen.py"
click node_deadline_report "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/report/vencimientos_por_cliente/vencimientos_por_cliente.py"
click node_calendar_watch "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/vigilancia.py"
click node_office_profile "https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/oficina/perfil.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_company_rules,node_account_setup toneBlue
class node_third_party,node_identity,node_party_links,node_third_party_books,node_trial_balance,node_ledger_detail,node_financial_rows,node_group2_statements,node_group3_statements,node_gl_store,node_sales_invoices toneAmber
class node_fee_config,node_fee_periods,node_fee_billing,node_fee_report toneMint
class node_due_configuration,node_tax_dates,node_deadline_rules,node_deadline_generation,node_deadline_records,node_deadline_alerts,node_deadline_summary,node_deadline_report,node_calendar_watch toneRose
class node_office_profile,node_accountant,node_office_staff,node_erpnext,node_todos_email,node_dian toneIndigo
```

## Components

### Colombian localization

- [Company rules](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/pais.py): `erpnext_colombia/pais.py`
- [PUC setup](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/cuentas.py): `erpnext_colombia/cuentas.py`

### Third parties and accounting

- [Third-party records](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py): `erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py`
- [Tax identity rules](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/contribuyente.py): `erpnext_colombia/contribuyente.py`
- [Customer and supplier links](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/partes.py): `erpnext_colombia/partes.py`
- [Third-party ledgers](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/libros_por_tercero.py): `erpnext_colombia/libros_por_tercero.py`
- [Third-party trial balance](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/erpnext_colombia/report/balance_de_prueba_por_tercero/balance_de_prueba_por_tercero.py): `erpnext_colombia/erpnext_colombia/report/balance_de_prueba_por_tercero/balance_de_prueba_por_tercero.py`
- [Third-party ledger detail](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/erpnext_colombia/report/auxiliar_por_tercero/auxiliar_por_tercero.py): `erpnext_colombia/erpnext_colombia/report/auxiliar_por_tercero/auxiliar_por_tercero.py`
- [Statement calculations](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/estados_financieros/filas.py): `erpnext_colombia/estados_financieros/filas.py`
- [NIIF group 2 statements](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/estados_financieros/grupo2.py): `erpnext_colombia/estados_financieros/grupo2.py`
- [NIIF group 3 statements](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/estados_financieros/grupo3.py): `erpnext_colombia/estados_financieros/grupo3.py`

### Client fees

- [Fee configuration](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/doctype/configuracion_de_honorarios/configuracion_de_honorarios.py): `erpnext_colombia/honorarios/doctype/configuracion_de_honorarios/configuracion_de_honorarios.py`
- [Fee periodicity](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/periodicidad.py): `erpnext_colombia/honorarios/periodicidad.py`
- [Invoice generation](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/facturacion.py): `erpnext_colombia/honorarios/facturacion.py`
- [Client fee report](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/honorarios/report/honorarios_por_cliente/honorarios_por_cliente.py): `erpnext_colombia/honorarios/report/honorarios_por_cliente/honorarios_por_cliente.py`

### Tax deadlines

- [Deadline configuration](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/doctype/configuracion_de_vencimientos/configuracion_de_vencimientos.py): `erpnext_colombia/vencimientos/doctype/configuracion_de_vencimientos/configuracion_de_vencimientos.py`
- [Tax calendar dates](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/fechas.py): `erpnext_colombia/vencimientos/fechas.py`
- [Deadline rules](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/reglas.py): `erpnext_colombia/vencimientos/reglas.py`
- [Deadline reconciliation](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/generacion.py): `erpnext_colombia/vencimientos/generacion.py`
- [Client deadlines](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/doctype/vencimiento/vencimiento.py): `erpnext_colombia/vencimientos/doctype/vencimiento/vencimiento.py`
- [Reminders and notices](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/avisos.py): `erpnext_colombia/vencimientos/avisos.py`
- [Weekly summary](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/resumen.py): `erpnext_colombia/vencimientos/resumen.py`
- [Client deadline report](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/report/vencimientos_por_cliente/vencimientos_por_cliente.py): `erpnext_colombia/vencimientos/report/vencimientos_por_cliente/vencimientos_por_cliente.py`
- [DIAN calendar watch](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/vencimientos/vigilancia.py): `erpnext_colombia/vencimientos/vigilancia.py`

### Office navigation

- [Office profile navigation](https://github.com/alexizher/erpnext_colombia/blob/main/erpnext_colombia/oficina/perfil.py): `erpnext_colombia/oficina/perfil.py`

### Other components

- **Accountant**
- **Office staff**
- **ERPNext**
- **General ledger**
- **Sales invoices**
- **ToDos and email**
- **DIAN calendar**

## Connections

- Accountant → Third-party records: maintains records (evidence: `README.md`)
- Third-party records → Tax identity rules: validates identity (evidence: `erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py`)
- Third-party records → Customer and supplier links: creates linked parties (evidence: `erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py`)
- Third-party records → Company rules: checks country (evidence: `erpnext_colombia/erpnext_colombia/doctype/tercero/tercero.py`)
- Accountant → Third-party trial balance: runs report (evidence: `README.md`)
- Accountant → Third-party ledger detail: runs report (evidence: `README.md`)
- Third-party trial balance → Third-party ledgers: queries balances (evidence: `erpnext_colombia/erpnext_colombia/report/balance_de_prueba_por_tercero/balance_de_prueba_por_tercero.py`)
- Third-party ledger detail → Third-party ledgers: queries movements (evidence: `erpnext_colombia/erpnext_colombia/report/auxiliar_por_tercero/auxiliar_por_tercero.py`)
- Third-party ledgers → General ledger: reads entries (evidence: `erpnext_colombia/libros_por_tercero.py`)
- Accountant → NIIF group 2 statements: opens statements (evidence: `README.md`)
- Accountant → NIIF group 3 statements: opens statements (evidence: `README.md`)
- NIIF group 2 statements → Statement calculations: builds rows (evidence: `erpnext_colombia/estados_financieros/grupo2.py`)
- NIIF group 3 statements → Statement calculations: builds rows (evidence: `erpnext_colombia/estados_financieros/grupo3.py`)
- Accountant → PUC setup: uses PUC (evidence: `README.md`)
- ERPNext → Company rules: checks applicability
- Office staff → Fee configuration: configures fees (evidence: `README.md`)
- Fee configuration → Invoice generation: starts billing (evidence: `erpnext_colombia/honorarios/doctype/configuracion_de_honorarios/configuracion_de_honorarios.py`)
- Invoice generation → Fee periodicity: checks periods (evidence: `erpnext_colombia/honorarios/facturacion.py`)
- Invoice generation → Sales invoices: creates drafts (evidence: `erpnext_colombia/honorarios/facturacion.py`)
- Office staff → Client fee report: reviews fees (evidence: `README.md`)
- Office staff → Deadline configuration: configures deadlines (evidence: `README.md`)
- Deadline configuration → Deadline reconciliation: sets parameters
- Deadline reconciliation → Deadline rules: uses rules (evidence: `erpnext_colombia/vencimientos/generacion.py`)
- Deadline reconciliation → Tax calendar dates: selects dates
- Deadline reconciliation → Client deadlines: creates and reconciles (evidence: `erpnext_colombia/vencimientos/generacion.py`)
- Client deadlines → Reminders and notices: triggers notices (evidence: `erpnext_colombia/vencimientos/doctype/vencimiento/vencimiento.py`)
- Reminders and notices → Deadline rules: uses thresholds (evidence: `erpnext_colombia/vencimientos/avisos.py`)
- Office staff → Client deadline report: reviews deadlines (evidence: `README.md`)
- DIAN calendar watch → DIAN calendar: checks changes (evidence: `README.md`)
- DIAN calendar watch → Weekly summary: prepares summary (evidence: `erpnext_colombia/vencimientos/vigilancia.py`)
- Reminders and notices → ToDos and email: notifies staff
- Weekly summary → ToDos and email: emails weekly
- Office staff → Office profile navigation: sets profile (evidence: `README.md`)
