# cn_finance **Repository Path**: webvip/cn_finance ## Basic Information - **Project Name**: cn_finance - **Description**: No description available - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: version-16 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2026-08-05 - **Last Updated**: 2026-08-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # cn_finance **ERPNext China Manufacturing Finance & Cost Enhancement Platform** ## Overview `cn_finance` is not a "Chinese financial localization" package. It is a **Cost & Finance Enhancement Platform** built on top of ERPNext's native financial infrastructure. It extends ERPNext without modifying core code — all capabilities are delivered through App extension. > **ERPNext manages business processes; cn_finance manages cost and financial enhancements.** ## Architecture ``` ERPNext Core ────────────────────────────────────────── GL Entry | Stock Ledger | Accounts Buying | Selling | Manufacturing | Payment ────────────────────────────────────────── ▲ │ Extend │ cn_finance ────────────────────────────────────────── Cost Engine | Purchase Cost | Inventory Cost Manufacturing Cost | Cost Trace Month End | Analysis | Voucher Engine ────────────────────────────────────────── ``` ## Module Structure ``` cn_finance/ ├── costing/ # Cost Engine (core) │ ├── cost_engine.py # Unified cost calculation │ ├── cost_trace.py # Cost traceability │ ├── cost_allocation.py# Cost allocation │ └── cost_settlement.py# Period settlement ├── accounting/ # Voucher Engine │ └── voucher_engine.py # Auto voucher generation ├── purchase_cost/ # Purchase Cost │ ├── ppv.py # Purchase Price Variance │ └── landed_cost.py # Landed cost (freight, customs) ├── inventory_cost/ # Inventory Cost │ └── inventory_cost_engine.py ├── manufacturing_cost/ # Manufacturing Cost │ ├── work_order_cost.py │ └── overhead_allocation.py ├── month_end/ # Month End Center │ └── month_end_engine.py ├── analysis/ # Analysis Center │ └── analysis_engine.py ├── api/ # REST API │ ├── endpoints.py │ └── boot.py └── utils/ # Utilities ├── cost_utils.py └── tasks.py ``` ## Key DocTypes | DocType | Purpose | |---------|---------| | CN Finance Settings | App configuration | | Cost Object | Master for cost objects (Item, WO, SO, etc.) | | Cost Event | Log of all cost calculations | | Cost Trace Log | Cost impact traceability | | PPV Record | Purchase Price Variance | | Landed Cost Voucher | Freight/customs allocation | | Inventory Cost Log | Cost revaluation history | | Work Order Cost Summary | Manufacturing cost aggregation | | Month End Session | Period closing wizard | | Cost Adjustment Voucher | Cost adjustments | | Voucher Template | Auto voucher templates | | Cost Allocation Rule | Allocation rule definitions | | Manufacturing Overhead Distribution | Overhead distribution | ## Core Engines ### 1. Cost Engine All cost calculations go through `CostEngine.calculate()`. Centralises purchase cost, inventory cost, work order cost, overhead allocation, cost adjustment, and cost recalculation. ### 2. Cost Trace Engine When any cost amount changes, traces the impact through: PI → PR → Stock → Work Order → FG → Sales → Profit. ### 3. Voucher Engine Auto-generates journal entries from cost events based on configurable templates. ### 4. Month End Engine Full period closing wizard: checks → cost calc → overhead → PPV → adjustment → GL check → voucher → lock. ### 5. Analysis Engine Product profitability, order profitability, customer profitability, supplier analysis, cost trends, cost structure. ## Installation ```bash # Get the app bench get-app https://gitee.com/fwr567/cn_finance.git --branch version-16 # Install on site bench --site your-site install-app cn_finance # Migrate bench --site your-site migrate ``` ## License MIT