Introducing a new way to review your PRs.

Read the announcement

frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)

View on GitHub

20 documents · Updated Nov 23, 2026

overview

Knowledge Base updated: 2026-11-22

ERPNext knowledge base

ERPNext is a Frappe application for operational ERP workflows: selling, buying, inventory, manufacturing, projects, CRM, and accounting.

Its main domain logic lives under erpnext/<module>/doctype/, with document controllers coordinating validation, lifecycle state, stock effects, and accounting effects. Shared services and reports supplement those document workflows.

Critical business state is persisted in Frappe DocTypes, especially transactional documents, Stock Ledger Entries, General Ledger Entries, and linked child rows. Client-side form scripts complement—not replace—server-side validation and posting.

System map

flowchart TD
    UI[Frappe Desk and Web UI] --> DOC[ERPNext DocTypes]
    DOC --> SELL[Selling]
    DOC --> BUY[Buying]
    DOC --> STOCK[Stock]
    DOC --> MFG[Manufacturing]
    DOC --> SUB[Subcontracting]
    DOC --> PROJECTS[Projects and Support]
    DOC --> CRM[CRM]
    SELL --> ACC[Accounts]
    BUY --> STOCK
    BUY --> ACC
    STOCK --> ACC
    MFG --> STOCK
    SUB --> STOCK
    DOC --> DB[(Frappe database)]
    ACC --> GL[General Ledger]
    STOCK --> SLE[Stock Ledger]
flowchart LR
    SO[Sales Order] --> DN[Delivery Note]
    DN --> SI[Sales Invoice]
    SI --> PE[Payment Entry]
    SO --> RES[Stock Reservation]
    DN --> SLE[Stock Ledger Entries]
    SI --> GL[General Ledger Entries]
    PE --> GL
flowchart LR
    PP[Production Plan] --> WO[Work Order]
    WO --> JC[Job Card]
    WO --> SE[Stock Entry]
    SE --> SLE[Stock Ledger Entries]
    WO --> FG[Finished Goods]

Glossary

  • DocType: Frappe's persisted document model and its server-side controller.
  • Stock Ledger Entry (SLE): an inventory movement record used to determine stock quantities and valuation.
  • General Ledger Entry (GLE): an accounting posting record generated by submitted financial and stock transactions.
  • Stock Entry: a stock movement document for transfers, manufacture, consumption, receipts, and related inventory operations.
  • Repost Item Valuation: queued recalculation work that rebuilds affected stock and accounting valuation effects.

Codebase-wide invariants

Routing table