Chart of Accounts and General Ledger Setup
Overview
- What you’ll learn:
- How iDempiere’s accounting foundation works — Accounting Schema, Account Elements, and the Chart of Accounts
- How account combinations, default accounts, and tree hierarchies control where transactions are posted
- How documents generate journal entries, how the General Ledger stores postings, and how to create manual GL Journals
- Prerequisites: Lessons 1–25 (particularly understanding of documents like invoices, payments, and material receipts)
- Estimated reading time: 22 minutes
Introduction
Every business transaction in iDempiere — a sales invoice, a purchase order receipt, a bank payment, a manufacturing cost collector — ultimately results in accounting entries. The financial management module is not a separate system bolted on top of operations; it is deeply integrated into every transactional window. When you complete a shipment, the system automatically generates journal entries debiting Cost of Goods Sold and crediting Inventory. When you post a vendor invoice, the system debits Expense (or Inventory) and credits Accounts Payable.
But before any of this automatic posting can happen, you need a properly configured accounting foundation. This lesson covers that foundation: the Accounting Schema, Chart of Accounts, Account Elements, valid account combinations, default accounts, tree hierarchies, and the General Ledger.
Accounting Schema (C_AcctSchema)
The Accounting Schema is the top-level accounting configuration object in iDempiere. It defines the overall accounting framework for a client, including:
- Name: A descriptive name (e.g., “US GAAP Accrual Basis” or “IFRS Schema”)
- GAAP: The accounting standard this schema follows (International GAAP, US GAAP, German HGB, French PCG, or Custom)
- Costing Method: The default product costing method — Standard Cost, Average Cost, FIFO, LIFO, or Last PO Price
- Cost Type: Current costs, planned costs, or both
- Currency: The base currency for this accounting schema — all journal entries are recorded in this currency (with source currency also stored for multi-currency transactions)
- Period Type: Calendar year, fiscal year, or custom period definitions
- Commitment Type: Whether to generate accounting for purchase commitments (encumbrance accounting)
A client can have multiple accounting schemas. This is common for multinational organizations that must maintain books under more than one accounting standard (e.g., local GAAP and IFRS simultaneously). One schema is designated as the primary schema, and others serve as secondary schemas. All document postings generate entries in all active schemas.
The Accounting Schema is configured in the Accounting Schema window under Performance Analysis → Accounting Rules.
Schema Elements
The Accounting Schema also defines which accounting dimensions (called Schema Elements) are active. The mandatory dimension is the Account (natural account). Optional dimensions include:
- Organization: For inter-departmental or inter-division reporting
- Business Partner: For tracking receivables/payables by partner
- Product: For product-level profitability analysis
- Project: For project accounting
- Campaign: For marketing campaign tracking
- Sales Region: For geographic analysis
- Activity: For activity-based costing
- User-defined elements (User1, User2): Custom dimensions for specific business needs
Each active dimension becomes a segment in the account combination, enabling detailed multi-dimensional financial analysis.
Account Element (C_Element)
The Account Element defines the type of chart you are using. It is the container for all individual account values. In most implementations, you will have a single Account Element representing your Chart of Accounts, but iDempiere supports multiple elements for organizations with complex multi-segment account structures.
Key fields on the Account Element:
- Name: The name of the element (e.g., “Natural Account”)
- Element Type: “Account” for the natural account segment (there are also “User Defined” types for custom segments)
- Tree: The tree structure used to organize accounts hierarchically (for rollup reporting)
- Balancing: Whether this element must balance (debits must equal credits within each value of this element)
Element Values — The Chart of Accounts (C_ElementValue)
Element Values are the individual accounts in your chart of accounts. Each C_ElementValue record represents one account — Assets, Accounts Receivable, Revenue, Cost of Goods Sold, and so on. This is where the Chart of Accounts is actually defined.
Key Fields
- Search Key (Value): The account number or code (e.g., “1000”, “1100”, “4000”). This follows your chart’s numbering convention.
- Name: The descriptive account name (e.g., “Cash”, “Accounts Receivable”, “Sales Revenue”)
- Account Type: The fundamental classification of this account:
- Asset (A): Resources owned — cash, inventory, equipment, receivables
- Liability (L): Obligations owed — accounts payable, loans, accrued expenses
- Owner’s Equity (O): Net worth — retained earnings, capital stock
- Revenue (R): Income earned — sales, service revenue, interest income
- Expense (E): Costs incurred — COGS, salaries, rent, utilities
- Memo (M): Statistical accounts that do not affect the financial statements
- Account Sign: Natural sign for the account — Debit for Assets and Expenses, Credit for Liabilities, Equity, and Revenue. This controls how balances are displayed in reports.
- Is Summary: Whether this is a parent (grouping) account or a posting (detail) account. Only non-summary accounts can receive postings. Summary accounts are used for rollup totals in the tree hierarchy.
- Is Document Controlled: When checked, the account requires a business partner or document reference on every posting. This is typically set for Accounts Receivable and Accounts Payable accounts.
- Post Actual / Post Budget / Post Statistical: Controls what types of journal entries can post to this account.
Natural Account Segment
The natural account is the most important segment of any accounting combination. It answers the question “what type of financial event is this?” While other dimensions tell you who, where, or which project, the natural account tells you what — is this revenue? An expense? An asset? The natural account is the one mandatory element in every accounting schema.
A typical Chart of Accounts numbering convention:
| Range | Account Type | Examples |
|---|---|---|
| 1000–1999 | Assets | Cash, Accounts Receivable, Inventory, Fixed Assets |
| 2000–2999 | Liabilities | Accounts Payable, Accrued Expenses, Loans Payable |
| 3000–3999 | Equity | Common Stock, Retained Earnings |
| 4000–4999 | Revenue | Product Sales, Service Revenue, Interest Income |
| 5000–5999 | Cost of Goods Sold | Material Costs, Labor Costs, Manufacturing Overhead |
| 6000–6999 | Operating Expenses | Salaries, Rent, Utilities, Depreciation |
| 7000–7999 | Other Income/Expense | Interest Expense, Gains/Losses, Foreign Exchange |
| 8000–8999 | Taxes | Income Tax Expense, Tax Provisions |
| 9000–9999 | Statistical/Memo | Headcount, Square Footage, Units Produced |
Account Combinations (C_ValidCombination)
An Account Combination is a specific, validated combination of accounting dimension values. It is the full “address” for a financial posting. For example, if your schema has Organization, Account, and Product dimensions active, a valid combination might be:
Organization: HQ Account: 4000 (Sales Revenue) Product: Oak Table
The C_ValidCombination table stores these pre-validated combinations. When a document is posted, the system constructs the account combination using default accounts, document attributes, and accounting rules, then looks up or creates the corresponding valid combination.
You generally do not create account combinations manually. They are generated automatically when:
- Default accounts are defined (see next section)
- Documents are posted for the first time with a new combination of dimension values
- GL Journal lines are entered with a new combination
Default Accounts
Default accounts are the key link between business transactions and the General Ledger. They tell iDempiere which accounts to debit and credit when a specific type of transaction occurs. Default accounts are configured at several levels:
Accounting Schema Defaults
The Accounting Schema window has a Defaults tab that defines fallback accounts used when no more specific default is available. These include:
- Intercompany Due To / Due From: For inter-organization transactions
- Suspense Balancing / Suspense Error: Catch-all accounts for unbalanced entries and posting errors
- Currency Balancing: For rounding differences in multi-currency conversions
- Retained Earnings: Where year-end net income is closed
Product Category Accounting
Each Product Category has an Accounting tab that defines product-related posting accounts:
- Product Asset: Inventory account (debit when goods are received)
- Product Expense: Expense account (debit for non-stocked items or services)
- Product COGS: Cost of Goods Sold (debit when goods are shipped to customers)
- Product Revenue: Revenue account (credit when customer invoices are posted)
- Work in Process: WIP account (debit during manufacturing, credit when finished goods are received)
- Floor Stock / Method Change / Usage Variance / Rate Variance: Manufacturing variance accounts
Business Partner Group Accounting
Each Business Partner Group has an Accounting tab defining:
- Customer Receivable: The AR account (debit on customer invoices)
- Customer Prepayment: Account for advance payments from customers
- Vendor Liability: The AP account (credit on vendor invoices)
- Vendor Prepayment: Account for advance payments to vendors
- Vendor Service Receivable: For accrual of services not yet invoiced
- Not Invoiced Receipts: Goods received but not yet invoiced (accrual account)
Bank Account Accounting
Each Bank Account has accounting defaults for:
- Bank In Transit: Temporary account for payments being processed
- Bank Asset: The actual bank account in the GL
- Bank Unallocated Receipt: For received funds not yet matched to invoices
- Bank Expense / Interest Revenue / Interest Expense: For bank charges and interest
Tax Accounting
Each Tax Rate definition has accounts for:
- Tax Due: Output tax collected from customers (liability)
- Tax Credit: Input tax paid to vendors (asset, offset against Tax Due)
- Tax Expense: Non-recoverable tax portions treated as expense
Charge Accounting
Each Charge defines a specific expense or revenue account for miscellaneous transactions (freight charges, handling fees, etc.).
Tree Hierarchy (AD_Tree)
iDempiere uses tree structures (AD_Tree) to organize accounts hierarchically for reporting and rollup purposes. The account tree defines parent-child relationships between accounts:
1000 Current Assets (Summary)
├── 1100 Cash and Cash Equivalents (Summary)
│ ├── 1110 Petty Cash
│ ├── 1120 Operating Bank Account
│ └── 1130 Savings Account
├── 1200 Accounts Receivable (Summary)
│ ├── 1210 Trade Receivables
│ └── 1220 Other Receivables
└── 1300 Inventory (Summary)
├── 1310 Raw Materials
├── 1320 Work in Process
└── 1330 Finished Goods
Summary (parent) accounts aggregate the balances of their child accounts in financial reports. You define the tree structure in the Tree Maintenance window by dragging accounts into the desired hierarchy, or through the Account Element Value window’s parent assignment.
The tree is referenced by the Account Element, and the Accounting Schema uses the element, thus linking the tree to all financial reporting within that schema.
Posting Logic — How Documents Become Journal Entries
Understanding how iDempiere transforms business documents into accounting entries is essential. The posting process follows a consistent pattern:
The Posting Trigger
When a document is completed (status changes to CO), the system automatically triggers the posting engine. The engine examines the document type and calls the appropriate posting logic. Each document type has its own posting class (Java code) that defines the debit/credit rules.
Example: Customer Invoice Posting
When a customer invoice for $1,000 (plus $100 tax) is completed, the posting engine generates:
| Account | Debit | Credit |
|---|---|---|
| Accounts Receivable (from BP Group defaults) | $1,100 | |
| Product Revenue (from Product Category defaults) | $1,000 | |
| Tax Due (from Tax Rate defaults) | $100 |
The system determines each account by looking up the default accounts configured on the relevant master data (business partner group, product category, tax rate), then constructing valid account combinations that include the natural account plus any active dimensional segments.
Example: Material Receipt Posting
When goods are received from a vendor (material receipt completed):
| Account | Debit | Credit |
|---|---|---|
| Inventory Asset (from Product Category defaults) | $5,000 | |
| Not Invoiced Receipts (from BP Group defaults) | $5,000 |
Later, when the vendor invoice arrives and is matched to the receipt, the Not Invoiced Receipts account is reversed and Accounts Payable is credited.
Fact_Acct — The Actual Postings Table
All posted journal entries are stored in the Fact_Acct table. This is the most important table in iDempiere’s financial module — it is the General Ledger in table form. Key fields include:
- AD_Table_ID / Record_ID: Links back to the source document (invoice, payment, receipt, etc.)
- Account_ID: The natural account (C_ElementValue)
- C_AcctSchema_ID: Which accounting schema this posting belongs to
- DateAcct: The accounting date (determines the period)
- DateTrx: The transaction date
- AmtSourceDr / AmtSourceCr: Debit and credit amounts in the source (transaction) currency
- AmtAcctDr / AmtAcctCr: Debit and credit amounts in the accounting schema’s base currency
- C_Currency_ID: The source currency
- Qty: The quantity associated with the posting (for inventory-related entries)
- PostingType: Actual (A), Budget (B), Statistical (S), Commitment (E), or Reservation (R)
Dimensional fields on Fact_Acct mirror the schema elements: AD_Org_ID, C_BPartner_ID, M_Product_ID, C_Project_ID, C_Campaign_ID, C_SalesRegion_ID, C_Activity_ID, User1_ID, User2_ID. This enables multi-dimensional reporting directly from the posting table.
GL Journal — Manual Entries
While most accounting entries are generated automatically from business documents, some entries must be created manually. The GL Journal window (under Performance Analysis → Accounting Rules) is used for:
- Accruals and deferrals (prepaid expenses, deferred revenue)
- Depreciation entries (if not using a fixed assets module)
- Adjusting entries at period-end
- Reclassification entries (moving balances between accounts)
- Opening balance entries for system go-live
- Intercompany entries
GL Journal Structure
GL Journals have a two-level structure:
- GL Journal Batch (GL_JournalBatch): A container for grouping related journals. The batch has an accounting date, description, and document status. Batches can be posted or reversed as a unit.
- GL Journal (GL_Journal): The journal header, containing the accounting date, currency, GL Category, and document type. Each journal can have multiple lines.
- GL Journal Line (GL_JournalLine): Individual debit/credit entries. Each line specifies an account combination, debit amount, credit amount, and optional description.
The total debits on a journal must equal the total credits — the system enforces this when you complete the journal. Multi-currency journals are supported, with the system automatically calculating the accounting-currency amounts using the defined exchange rate.
GL Category
Every GL Journal is assigned a GL Category that classifies the type of entry (e.g., “Manual”, “Adjustment”, “Accrual”, “Revaluation”). GL Categories are defined in the GL Category window and are used for filtering and reporting. iDempiere also automatically assigns GL Categories to system-generated postings based on the document type.
Period Management
Accounting periods control when transactions can be posted. iDempiere uses a calendar-based period system:
- Calendar (C_Calendar): Defines the fiscal year structure for the organization
- Year (C_Year): A fiscal year within the calendar
- Period (C_Period): Typically one month, with a start date and end date
Each period has a Period Status that controls posting:
- Never Opened (N): The period has not been opened yet — no postings allowed
- Open (O): Transactions can be posted to this period
- Close (C): The period is closed — standard users cannot post, but it can be reopened
- Permanently Closed (P): The period is permanently closed — no further postings under any circumstances
Period control can be configured at the document type level through Period Control records, allowing granular control. For example, you might close AP for a period while keeping GL Journals open for adjustments.
Multiple Accounting Schemas
As mentioned earlier, iDempiere supports multiple accounting schemas for parallel accounting. Common scenarios include:
- Local GAAP + IFRS: A company maintaining books under both the local accounting standard and International Financial Reporting Standards
- Different currencies: A subsidiary maintaining books in local currency but also in the parent company’s reporting currency
- Tax vs. Management accounting: Separate schemas with different depreciation methods or cost allocations
When multiple schemas are active, every document posting generates Fact_Acct entries for each schema. Reports can be run against any schema, providing a complete, independent set of financial statements for each accounting framework.
Example: Setting Up a Chart of Accounts from Scratch
Here is a step-by-step walkthrough of creating an accounting foundation in iDempiere:
Step 1: Create the Account Element
- Open the Account Element window
- Create a new element named “Natural Account”
- Set Element Type to “Account”
- The system will automatically create a tree for this element
Step 2: Define Element Values (Accounts)
- On the Element Value tab, create your chart of accounts
- Start with summary (parent) accounts for major categories: Assets, Liabilities, Equity, Revenue, Expenses
- Then create detail (posting) accounts under each summary account
- Set the Account Type, Account Sign, and Is Summary flag correctly for each account
- Mark AR and AP accounts as Document Controlled
Step 3: Organize the Tree Hierarchy
- Open Tree Maintenance and select the account tree
- Arrange accounts into the desired parent-child hierarchy
- Verify that summary accounts properly contain their child accounts
Step 4: Configure the Accounting Schema
- Open the Accounting Schema window
- Set the GAAP type, costing method, and base currency
- On the Schema Element tab, ensure the Account element is active and pointing to your element
- Activate any additional dimensions you need (Organization, Product, Project, etc.)
- On the Defaults tab, set the system-level default accounts
Step 5: Set Default Accounts on Master Data
- Open each Product Category and configure the Accounting tab with appropriate inventory, COGS, revenue, and expense accounts
- Open each Business Partner Group and configure the Accounting tab with AR and AP accounts
- Open each Bank Account and configure the Accounting tab with the bank asset account
- Open each Tax Rate and configure the Accounting tab with tax due, tax credit, and tax expense accounts
Step 6: Define the Calendar and Periods
- Open the Calendar, Year, Period window
- Create a calendar for the organization
- Create a year and use the “Create Periods” process to automatically generate 12 monthly periods
- Open the current period
Step 7: Test with a GL Journal
- Create a GL Journal with a simple debit/credit entry
- Complete it and verify the posting in the
Fact_Acctrecords - Run a Trial Balance report to see your entry reflected
Summary
The accounting foundation in iDempiere consists of several interrelated components: the Accounting Schema defines the framework and dimensions, Account Elements and Element Values define the Chart of Accounts, Account Combinations provide the full address for every posting, Default Accounts link business transactions to the GL, and the Tree Hierarchy enables rollup reporting. Documents automatically generate journal entries in the Fact_Acct table, while GL Journals handle manual entries. Period Management controls when postings can occur, and multiple schemas support parallel accounting under different standards.
With this foundation in place, the next lesson covers Accounts Payable and Accounts Receivable — the daily transaction processing that generates most of the activity in your General Ledger.
繁體中文翻譯
概覽
- 您將學到:
- iDempiere 的會計基礎如何運作 — 會計結構描述、帳戶元素和會計科目表
- 帳戶組合、預設帳戶和樹狀層次結構如何控制交易過帳的位置
- 文件如何產生日記帳分錄、總帳如何儲存過帳,以及如何建立手動 GL 日記帳
- 先決條件:第 1–25 課(特別是了解發票、付款和物料收據等文件)
- 預估閱讀時間:22 分鐘
簡介
iDempiere 中的每筆業務交易 — 銷售發票、採購訂單收據、銀行付款、製造成本收集器 — 最終都會產生會計分錄。財務管理模組不是附加在營運之上的獨立系統;它深度整合到每個交易視窗中。
但在任何自動過帳發生之前,您需要一個正確設定的會計基礎。本課涵蓋該基礎:會計結構描述、會計科目表、帳戶元素、有效帳戶組合、預設帳戶、樹狀層次結構和總帳。
會計結構描述(C_AcctSchema)
會計結構描述是 iDempiere 中最頂層的會計設定物件。它定義客戶的整體會計框架,包括:
- 名稱:描述性名稱(例如「US GAAP 應計基礎」或「IFRS 結構描述」)
- GAAP:此結構描述遵循的會計準則
- 成本計算方法:預設的產品成本計算方法 — 標準成本、平均成本、先進先出、後進先出或最後 PO 價格
- 幣別:此會計結構描述的基礎幣別
- 承諾類型:是否產生採購承諾的會計(預算保留會計)
客戶可以有多個會計結構描述。這對於必須在多種會計準則下維護帳簿的跨國組織很常見。
結構描述元素
會計結構描述也定義哪些會計維度(稱為結構描述元素)是啟用的。必要維度是帳戶(自然帳戶)。選擇性維度包括:
- 組織:用於部門間或事業部間的報表
- 業務夥伴:用於按夥伴追蹤應收帳款/應付帳款
- 產品:用於產品層級的獲利分析
- 專案:用於專案會計
- 活動:用於作業基礎成本制
- 使用者定義元素(User1、User2):滿足特定業務需求的自訂維度
帳戶元素(C_Element)
帳戶元素定義您使用的科目表類型。它是所有個別帳戶值的容器。
元素值 — 會計科目表(C_ElementValue)
元素值是科目表中的個別帳戶。每筆 C_ElementValue 記錄代表一個帳戶。
關鍵欄位
- 搜尋鍵(Value):帳戶號碼或代碼(例如「1000」、「4000」)
- 名稱:描述性的帳戶名稱(例如「現金」、「應收帳款」、「銷售收入」)
- 帳戶類型:此帳戶的基本分類:
- 資產(A):所擁有的資源
- 負債(L):所欠的義務
- 業主權益(O):淨值
- 收入(R):獲得的所得
- 費用(E):發生的成本
- 備忘(M):不影響財務報表的統計帳戶
- 是否為摘要:是否為母帳(分組)帳戶或過帳(明細)帳戶。只有非摘要帳戶可以接受過帳。
- 是否為文件控制:勾選時,帳戶要求每筆過帳都有業務夥伴或文件參考。通常設定在應收帳款和應付帳款帳戶上。
典型的會計科目表編號慣例
| 範圍 | 帳戶類型 | 範例 |
|---|---|---|
| 1000–1999 | 資產 | 現金、應收帳款、存貨、固定資產 |
| 2000–2999 | 負債 | 應付帳款、應計費用、應付貸款 |
| 3000–3999 | 權益 | 普通股、保留盈餘 |
| 4000–4999 | 收入 | 產品銷售、服務收入 |
| 5000–5999 | 銷貨成本 | 物料成本、人工成本 |
| 6000–6999 | 營業費用 | 薪資、租金、水電 |
| 7000–7999 | 其他收支 | 利息費用、匯兌損益 |
帳戶組合(C_ValidCombination)
帳戶組合是會計維度值的特定已驗證組合。它是財務過帳的完整「地址」。
預設帳戶
預設帳戶是業務交易和總帳之間的關鍵連結。它們告訴 iDempiere 在特定類型的交易發生時借記和貸記哪些帳戶。預設帳戶在多個層級設定:
- 會計結構描述預設值:公司間往來、暫記平衡、幣別平衡、保留盈餘
- 產品類別會計:產品資產(存貨)、產品費用、銷貨成本、產品收入、在製品
- 業務夥伴群組會計:客戶應收、供應商負債、未開票收貨
- 銀行帳戶會計:在途銀行、銀行資產
- 稅務會計:應付稅款、進項稅額、稅務費用
樹狀層次結構(AD_Tree)
iDempiere 使用樹狀結構(AD_Tree)來組織帳戶的層次結構,用於報表和彙總目的。帳戶樹定義帳戶之間的父子關係。
過帳邏輯 — 文件如何成為日記帳分錄
過帳觸發
當文件完成(狀態變更為 CO)時,系統自動觸發過帳引擎。
範例:客戶發票過帳
| 帳戶 | 借方 | 貸方 |
|---|---|---|
| 應收帳款(來自 BP 群組預設值) | $1,100 | |
| 產品收入(來自產品類別預設值) | $1,000 | |
| 應付稅款(來自稅率預設值) | $100 |
範例:物料收據過帳
| 帳戶 | 借方 | 貸方 |
|---|---|---|
| 存貨資產(來自產品類別預設值) | $5,000 | |
| 未開票收貨(來自 BP 群組預設值) | $5,000 |
Fact_Acct — 實際過帳資料表
所有已過帳的日記帳分錄都儲存在 Fact_Acct 資料表中。這是 iDempiere 財務模組中最重要的資料表 — 它是資料表形式的總帳。
GL 日記帳 — 手動分錄
雖然大多數會計分錄是從業務文件自動產生的,但有些分錄必須手動建立。GL 日記帳視窗用於:
- 應計和遞延(預付費用、遞延收入)
- 折舊分錄
- 期末調整分錄
- 重分類分錄
- 系統上線的期初餘額分錄
- 公司間分錄
期間管理
會計期間控制何時可以過帳交易。每個期間有期間狀態控制過帳:
- 從未開啟(N):期間尚未開啟 — 不允許過帳
- 開啟(O):可以過帳交易到此期間
- 關閉(C):期間已關閉 — 標準使用者無法過帳,但可以重新開啟
- 永久關閉(P):期間永久關閉 — 在任何情況下都不允許再過帳
多個會計結構描述
iDempiere 支援多個會計結構描述用於平行會計。常見場景包括:
- 當地 GAAP + IFRS:同時按當地會計準則和國際財務報告準則維護帳簿
- 不同幣別:子公司以當地幣別維護帳簿,同時以母公司的報告幣別
- 稅務 vs. 管理會計:使用不同折舊方法的獨立結構描述
摘要
iDempiere 的會計基礎由幾個相互關聯的元件組成:會計結構描述定義框架和維度,帳戶元素和元素值定義會計科目表,帳戶組合提供每筆過帳的完整地址,預設帳戶將業務交易連結到 GL,樹狀層次結構啟用彙總報表。文件自動在 Fact_Acct 資料表中產生日記帳分錄,而 GL 日記帳處理手動分錄。期間管理控制何時可以發生過帳,多個結構描述支援在不同準則下的平行會計。
日本語翻訳
概要
- 学習内容:
- iDempiere の会計基盤の仕組み — 会計スキーマ、勘定要素、勘定科目表
- 勘定組合せ、デフォルト勘定、ツリー階層が取引の転記先をどのように制御するか
- 伝票がどのように仕訳を生成するか、総勘定元帳がどのように転記を格納するか、手動 GL 仕訳の作成方法
- 前提条件:第1〜25課(特に請求書、支払い、入庫などの伝票の理解)
- 推定読了時間:22分
はじめに
iDempiere のすべてのビジネス取引 — 売上請求書、発注書の入庫、銀行支払い、製造原価収集 — は最終的に会計仕訳を生成します。財務管理モジュールは業務の上に追加された別システムではなく、すべての取引ウィンドウに深く統合されています。
しかし自動転記が行われる前に、適切に設定された会計基盤が必要です。この課ではその基盤をカバーします:会計スキーマ、勘定科目表、勘定要素、有効な勘定組合せ、デフォルト勘定、ツリー階層、総勘定元帳。
会計スキーマ(C_AcctSchema)
会計スキーマは iDempiere のトップレベルの会計設定オブジェクトです。クライアントの全体的な会計フレームワークを定義します:
- 名前:説明的な名前(例:「US GAAP 発生主義」または「IFRS スキーマ」)
- GAAP:このスキーマが準拠する会計基準
- 原価計算方式:デフォルトの製品原価計算方式 — 標準原価、平均原価、先入先出、後入先出、最終仕入価格
- 通貨:この会計スキーマの基本通貨
- コミットメントタイプ:購買コミットメントの会計を生成するかどうか(エンカンブランス会計)
クライアントは複数の会計スキーマを持つことができます。複数の会計基準の下で帳簿を維持する必要がある多国籍組織では一般的です。
スキーマ要素
会計スキーマはどの会計ディメンション(スキーマ要素と呼ばれる)が有効かも定義します。必須ディメンションは勘定(自然勘定)です。オプションのディメンションには以下が含まれます:
- 組織:部門間または事業部間のレポーティング用
- 取引先:パートナー別の売掛金/買掛金の追跡用
- 製品:製品レベルの収益性分析用
- プロジェクト:プロジェクト会計用
- 活動:活動基準原価計算用
- ユーザー定義要素(User1、User2):特定のビジネスニーズに対応するカスタムディメンション
勘定要素(C_Element)
勘定要素は使用する科目表のタイプを定義します。すべての個別勘定値のコンテナです。
要素値 — 勘定科目表(C_ElementValue)
要素値は勘定科目表の個々の勘定です。各 C_ElementValue レコードは1つの勘定を表します。
主要フィールド
- 検索キー(Value):勘定番号またはコード(例:「1000」、「4000」)
- 名前:説明的な勘定名(例:「現金」、「売掛金」、「売上高」)
- 勘定タイプ:この勘定の基本分類:
- 資産(A):所有する資源
- 負債(L):負っている義務
- 資本(O):純資産
- 収益(R):獲得した収入
- 費用(E):発生した原価
- メモ(M):財務諸表に影響しない統計勘定
- 集計勘定:親(グループ)勘定か転記(明細)勘定か。集計でない勘定のみが転記を受け取れます。
- 伝票管理:チェックされている場合、すべての転記に取引先または伝票参照が必要。通常、売掛金と買掛金の勘定に設定されます。
典型的な勘定科目表の番号体系
| 範囲 | 勘定タイプ | 例 |
|---|---|---|
| 1000–1999 | 資産 | 現金、売掛金、棚卸資産、固定資産 |
| 2000–2999 | 負債 | 買掛金、未払費用、借入金 |
| 3000–3999 | 資本 | 株式資本、利益剰余金 |
| 4000–4999 | 収益 | 製品売上、サービス収入 |
| 5000–5999 | 売上原価 | 材料費、労務費 |
| 6000–6999 | 営業費用 | 給与、賃借料、光熱費 |
| 7000–7999 | その他収支 | 支払利息、為替差損益 |
勘定組合せ(C_ValidCombination)
勘定組合せは、会計ディメンション値の特定の検証済み組合せです。財務転記の完全な「住所」です。
デフォルト勘定
デフォルト勘定はビジネス取引と総勘定元帳の間の重要なリンクです。特定のタイプの取引が発生した場合にどの勘定を借方・貸方にするかを iDempiere に指示します。
- 会計スキーマのデフォルト:会社間勘定、サスペンスバランシング、通貨バランシング、利益剰余金
- 製品カテゴリ会計:製品資産(棚卸資産)、製品費用、売上原価、製品収益、仕掛品
- 取引先グループ会計:顧客売掛金、仕入先買掛金、未請求入庫
- 銀行口座会計:送金中銀行、銀行資産
- 税金会計:仮受消費税、仮払消費税、税金費用
ツリー階層(AD_Tree)
iDempiere はツリー構造(AD_Tree)を使用して、レポーティングと集計目的で勘定を階層的に整理します。
転記ロジック — 伝票が仕訳になる仕組み
転記トリガー
伝票が完了(ステータスが CO に変更)されると、システムが自動的に転記エンジンをトリガーします。
例:顧客請求書の転記
| 勘定 | 借方 | 貸方 |
|---|---|---|
| 売掛金(BP グループのデフォルトから) | $1,100 | |
| 製品収益(製品カテゴリのデフォルトから) | $1,000 | |
| 仮受消費税(税率のデフォルトから) | $100 |
例:入庫の転記
| 勘定 | 借方 | 貸方 |
|---|---|---|
| 棚卸資産(製品カテゴリのデフォルトから) | $5,000 | |
| 未請求入庫(BP グループのデフォルトから) | $5,000 |
Fact_Acct — 実績転記テーブル
すべての転記済み仕訳は Fact_Acct テーブルに格納されます。これは iDempiere の財務モジュールで最も重要なテーブルで、テーブル形式の総勘定元帳です。
GL 仕訳 — 手動入力
ほとんどの会計仕訳はビジネス伝票から自動生成されますが、一部の仕訳は手動で作成する必要があります。GL 仕訳ウィンドウは以下に使用されます:
- 見越と繰延(前払費用、前受収益)
- 減価償却仕訳
- 期末調整仕訳
- 組替仕訳
- システム稼働時の期首残高仕訳
- 会社間仕訳
期間管理
会計期間は取引がいつ転記できるかを制御します。各期間には転記を制御する期間ステータスがあります:
- 未開(N):期間がまだ開かれていない — 転記不可
- 開(O):この期間に取引を転記可能
- 閉(C):期間が閉じられている — 標準ユーザーは転記不可だが再開可能
- 永久閉(P):期間が永久に閉じられている — いかなる状況でも転記不可
複数の会計スキーマ
iDempiere は並行会計のために複数の会計スキーマをサポートします。一般的なシナリオ:
- 現地 GAAP + IFRS:現地の会計基準と国際財務報告基準の両方で帳簿を維持
- 異なる通貨:子会社が現地通貨で帳簿を維持しつつ親会社の報告通貨でも維持
- 税務 vs. 管理会計:異なる減価償却方法を使用する別々のスキーマ
まとめ
iDempiere の会計基盤はいくつかの相互に関連するコンポーネントで構成されています:会計スキーマがフレームワークとディメンションを定義し、勘定要素と要素値が勘定科目表を定義し、勘定組合せがすべての転記の完全な住所を提供し、デフォルト勘定がビジネス取引を GL にリンクし、ツリー階層が集計レポーティングを可能にします。伝票は Fact_Acct テーブルに自動的に仕訳を生成し、GL 仕訳は手動入力を処理します。期間管理は転記がいつ発生できるかを制御し、複数のスキーマは異なる基準の下での並行会計をサポートします。