# ERP MODULES MAP – ERPdash

This document explains the main ERP modules, their responsibilities, and how they interact with each other.
AI agents must use this file to understand the full product scope before implementing any module.

---

# 1. Core Module

Core is the foundation of the whole ERP system.

Includes:
- Branches
- Settings
- Number Sequences
- Fiscal Years
- Fiscal Periods
- Users & Permissions

Dependencies:
- All modules depend on Core

---

# 2. Finance Module

Finance is the accounting backbone of the ERP.

Includes:
- Cost Centers
- Chart of Accounts
- Journals
- Journal Entries
- Posting Engine
- Financial Reports

Dependencies:
- Depends on Core
- Sales, Inventory, and HR will later post into Finance

---

# 3. Sales Module

Sales manages customers and revenue operations.

Includes:
- Customers
- Quotations
- Sales Orders
- Invoices
- Collections
- Sales Reports

Dependencies:
- Depends on Core
- Can create financial postings into Finance
- Can reduce stock in Inventory later

---

# 4. Inventory Module

Inventory manages products and stock control.

Includes:
- Warehouses
- Items / Products
- Stock Movements
- Stock Adjustments
- Stock Reports

Dependencies:
- Depends on Core
- Can generate accounting effects in Finance
- Can be connected to Sales and Purchasing later

---

# 5. HR Module

HR manages employees, attendance, and payroll.

Includes:
- Employees
- Attendance
- Leaves
- Payroll
- Payroll Summary

Dependencies:
- Depends on Core
- Payroll can post to Finance later

---

# 6. Reports Module

Reports provide operational and financial visibility.

Includes:
- Trial Balance
- General Ledger
- Income Statement
- Stock Report
- Sales Report
- Aging Report
- Payroll Summary

Dependencies:
- Depends on Finance, Sales, Inventory, and HR

---

# 7. Portal Module

Portal is the external-facing access layer.

Includes:
- Client Portal
- User Portal
- Document viewing
- Invoice tracking
- Payment tracking

Dependencies:
- Depends on Sales and Core

---

# Cross-Module Flow Examples

## Sales → Finance
Sales invoices can create journal entries later.

## Inventory → Finance
Stock adjustments can create journal entries later.

## HR → Finance
Payroll can create journal entries later.

## Core → All Modules
Branches, settings, permissions, fiscal periods, and sequences affect all modules.

---

# Current Recommended Build Order

1. Core
2. Finance Foundation
3. Finance Reports
4. Sales
5. Inventory
6. HR
7. Portal
8. System-wide testing and hardening

