- Documents Module
Unified Financial Document Intelligence & Control Layer
- Conceptual Overview (Why This Module Exists)
The Documents module is the authoritative registry of all financial documents created inside the system.
It does not only display invoices — it connects documents, payments, customers, companies, projects, and compliance logic into a single operational view.
Every document that has financial meaning eventually appears here:
-
Invoices
-
Receipts
-
Tax invoices (GI / IR)
-
Credit invoices
-
Orders (detail, purchase)
If the Payment Tracking module answers “what happened to the money?”,
the Documents module answers “why does this money exist?”
- Role of Documents in the Financial Ecosystem
Customer │ ▼ Document Created │ ├─► Invoice / Order │ ├─► Receipt / Tax Invoice │ ├─► Credit / Adjustment │ ▼ Payment Tracking │ ▼ Accounting Reports
Documents are the legal and logical anchor that:
-
Define payment obligations
-
Control VAT / tax behavior
-
Drive payment expectations
-
Support audits and disputes
- Document Types (Operational Meaning)
Each document type has a distinct accounting role:
-
Invoice → Requests payment
-
Receipt → Confirms payment
-
GI / IR (Tax Invoice) → Legal tax declaration
-
Receipt Tax Invoice → Combined payment + tax
-
Credit Invoice → Reduces liability
-
Orders → Operational intent (pre-financial)
The module does not merge these roles — it keeps them clearly separated, which is essential for compliance.
- Views System – Why “Everything / Moved / Did Not Pass” Exists
The Documents module is context-aware, not static.
- Everything
Shows all documents, regardless of payment state.
Used for:
-
Full audits
-
Legal history
-
Long-term reporting
✅ Moved
Shows documents linked to successful payments.
Used for:
-
Revenue confirmation
-
Accounting exports
-
Tax submissions
❌ Did Not Pass
Shows documents linked to failed or incomplete payments.
Used for:
-
Collection follow-ups
-
Risk analysis
-
Customer support
Each view uses its own column configuration, so users see only what matters in that context.
- Custom Fields Engine (Core Differentiator)
The Documents table is not hard-coded.
Each user can:
-
Choose visible fields
-
Reorder columns
-
Pin important columns
-
Rename column labels
-
Mix static + dynamic fields
Why this matters:
Different roles ask different questions:
-
Accountant → Amounts, tax, company
-
Sales → Customer, manager, tags
-
Operations → Status, folders, notes
The system adapts without duplicating screens.
- Filtering Philosophy (Real Business Use Cases)
Filters are designed around human workflows, not database structure.
-
Date range → Period accounting
-
Amount range → Fraud & exception detection
-
Company → Multi-company organizations
-
Team member → Responsibility tracking
-
Customer status / manager → Sales & CRM alignment
-
Tags → Business classification
-
Shared with → Internal collaboration
This allows the same dataset to serve finance, sales, and management simultaneously.
- Status & Payment Awareness
Documents do not guess payment state — they reflect it.
-
Paid → Green
-
Unpaid → Red
-
Partial → Yellow
These states are directly synced with Payment Tracking and cannot drift.
This guarantees:
-
Accurate cash reports
-
Reliable aging analysis
-
Correct revenue recognition
- Export Logic (Why It’s Safe for Accounting)
Exports are not raw dumps.
They:
-
Respect active filters
-
Respect visible columns
-
Include custom fields
-
Preserve order and labels
-
This ensures exported data can go directly to accountants, without cleanup.
- Data Flow (From Click to Screen)
1️⃣ User opens Documents
2️⃣ System loads:
-
Column config
-
Field order
-
View type
-
3️⃣ Query is dynamically built
4️⃣ Headers are generated
5️⃣ Rows are rendered with:
-
Icons
-
Images
-
Status indicators
-
6️⃣ HTML + pagination returned via API
This makes the module:
-
Fast
-
Flexible
-
Stateless
-
- Security & Compliance Layer
-
User-scoped data isolation
-
Role-based field visibility
-
No silent deletion
-
Full audit trail
-
Every document is legally defensible.
