$ show frappe/erpnext
ERPNext is a comprehensive open-source ERP (Enterprise Resource Planning) system built on the Frappe Framework. It provides a full suite of business management modules including Accounting, CRM, Buying, Selling, Stock/Inventory, Manufacturing, Projects, Assets, Quality Management, Support, and more. The system uses a metadata-driven architecture where DocTypes (document types) define data models, business logic, and UI behavior. The codebase follows a modular structure with each business domain in its own directory (accounts, buying, selling, stock, manufacturing, projects, etc.). It includes a modern React/TypeScript banking module built with Vite for bank reconciliation and statement importing. The system supports multi-company, multi-currency, multi-language deployments with extensive regional/localization support for tax compliance across many countries. It has a robust patch/migration system for database schema evolution and a comprehensive test suite.
The LLM identified 10 files worth highlighting for reuse:
Core stock ledger implementation handling inventory valuation, FIFO/LIFO queues, serial/batch number tracking, and real-time stock balance computation. Demonstrates sophisticated inventory accounting patterns with proper handling of valuation rates, stock queues, and cross-warehouse transfers.
General Ledger Entry implementation - the central accounting record consolidating all financial transactions. Uses a unified model with account_type and amount (positive/negative) instead of separate debit/credit fields, enabling simpler outstanding calculations via against_voucher_no linking.
Base controller for all stock transactions (Stock Entry, Purchase Receipt, Delivery Note, etc.). Provides shared logic for stock ledger updates, GL entry creation, serial/batch bundle handling, and valuation. Demonstrates template method pattern for transaction processing.
Payment Entry implementation handling receipts, payments, and internal transfers with multi-currency support, advance allocation, tax withholding, and exchange gain/loss calculation. Integrates with Payment Ledger for efficient reconciliation.
Serial and Batch Bundle system providing end-to-end traceability for serialized and batched inventory. Handles creation, consumption, and transfer of serial/batch numbers across transactions with proper valuation rate propagation.
Bill of Materials implementation with multi-level BOM explosion, costing (material, operation, overhead), variant support, and subcontracting integration. Includes services for exploded items, operations costing, and BOM comparison.
Automated tax setup system that creates country-specific charts of accounts, tax templates, and tax rules from JSON definitions. Supports 50+ countries with localized tax structures (GST, VAT, sales tax) and integrates with regional modules.
Modern React/TypeScript banking module for bank reconciliation with statement import (PDF/CSV), auto-matching rules, manual matching UI, and clearance management. Uses pdfplumber for PDF table extraction and frappe-react-sdk for backend integration.
Accounting ledger reposting system for correcting historical GL entries after backdated changes. Handles voucher-wise reposting with validation, queue-based background processing, and comprehensive error handling for data integrity.
Centralized query building utilities for reports and list views with dynamic filters, permission-aware queries, and standardized patterns for common business queries (item, party, account, warehouse).