Accounting
title: "Accounting Basics (BAS)" ---
Accounting Basics (BAS)
The bas submodule of acc owns the cross-cutting accounting reference data used by every other accounting submodule: the finance company a company is registered as, the financial year/period structure that gates posting, currency contracts and their per-day buying/selling rates, interest contracts and their per-day rates, and the finance-item-group that pins ledger accounts to a product item group. It depends on com.org for the underlying company, on sys.loc for currencies, and on acc.gld and acc.jrn for the ledger accounts and journals it points at.
Concepts
Finance CompanyThe accounting projection of a
Company. Carries the contracts and the default journals used by document posting.Financial YearA named accounting year. Owns a fixed set of
FinancialPeriodrows and tracks an aggregatebiClosedflag.Financial PeriodA posting interval within a year. Once closed, no new postings are accepted for dates inside the period.
Currency ContractA grouping of currency-conversion definitions concluded with a particular bank, all sharing the same internal currency.
Currency ConversionA pair of currencies (internal + external) under a
CurrencyContractwith optional default buying/selling margins.Currency Conversion RateA dated middle/buying/selling rate for one
CurrencyConversion. Buying and selling rates are stored explicitly so they can deviate from the middle rate by their margin.Currency Rate TypeWhether the conversion is for a buying scenario (purchase process) or a selling scenario (sales process). Decides which side of the conversion’s rate is used.
Interest ContractA grouping of interest-rate definitions agreed with a particular bank.
Interest Contract RateA dated interest rate within an
InterestContract.Finance Item GroupThe accounting projection of a product
ItemGroup. Pins the ledger accounts used when the group’s items hit inventory, cost-of-goods-sold, accounts-payable/receivable, currency differences, and so on.
Entities
Finance Company (FinanceCompany)
The accounting projection of a Company.
| Field | Description |
|---|---|
| Owning |
| The currency contract used to convert foreign-currency amounts. |
| The interest contract used to compute interest amounts. |
| Default bank journal used for postings. |
| Default cash journal. |
| Default purchase journal. |
| Default sales journal. |
| Default payment journal. |
| Default general journal. |
| Default tax journal. |
A validation rule enforces that the company’s internal currency matches the currency-contract’s internal currency.
Financial Year (FinancialYear)
A named accounting year.
| Field | Description |
|---|---|
| Business key — the year identifier. |
| The contained |
| Aggregate flag derived from the periods. Once closed, no postings are accepted. |
Financial Period (FinancialPeriod)
A posting interval within a year.
| Field | Description |
|---|---|
| Owning year (composite business key with |
| Period sequence within the year. |
| Inclusive first posting date. |
| Inclusive last posting date. |
| Whether the period is closed for posting. |
Currency Contract (CurrencyContract)
A grouping of currency conversions concluded with a particular bank.
| Field | Description |
|---|---|
| Business key (a |
| Human-readable name. |
| Internal currency for every conversion under this contract. |
| The bank the contract is concluded with. |
Currency Conversion (CurrencyConversion)
A pair of currencies (internal + external) within a contract.
| Field | Description |
|---|---|
| Owning contract (composite business key with |
| The external currency. |
| Optional default buying margin (percentage) used as the seed when entering a new rate. |
| Optional default selling margin. |
Currency Conversion Rate (CurrencyConversionRate)
A dated rate snapshot for a conversion.
| Field | Description |
|---|---|
| Owning conversion (composite business key with |
| First date the rate is valid. |
| The middle rate. |
| Optional buying margin in effect on this snapshot. |
| The buying rate (used in purchase scenarios). |
| Optional selling margin in effect on this snapshot. |
| The selling rate (used in sales scenarios). |
Currency Rate Type (CurrencyRateType)
Internal enum used by callers of the conversion service to pick the buying or selling rate.
| Value | Used by |
|---|---|
| Purchase processes ( |
| Sales processes ( |
Interest Contract (InterestContract)
A grouping of interest rates concluded with a bank.
| Field | Description |
|---|---|
| Business key (a |
| Human-readable name. |
| The bank the contract is concluded with. |
Interest Contract Rate (InterestContractRate)
A dated interest-rate snapshot under an interest contract.
| Field | Description |
|---|---|
| Owning contract (composite business key with |
| First date the rate applies. |
| The interest rate. |
Interest Calculation Type (InterestCalculationType)
| Code | Name | Meaning |
|---|---|---|
| Simple | Simple interest. |
| Compound | Compound interest. |
Finance Item Group (FinanceItemGroup)
The accounting projection of a product ItemGroup. Pins the ledger accounts used by every posting that touches items of the group.
| Field | Description |
|---|---|
| The product item group (one-to-one). |
| Account hit when an invoice is expected but not yet received. |
| Cost account. |
| Inventory account. |
| Inventory suspense account (in-flight inventory adjustments). |
| Work order result account. |
| Material coverage account. |
| Labour coverage account. |
| Accounts receivable account. |
| Receivables that have not been invoiced yet. |
| Revenue account. |
| Deferred revenue account. |
| Cost-of-goods-sold account. |
| Accounts payable account. |
| Goods received but not yet invoiced. |
| Pre-paid inventory account. |
| Currency difference (revenue side). |
| Currency difference (cost side). |
Functionality
Financial-period gating
FinancialPeriodReaderService.assertFinancialPeriodIsOpen raises a business exception when either the financial year is closed or the named period is closed; postings call this before persisting. getFinancialPeriod(postingDate) returns the (single) period that contains the date — multiple matches are an error. getOpenFinancialPeriod(postingDate) is the same, but additionally fails if the matching period is closed.
Period close / undo
The closePeriod and closePeriodUndo write actions on FinancialPeriod flip the period’s closed flag. FinancialPeriodActionWriter is the action handler that the framework dispatches to.
Currency conversion
CurrencyRateReaderService.convertAmountToCurrency converts an amount from one currency to another using the rate effective on a given RateDate under the supplied CurrencyContract, picking buying or selling rate based on the supplied CurrencyRateType. The service also exposes getCurrencyRate for callers that want the rate without applying it. (Several home-currency convenience methods are stubbed out — listed in the source but not active.)
Public API
ACC_BAS_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Raises if the year or period is closed. |
| The period containing the date; raises if closed. |
| The period containing the date (open or closed). |
ACC_BAS_CommandApi
This submodule does not provide a command API class. Period close/open is performed through the entity action handler, not a cross-module write seam.
ViewModel actions
| Action | User-visible effect |
|---|---|
| Closes the period so no further postings are accepted. |
| Re-opens a closed period. |
title: "Banks and Bank Statements (BNK)" ---
Banks and Bank Statements (BNK)
The bnk submodule of acc owns the bank-side reference data and the imported bank-statement records: banks, bank accounts, bank statements (MT940-shaped), and the lines that make up a statement. It depends on com.org for the company a bank account belongs to, on com.par for the customer/supplier extracted from a statement line, on acc.gld for the ledger account a bank account posts to, on acc.jrn for the journal entry a statement line is posted as, and on acc.pmt for the payments matched against a statement line.
Concepts
BankA financial institution. Holds the bank’s reference data (SWIFT/BIC, address, contact).
Bank AccountA specific account at a bank, in a specific currency, owned by a specific finance company.
Bank StatementAn imported statement file (typically MT940-shaped) for one bank account, with opening and closing balance.
Bank Statement LineA single transaction inside a statement: a transaction type, debit/credit indicator, amount, currency, and counter-account references plus the customer/supplier extracted by reconciliation.
ReconciliationThe process of marking a statement line as matched against one or more
Paymentrows; the line tracks the reconciled amount and the journal entry it was posted as.
Entities
Bank (Bank)
A financial institution.
| Field | Description |
|---|---|
| Business key (a |
| Optional SWIFT/BIC. |
| Bank name (a |
| Bank address. |
| Optional reference text. |
| Optional phone number. |
Bank Account (BankAccount)
A specific account at a bank.
| Field | Description |
|---|---|
| Business key — the IBAN. |
| Account currency. |
| Owning bank. |
| Owning finance company. |
Bank Statement (BankStatement)
An imported statement (MT940-shaped) for one bank account.
| Field | Description |
|---|---|
| Business key — the MT940 transaction reference of the file. |
| The account this statement is for. |
| Optional MT940 statement number. |
| Statement date. |
| Opening balance and the date it applies to. |
| Closing balance and the date it applies to. |
| Defaulted from the bank account (operational fields). |
| The contained |
| Aggregate flag — whether every line of the statement has been reconciled. |
Bank Statement Line (BankStatementLine)
A single transaction within a statement.
| Field | Description |
|---|---|
| Owning statement. |
| Transaction type — see Bank Transaction Types below. |
| Transaction date. |
| Debit/credit indicator — see Debit/Credit Codes below. |
| Transaction amount in the transaction currency. |
| Transaction currency. |
| Conversion rate used for the line. |
| The MT940 :86: free-text references attached to the transaction. |
| Optional name of the counter-party’s bank. |
| Optional counter-party IBAN. |
| Optional supplier or customer extracted by reconciliation. |
| Optional cumulative amount reconciled against payments. |
| Match status (operational). |
| Optional journal entry the line was posted as. |
| The financial period the posting was made in. |
Bank Transaction Types (BankTransactionType)
| Code | Name | Meaning |
|---|---|---|
| Payment Initiated | Outbound payment initiated by us. |
| Payment Received | Inbound payment received from a counter-party. |
| Load or Deposits | Cash load or deposit transactions. |
| Foreign Exchange | Currency exchange transaction. |
| Accounting | Internal accounting/booking transaction. |
Debit/Credit Codes (BankDebitCredit)
| Code | Name | Meaning |
|---|---|---|
| Debit | A debit posting. |
| Credit | A credit posting. |
| Reversal of Debit | Reversal of an earlier debit. |
| Reversal of Credit | Reversal of an earlier credit. |
Functionality
The submodule does not currently expose Spring services from this package. Banks, bank accounts, bank statements and their lines are maintained through the standard CRUD pages, and reconciliation/posting state is updated by the payment-side flows in acc.pmt.
Public API
ACC_BNK_QueryApi and ACC_BNK_CommandApi
This submodule does not provide query- or command-API classes from its hand-written package — the entities are read and written through the standard generated readers/writers, and cross-module access happens through the payment, journal, and ledger APIs that consume bank statements. If a future release introduces a dedicated facade, this section should be regenerated.
ViewModel actions
The submodule defines view models for Bank, BankAccount, BankStatement, and BankStatementLine but does not declare any custom UI actions.
title: "Billable Charges (CHG)" ---
Billable Charges (CHG)
The chg submodule of acc owns the billable-charge stream — individual sales-line-shaped charges that have been recorded in the system but not yet rolled up into a sales invoice. Charges flow in from any source document (sales order, work order, ad-hoc) and stay Pending until the next invoice batch picks them up. Per-period interest accrual on outstanding charges is captured as BillableChargeInterest. The submodule depends on acc.bas for the financial period and interest contract, on acc.doc for source-document references, on acc.sin for the sales-invoice link once a charge is invoiced, on acc.cst for cost-unit allocation, on acc.vat for the VAT code, and on com.par / com.org / com.fin / com.log / cat.itm for the line content (customer, address, terms, units, item).
Concepts
Billable ChargeA line-shaped charge that has been booked but not yet invoiced. Carries everything a sales-invoice line needs: customer, address, item, quantity (internal and external UoM), price, currency, VAT code, terms, and cost-unit allocation. The status moves from Pending to Invoiced (when picked up by an invoice batch) or Cancelled.
Billable Charge InterestA per-period accrual of interest on a charge while it is outstanding. Captures the begin balance, the period interest, and the end balance under the interest rate effective in that period.
Source Document LineThe document line that originated the charge — captured both as a
DocumentLinereference and as an opaqueDocumentIdso the charge survives if the source line is removed.
Entities
Billable Charge (BillableCharge)
A line-shaped charge that has been booked but not yet invoiced.
| Field | Description |
|---|---|
| Business key — a generated transaction id. |
| The kind of source document the charge came from. |
| Owning department (final field). |
| The originating document line. |
| Opaque id of the source document (final). |
| Date of the charge. |
| The customer being charged. |
| Optional invoice (postal) address. |
| Terms applied when the charge is invoiced. |
| Charge currency and conversion rate. |
| The product item. |
| Line description shown on the invoice. |
| Optional external/internal references. |
| Quantity in the internal (item) UoM. |
| Quantity in the external (invoiced) UoM. |
| The external UoM. |
| Unit price in the external UoM. |
| The price UoM (price / |
| Amount in transaction currency and internal currency. |
| VAT code applied to the charge. |
| Optional inventory cost-unit. |
| Optional project cost-unit. |
| Optional free-form text appended to the invoice line. |
| Set when the charge is invoiced — the resulting sales-invoice line. |
| Set when invoiced — the batch the line was emitted in. |
| Optional interest contract that drives accruals. |
| Simple or compound interest. Default |
| Optional cumulative interest amount in the internal currency. |
| Derived status — see Billable Charge Statuses below. Default |
A validation rule enforces that any salesInvoiceLine set on the charge agrees with the charge on VAT code, currency, customer, invoice address, and terms.
Billable Charge Statuses (BillableChargeStatus)
| Code | Name | Meaning |
|---|---|---|
| Pending | Booked but not yet invoiced. |
| Invoiced | Picked up by an invoice batch and emitted as a sales-invoice line. |
| Cancelled | Cancelled before invoicing. |
Billable Charge Interest (BillableChargeInterest)
A per-period accrual of interest on a charge while it is outstanding.
| Field | Description |
|---|---|
| Owning charge. |
| The financial period (composite business key). |
| Interest rate in effect during the period. |
| Inclusive period boundaries. |
| Optional description. |
| Balance at the start of the period. |
| Cumulative interest at the end of the period. |
| Interest accrued in this period. |
| Net change in the balance during the period. |
| Balance at the end of the period. |
Functionality
Pending-charge lookup
BillableChargeReaderService exposes the catalogue of charges still waiting for invoice: every pending charge, every pending charge for a given customer, and every pending charge dated in a given window. These are the seams an invoice-batch run consumes when picking up work.
Charge writing
BillableChargeWriterService is the seam used when other modules (sales delivery, work-order completion, manual charge entry) need to materialize a BillableCharge. The full create/cancel API is currently commented out — see Public API below — so callers cannot mint or cancel charges from outside the package without re-enabling those methods.
Public API
ACC_CHG_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Every charge currently in |
| Every pending charge for a customer. |
ACC_CHG_CommandApi
Write-side facade. Currently a thin wrapper that holds a reference to BillableChargeWriterService; the documented createBillableCharge and cancelBillableCharge methods are commented out and not exposed at this time. Callers needing to create or cancel charges should re-enable those methods rather than reaching past the API.
ViewModel actions
The submodule defines a view model for BillableCharge but does not declare any custom UI actions.
title: "Cost Centers and Cost Units (CST)" ---
Cost Centers and Cost Units (CST)
The cst submodule of acc owns the analytical accounting dimensions: cost centers (one per Department) and cost units (a per-document-line dimension that lets postings be tagged to a project, an inventory lot, or any other tracked unit). It depends on com.org for the department a cost center is for, on acc.doc for the source document line a cost unit was created against, and on cat.itm for the item a cost unit relates to.
Concepts
Cost CenterThe accounting projection of a
Department. Postings tagged with a department are aggregated under its cost center for departmental P&L reporting.Cost UnitA finer-grained analytical dimension created from a specific document line. Used to attach posted amounts to a project, a customer order, an inventory lot, or any other "thing" that needs its own P&L. Each cost unit can be marked financially closed once all postings are settled.
Cost AllocationAn enum that says, in a given context, whether a cost-unit reference is optional, mandatory, or not allowed.
Entities
Cost Center (CostCenter)
The accounting projection of a department.
| Field | Description |
|---|---|
| The department this cost center is for (one-to-one, business key). |
Cost Unit (CostUnit)
A document-line-derived analytical dimension.
| Field | Description |
|---|---|
| Business key (up to 24 characters). |
| Human-readable name. |
| Optional code from an external system. |
| The document line the cost unit was created from (final). |
| The item the cost unit relates to (final). |
| Whether the cost unit is closed for further postings. |
| Derived owning company (business-information field). |
| Derived owning partner (business-information field). |
Cost Allocation (CostAllocation)
| Code | Name | Meaning |
|---|---|---|
| Optional | Cost-unit reference may be supplied. |
| Mandatory | Cost-unit reference is required. |
| Not allowed | Cost-unit reference must be absent. |
Functionality
The submodule does not currently expose Spring services from this package. Cost centers and cost units are maintained through the standard CRUD pages, and downstream postings reference cost units directly through the standard generated readers/writers.
Public API
ACC_CST_QueryApi
The query API class exists as an empty placeholder — no methods are exposed at this time. Other modules read cost units and cost centers through the standard generated readers.
ACC_CST_CommandApi
This submodule does not provide a command API class. Cost centers and cost units are maintained through the default CRUD pages; downstream document-line writers create cost units when needed.
ViewModel actions
The submodule defines view models for CostCenter and CostUnit but does not declare any custom UI actions.
title: "Documents (DOC)" ---
Documents (DOC)
The doc submodule of acc owns the generic document/line tree that every document-shaped record in the ERP plugs into — purchase orders, sales orders, transport orders, work orders, invoices, deliveries, stock issues, partner statements, and so on. A Document is the header (with type, code, date, department, partner, optional external-system reference); a DocumentLine is one row of that document, with an optional source line pointing at the document line it was derived from. The submodule also defines the document-aspect interfaces that other modules implement to opt into shared document behaviour.
Concepts
DocumentThe header of a document tree, identified by the pair (
documentType,documentCode). Carries the date, department, partner, and optional external-system reference. ThedocumentIdis a stable UUID that survives renames.Document TypeAn enum that names what kind of document this is —
SINV,PORD,WORD,SDEL, etc. Drives how readers and writers in other submodules treat the row.Document OriginWhether the document was entered manually, generated by the system, or imported from an external system.
Document LineA single row of a document, identified by (
document,lineNumber). May reference a source document line (the line this one was derived from) and a derived root document line (the original line at the top of the source chain).Document AspectA cross-cutting interface implemented by other modules' document/line entities and view models so they can share the document-aspect framework’s behaviours (number-series allocation on save, default date on create, …).
Entities
Document (Document)
The header of a document tree.
| Field | Description |
|---|---|
| The kind of document — see Document Types below. |
| Business code allocated for the document (composite business key with |
| A stable UUID for the document; final. |
| Document date. |
| Issuing department. |
| Owning company (operational, internal — derived from the department). |
| Optional counter-party. |
| Whether the document originated outside the ERP. Default |
| Optional UUID from the external system. |
| Optional code from the external system. |
| The contained |
Document Types (DocumentType)
| Code | Name |
|---|---|
| Purchase Invoice |
| Sales Invoice |
| Purchase Order |
| Purchase Quotation |
| Purchase Receipt |
| Sales Contact |
| Sales Order |
| Sales Quotation |
| Sales Delivery |
| Transport Order |
| Work Order |
| Stock Issue |
| Stock Receipt |
| Timesheet |
| Partner Statement |
| Sentinel: no document type |
Document Origin (DocumentOrigin)
| Code | Name | Meaning |
|---|---|---|
| Manual | Created by hand from the UI. |
| Generated | Created by the system as part of a downstream flow. |
| Imported | Imported from an external system. |
Document Line (DocumentLine)
A single row of a document.
| Field | Description |
|---|---|
| Owning document (composite business key with |
| The 1-based line number within the document. |
| Optional line this one was derived from (final). |
| Optional line number from the external system. |
| Derived root of the source-line chain — the original line all the way at the top (business-information field). |
Functionality
Document creation and removal
DocumentWriterService.createDocument allocates a fresh Document for the supplied type / code / id / date / department. createDocumentLine adds a line under a document, optionally linking it to a source document line. removeDocumentLine deletes a line. These are the seams every document-issuing flow (sales order, purchase order, …) calls into to mint headers and rows.
Document aspect
DocumentAspectService is a reusable behaviour that sibling document submodules opt into through the DocumentViewModelAspect, DocumentEntityAspect, and DocumentLineEntityAspect interfaces. It centralizes:
Default document date on create —
afterCreateRecordsets thedocumentDateto the current execution date if the form left it blank.Number-series allocation on save —
getNumberSeriesresolves a configured view-model path to aNumberSeriesso the framework can allocate the next freedocumentCodewhen the document is saved.Document-aspect glue — additional
before-save/after-savehooks that invokeCOM_LOG_CommandApi.createFirstFreeCodewhen needed.
The pattern lets every document submodule (sales orders, purchase orders, invoices, …) share the same lifecycle without duplicating the code.
Public API
ACC_DOC_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Document by type + code, or |
| Document line by document + line number, or |
ACC_DOC_CommandApi
Write-side facade.
| Method | Description |
|---|---|
| Allocates a new |
| Adds a line to a document, optionally linked to a source line. |
| Deletes a document line. |
Document aspect extension
The submodule exposes a set of marker interfaces for other modules to implement so they can plug into the document-aspect framework:
HasDocumentLineImplemented by entities that wrap a
DocumentLine.HasSourceDocumentLineImplemented by entities that always have a non-null source document line.
HasOptionalSourceDocumentLineImplemented by entities whose source document line is optional.
DocumentEntityAspect/DocumentLineEntityAspect/DocumentViewModelAspectAspect interfaces consumed by
DocumentAspectServiceto drive default-date and number-series allocation.
ViewModel actions
The submodule defines view models for Document and DocumentLine but does not declare any custom UI actions.
title: "General Ledger (GLD)" ---
General Ledger (GLD)
The gld submodule of acc owns the chart of accounts: ledger accounts, their classification, and per-(account, company, financial-year) balance rows. It is the lookup point used by every other accounting submodule when posting amounts; the cross-module API also resolves the FinanceCompany and FinanceItemGroup rows that pin company- and item-group-specific defaults to the chart of accounts. It depends on acc.bas for the finance-company and finance-item-group rows it surfaces, on acc.bnk for the bank account a ledger account may match, on acc.cst for cost allocation, on acc.vat for the VAT code an account may default to, and on acc.jrn for journal references on accounts.
Concepts
Ledger AccountA general-ledger account in the chart of accounts. Each account has a base type (general/asset/equity/net-income/exceptional-income), a root type (
B/SorP&L), a debit/credit nature, and optional ties to bank account, VAT code, and project cost-allocation rule.Ledger Account ClassificationA reference type that groups accounts under a higher-level classification.
Ledger Account BalanceA per-(account, company, financial year) running balance. Carries the cumulative debit and credit amount in the internal currency, derived from the journal entries posted in that year (business-information fields).
Cost vs. RevenueA simple binary classifier (
COST/REVENUE) used internally when posting against an account.
Entities
Ledger Account (LedgerAccount)
A general-ledger account.
| Field | Description |
|---|---|
| Business key (a |
| Human-readable name. |
| Detailed account type — see Ledger Account Types below. |
| Whether the account is on the balance sheet ( |
| Natural debit/credit side of the account. |
| Whether posting is blocked. Default |
| Optional higher-level classification. |
| Whether the account allows invoice/payment matching. Default |
| Optional default VAT code. |
| Optional bank account this ledger account mirrors. |
| Whether project-unit allocation is optional, mandatory, or not allowed for postings. Default |
Ledger Account Base Types (LedgerAccountBaseType)
| Code | Name |
|---|---|
| General |
| Asset |
| Equity and Liability |
| Net Income |
| Exceptional Income |
Ledger Account Root Types (LedgerAccountRootType)
| Code | Name |
|---|---|
| Balance sheet |
| P&L |
Ledger Account Types (LedgerAccountType)
| Code | Name |
|---|---|
| General (P&L or B/S) |
| Fixed assets |
| Other assets |
| Accumulated depreciation |
| Inventory |
| Accounts receivable |
| Prepaid expenses |
| VAT |
| Bank |
| Cash |
| Payment services |
| Capital stock |
| Accrued expenses |
| Retained earnings |
| Long term debt |
| Accounts payable |
| Income taxes payable |
| Current portion of debt |
| Employees payable |
| Intercompany |
| Revenue |
| Cost of goods |
| Other costs |
| Sales / administrative expenses |
| Depreciation costs |
| Research and development |
| Employee costs |
| Employment costs |
| Exceptional income |
| Interest income |
| Income taxes |
| Exceptional costs |
Ledger Account Classification (LedgerAccountClassification)
A higher-level grouping of accounts.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Human-readable name. |
Ledger Account Balance (LedgerAccountBalance)
A per-(account, company, year) running balance.
| Field | Description |
|---|---|
| The account (composite business key with |
| Owning finance company. |
| Owning financial year. |
| Cumulative debit amount in the internal currency (derived). |
| Cumulative credit amount in the internal currency (derived). |
Functionality
Finance-company / item-group resolution
ACC_GLD_QueryApi exposes the optional and mandatory lookup of a FinanceCompany for a given Company, and of a FinanceItemGroup for a given ItemGroup. The mandatory variants raise a business exception when the row is missing — used by every posting flow that needs the finance-company defaults or the per-item-group ledger accounts before it can post.
Joint-venture pre-settle check
JointVentureAccountingUtil is a static helper used by posting flows to decide whether a transaction’s partner is a "presettle" partner inside a joint venture (which routes the posting through the JV pre-settle accounts instead of the regular accounts).
Public API
ACC_GLD_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Finance-company row for a company; mandatory variant raises if absent. |
| Finance-item-group row for an item group; mandatory variant raises if absent. |
ACC_GLD_CommandApi
This submodule does not provide a command API class. Ledger accounts and classifications are maintained through the standard CRUD pages, and balance rows are updated by journal-entry posting.
ViewModel actions
The submodule defines view models for LedgerAccount, LedgerAccountClassification, and LedgerAccountBalance but does not declare any custom UI actions.
title: "Journals and Journal Entries (JRN)" ---
Journals and Journal Entries (JRN)
The jrn submodule of acc is the heart of double-entry bookkeeping: it owns the journals (one per type — bank, cash, sales, purchase, memorandum), the immutable journal entries posted to those journals, and the lines (debit/credit postings against ledger accounts) that make up each entry. Every other accounting submodule routes its postings through this one. It depends on acc.bas for period gating, acc.gld for the ledger accounts, acc.bnk for bank-statement-line links, acc.doc for source-document links, acc.cst for cost-unit allocation, acc.vat for the VAT code on lines, cat.itm for the cost item, com.par / com.org for partner/company, and on the acc.inv extension interfaces (HasInvoice, HasInvoiceLine) for invoice posting.
Concepts
JournalA named ledger book of a particular type (bank, cash, sales, purchase, memorandum, system memorandum). Each journal can have a default ledger account (used for balance lookups) and a default ledger account for currency differences.
Journal EntryAn immutable transaction posted to a journal. Carries the document the entry was created for, the financial period it posts to, and the lines that balance it. Goes through
Draft→Confirmed→Posted to Ledgerlifecycle.Journal Entry LineOne debit or credit line of an entry, posting an amount in the transaction currency and the internal currency against a single ledger account, optionally tagged with partner, item, project unit, inventory unit, and VAT code.
Journal Entry ICAn intercompany journal-entry container that holds the matching ledger account on the receivable-creditor (RC) side; multiple
JournalEntryrows in different companies can share oneJournalEntryIc.Journal Entry TypeWhat kind of transaction the entry represents — invoice sent/received, invoice payment initiated/received, money spent/received, purchase receipt, sales delivery, or memorandum.
Journal Entry SourceWhether the entry was entered manually or generated by the system from a downstream flow.
Entities
Journal (Journal)
A named ledger book.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Journal type — see Journal Types below (final). |
| Human-readable name. |
| Optional default account. |
| Optional default currency. |
| Optional ledger account used to book currency differences. |
Journal Types (JournalType)
| Code | Name | Used for |
|---|---|---|
| Bank | Bank statement and outbound payment postings. |
| Cash | Cash transactions. |
| Sales | Sales-invoice and sales-delivery postings. |
| Purchase | Purchase-invoice and purchase-receipt postings. |
| Manual Memorandum | Manually entered correction/adjustment entries. |
| System Memorandum | System-generated correction/adjustment entries. |
Journal Entry (JournalEntry)
An immutable transaction posted to a journal.
| Field | Description |
|---|---|
| Business key — generated transaction id. |
| Optional intercompany container. |
| The kind of transaction — see Journal Entry Types below (final). |
| Whether the entry was entered manually or generated (final). |
| Optional document line the entry was created for (final). |
| Optional document date (final). |
| Optional document id (final). |
| Optional counter-party (final). |
| Optional originating bank-statement line (final). |
| The journal the entry posts to (set while in draft). |
| The owning finance company (set while in draft). |
| Posting date (set while in draft). |
| Free-form description (set while in draft). |
| The financial period the entry posts to (set while in draft). |
| Optional reverse-link to the entry this one reverses. |
| Optional forward-link to the entry that reverses this one. |
| Lifecycle flag. |
| Lifecycle flag. |
| Derived status — see Journal Entry Statuses below. |
A validation rule enforces that any reversal/reversed-by entry shares the partner with this one, and that the bank-statement-line’s company equals the journal company.
Journal Entry Sources (JournalEntrySource)
| Code | Name | Meaning |
|---|---|---|
| Manual | Entered by a user. |
| System | Generated by a downstream flow. |
Journal Entry Types (JournalEntryType / JournalEntryLineType)
| Code | Name | Meaning |
|---|---|---|
| Invoice Sent | Sales invoice posting. |
| Invoice Received | Purchase invoice posting. |
| Invoice Payment Initiated | Outbound payment of an invoice. |
| Invoice Payment Received | Inbound payment of an invoice. |
| Money Spent | Outbound money movement (non-invoice). |
| Money Received | Inbound money movement (non-invoice). |
| Purchase Receipt | Inventory-side posting for a purchase receipt. |
| Sales Delivery | Inventory-side posting for a sales delivery. |
| Memorandum | Manual or system memorandum. |
Journal Entry Statuses (JournalEntryStatus)
| Code | Name | Meaning |
|---|---|---|
| Draft | Editable; not yet confirmed. |
| Confirmed | Locked; ready to post to the ledger. |
| Posted to Ledger | Archived; balances have been updated. |
Journal Entry Line (JournalEntryLine)
One debit or credit line of an entry.
| Field | Description |
|---|---|
| Owning entry (composite business key with |
| Line number within the entry (a |
| Optional document line the posting is about (final). |
| The account being posted to. |
| Optional foreign currency. |
| Optional currency rate used for the conversion. |
| Optional debit amount in internal/foreign currency. |
| Optional credit amount in internal/foreign currency. |
| Optional partner the line is for. |
| Optional product item. |
| Optional quantity in the item’s UoM. |
| Optional project cost-unit. |
| Optional inventory cost-unit. |
| Optional inventory quantity. |
| Optional VAT code (informative). |
| Derived posting amount in the internal currency. |
A validation rule enforces that the line’s partner does not equal the entry’s partner (intercompany invariant) and that any inventory- or project-unit’s owning partner equals the line’s partner.
Journal Entry IC (JournalEntryIc)
An intercompany container.
| Field | Description |
|---|---|
| Business key — generated transaction id. |
| The "RC" (receivable-creditor) ledger account used as the bridge between the participating entries (final). |
| The entries that share this container. |
Functionality
Journal-entry creation
JournalEntryWriterService is the seam other modules call when they need to post. It builds a journal entry from an invoice abstraction (any type implementing acc.inv.extension.HasInvoice), populates the lines from the invoice’s lines (HasInvoiceLine), runs them through the line-completion pipeline (JournalEntryLineComplementor, JournalEntryLineBuilder), validates the resulting entry against JournalEntryValidator, and persists it. It can also remove an entry that was created for an invoice.
Validation
Three validators enforce the business invariants before an entry is allowed to confirm:
JournalEntryValidatorCross-line and journal-level checks (line count, allowed entry types per journal type, period gating, total debit/credit balance).
JournalEntryLineValidatorPer-line checks (debit/credit XOR rule, exchange-rate bounds, maximum line amount, allowed account types for the journal type).
JournalEntryIcValidatorCross-entry checks for intercompany containers.
The hard-coded bounds live in JournalConstant: exchange rate must be inside (1e-6, 999999.0), per-line amount must be ≤ 9 999 999.99, and an entry must have at most 999 lines. The same constant maps each journal type to its allowed entry types (e.g. a BNK journal accepts only IPIN, IPRC, MNSP, MNRC).
Confirm / unconfirm and post-to-ledger
The confirm and confirmUndo write actions on JournalEntryViewModel flip the entry between Draft and Confirmed. The postToLedger and postToLedgerUndo actions then move it between Confirmed and Posted-to-Ledger; posting updates the per-(account, company, year) LedgerAccountBalance rows and archives the entry. JournalEntryActionWriter is the action handler the framework dispatches to.
Public API
ACC_JRN_QueryApi and ACC_JRN_CommandApi
This submodule does not provide query- or command-API classes from its hand-written package. Other modules read journals and entries through the standard generated readers and post entries by calling JournalEntryWriterService (an internal service that other modules in the acc boundary inject).
ViewModel actions
| Action | User-visible effect |
|---|---|
| Locks a draft entry after the validators pass. |
| Reverts a confirmed entry back to draft. |
| Posts the confirmed entry to the ledger and archives it. |
| Reverts a posted entry back to confirmed. |
title: "Purchase Liabilities (LIA)" ---
Purchase Liabilities (LIA)
The lia submodule of acc owns the purchase-side counterpart of chg: each PurchaseLiability is a single line-shaped expectation that an invoice will arrive from a supplier, derived from a goods receipt or other source document. Liabilities stay Pending until matched against a PurchaseInvoiceLine, at which point any difference between expected and invoiced amount is captured as a variance. The submodule depends on acc.doc for the source document, acc.pin for the matched purchase-invoice line, acc.cst for cost-unit allocation, acc.vat for the VAT code, and com.par / com.org / com.fin / com.log / cat.itm for the line content.
Concepts
Purchase LiabilityA line-shaped expectation that a purchase invoice will arrive. Captures everything a purchase-invoice line will need: supplier, terms, item, quantity (internal and external UoM), price, currency, VAT, cost-unit allocation. Goes from Pending → Matched (when a
PurchaseInvoiceLineis linked) or Cancelled.VarianceThe difference between the expected liability amount and the actual purchase-invoice amount. Captured per liability in both transaction and internal currency.
Source Document LineThe document line that originated the liability (typically a purchase receipt) — captured both as a
DocumentLinereference and as an opaqueDocumentId.
Entities
Purchase Liability (PurchaseLiability)
A single line-shaped expectation that a purchase invoice will arrive.
| Field | Description |
|---|---|
| Business key — generated transaction id. |
| The kind of source document the liability came from. |
| Owning department (final). |
| The originating document line (final). |
| Opaque id of the source document (final). |
| Date of the liability. |
| The supplier we expect the invoice from. |
| Terms expected on the invoice. |
| Liability currency and conversion rate. |
| The product item. |
| Line description. |
| Optional external/internal references. |
| Quantity in the internal (item) UoM. |
| Quantity in the external UoM. |
| The external UoM. |
| Unit price in the external UoM. |
| The price UoM. |
| Amount in transaction currency and internal currency. |
| VAT code applied. |
| Optional cost-unit allocation. |
| Optional free-form text appended to the matched invoice line. |
| Set once the liability is matched against a |
| Derived status — see Purchase Liability Statuses below. Default |
| Difference between expected and invoiced amount in foreign currency (optional). |
| Difference between expected and invoiced amount in internal currency (optional). |
A validation rule enforces that the matched purchaseInvoiceLine agrees with the liability on VAT code, currency, and supplier.
Purchase Liability Statuses (PurchaseLiabilityStatus)
| Code | Name | Meaning |
|---|---|---|
| Pending | Liability booked, no invoice received yet. |
| Matched | Linked to a purchase-invoice line. |
| Cancelled | Cancelled before matching. |
Functionality
The submodule does not currently expose Spring services from this package — the entity is read through the standard generated PurchaseLiabilityReader and written by downstream flows (purchase receipt processing, invoice-matching) that consume the standard generated writer. Variance computation is performed by the matching flow in acc.pin.
Public API
ACC_LIA_QueryApi and ACC_LIA_CommandApi
This submodule does not provide query- or command-API classes. Other modules read liabilities through the standard generated reader and create/update them as part of the purchase-receipt or invoice-matching flow.
ViewModel actions
The submodule defines a view model for PurchaseLiability but does not declare any custom UI actions.
title: "Purchase Invoices (PIN)" ---
Purchase Invoices (PIN)
The pin submodule of acc owns the purchase invoice header (PurchaseInvoice), its lines, and the type reference data. Each PurchaseInvoiceLine rolls up the matched PurchaseLiability rows of acc.lia into a single line and links to the journal entry that posts it. The submodule depends on acc.doc for the document scaffolding, acc.lia for the matched liabilities, acc.gld for the line ledger account, acc.jrn for the journal entry, acc.vat for the VAT code, acc.pmt for payment allocations, acc.bas for terms and currency rate, and com.par/com.org/com.fin/com.log/cat.itm for the line content.
Concepts
Purchase InvoiceThe header of an inbound supplier invoice, identified by its document code. Goes through
Draft→Confirmedlifecycle; once confirmed, no edits except payment allocation.Purchase Invoice LineOne line of the invoice. Carries amounts excl./incl. VAT in foreign and internal currency, the VAT code and percentage, and the journal entry the line was posted as. A line aggregates the
PurchaseLiabilityrows it covers.Purchase Invoice TypeA reference type that names the invoice variant (e.g. "standard", "credit note") and pins the number series and default terms-of-invoice for it.
Invoice Base TypeWhether the invoice header is a debit invoice or a credit note.
Entities
Purchase Invoice Type (PurchaseInvoiceType)
A reference type for purchase invoice variants.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Human-readable name. |
| Whether invoices of this type are debit invoices or credit notes — see Invoice Base Types below. |
| Number series used to allocate document codes. |
| Default terms of invoice. |
Invoice Base Types (InvoiceBaseType)
| Code | Name | Meaning |
|---|---|---|
| Debit Invoice | Standard invoice (we owe the supplier). |
| Credit Note | Credit note (the supplier owes us). |
Purchase Invoice (PurchaseInvoice)
The invoice header.
| Field | Description |
|---|---|
| Business key — the document code. |
| Human-readable description. |
| The invoice type (drives number series and terms defaults). |
| Invoice currency and conversion rate. |
| Invoice date. |
| Owning department. |
| The supplier. |
| Terms applied to the invoice. |
| Derived from |
| Whether all lines have been matched to liabilities. Default |
| Lifecycle flag. |
| Derived status — see Invoice Statuses below. |
| Derived due date. |
| Sum of the line amounts (excl. VAT) in foreign / internal currency. |
| Sum of line VAT amounts. |
| Cumulative paid amount (incl. VAT). |
| Outstanding amount. |
| The contained lines and the payment-allocation rows that match this invoice. |
A validation rule enforces that the supplier’s company equals the department’s company.
Invoice Statuses (InvoiceStatus)
| Code | Name | Meaning |
|---|---|---|
| Draft | Editable; not yet confirmed. |
| Confirmed | Locked; payable. |
Purchase Invoice Line (PurchaseInvoiceLine)
One line of a purchase invoice.
| Field | Description |
|---|---|
| Owning invoice (composite business key with |
| Line number. |
| The product item (final). |
| Line description (final). |
| VAT code (final). |
| Optional VAT percentage applied (final). |
| Amount excluding VAT in foreign / internal currency (final). |
| VAT amount in foreign / internal currency (final). |
| Amount including VAT in foreign / internal currency (final). |
| The journal entry that posts the line (operational). |
| The ledger account the line posts to (operational). |
| The liabilities the line covers. |
| Sum of the matched liability amounts; differences are tracked as variances on the liability rows. |
Functionality
Confirm / unconfirm
The confirm and confirmUndo write actions on PurchaseInvoice flip the invoice between Draft and Confirmed. PurchaseInvoiceActionWriter is the action handler dispatched by the framework. Confirming triggers downstream posting (the matching journal entry is created via acc.jrn); unconfirming reverses that.
Public API
ACC_PIN_QueryApi and ACC_PIN_CommandApi
This submodule does not provide query- or command-API classes. Other modules read invoices through the standard generated readers and trigger confirm/unconfirm through the entity action handler (PurchaseInvoiceActionWriter).
ViewModel actions
| Action | User-visible effect |
|---|---|
| Locks a draft invoice and posts the matching journal entry. |
| Reverts a confirmed invoice back to draft and rolls back the journal entry. |
title: "Payments and Allocations (PMT)" ---
Payments and Allocations (PMT)
The pmt submodule of acc owns the payment stream — money in or money out — together with the per-invoice allocations that distribute a payment across one or more invoices. A Payment can be linked to a BankStatementLine for bank-reconciled flows or stand on its own (cash). A PaymentAllocation carries the amount allocated to a sales- or purchase-invoice line, plus any discount or write-off amount captured against a write-off ledger account. The submodule depends on acc.bnk for bank account / statement line, acc.jrn for the journal entry created on confirm, acc.sin and acc.pin for the invoices being paid, acc.gld for the write-off account, acc.doc for the matched document line, and com.par / com.org / com.fin / com.log for partner/department/currency.
Concepts
PaymentA single money movement (incoming or outgoing) entered against a partner. Goes through
Draft→Confirmed; on confirm a journal entry is created viaacc.jrnand the allocations are settled against the invoices.Payment TypeWhether the payment is incoming (we receive money) or outgoing (we pay).
Payment MethodWhether the payment moves through a bank account or cash.
Payment AllocationA line of the payment that allocates an amount to a single invoice. Captures the allocated amount in foreign and internal currency, plus any discount taken or write-off booked.
Entities
Payment (Payment)
A single money movement.
| Field | Description |
|---|---|
| Business key — the document code (final). |
| Incoming or outgoing — see Payment Types below (final). |
| Bank or cash — see Payment Methods below (final). |
| Owning department (final). |
| Owning company, derived from the department (operational, internal). |
| The counter-party. |
| Payment date. |
| Free-form description. |
| Payment currency and conversion rate. |
| Optional external reference. |
| Optional bank account (for bank payments). |
| The journal the payment posts to. |
| Optional originating bank-statement line. |
| The journal entry created on confirm. |
| Lifecycle flag. |
| Derived status — see Payment Statuses below. |
| Sum of allocations in foreign / internal currency (operational). |
| The per-invoice allocations. |
A validation rule enforces that the journal entry’s partner equals the payment’s partner.
Payment Types (PaymentType)
| Code | Name | Meaning |
|---|---|---|
| Incoming | Money received from the partner. |
| Outgoing | Money paid to the partner. |
Payment Methods (PaymentMethod)
| Code | Name | Meaning |
|---|---|---|
| Bank | Payment through a bank account. |
| Cash | Cash payment. |
Payment Statuses (PaymentStatus)
| Code | Name | Meaning |
|---|---|---|
| Draft | Editable; not yet confirmed. |
| Confirmed | Locked; journal entry has been created. |
Payment Allocation (PaymentAllocation)
A single allocation of part of a payment to one invoice.
| Field | Description |
|---|---|
| Owning payment (composite business key with |
| Line ordinal within the payment (final). |
| The matched document line (the invoice line). |
| Optional convenience reference to the sales invoice (for queries). |
| Optional convenience reference to the purchase invoice (for queries). |
| Amount allocated in the payment currency. |
| Amount allocated in the internal currency. |
| Optional discount taken on this invoice (foreign currency). |
| Optional write-off booked on this invoice (foreign currency). |
| Optional ledger account the write-off is booked to. |
Functionality
Confirm / unconfirm
The confirm and confirmUndo write actions on Payment flip the payment between Draft and Confirmed. Confirming creates the matching JournalEntry through acc.jrn and settles the allocations against the linked invoices; unconfirming reverses both.
Public API
ACC_PMT_QueryApi and ACC_PMT_CommandApi
This submodule does not provide query- or command-API classes. Other modules read payments and allocations through the standard generated readers and trigger confirm/unconfirm through the entity action handler (PaymentActionWriter).
ViewModel actions
| Action | User-visible effect |
|---|---|
| Locks a draft payment, creates the journal entry, and settles the allocations. |
| Reverts a confirmed payment back to draft and rolls back the journal entry. |
title: "Sales Invoices (SIN)" ---
Sales Invoices (SIN)
The sin submodule of acc owns the sales-invoice header, its lines, the type reference data, and the periodic invoice batch that turns a stack of BillableCharge rows into one or more invoices. A SalesInvoiceLine rolls up the matched BillableCharge rows of acc.chg and links to the journal entry that posts it. The submodule depends on acc.doc for the document scaffolding, acc.chg for the matched billable charges, acc.gld for the line ledger account, acc.jrn for the journal entry, acc.vat for the VAT code, acc.pmt for payment allocations, and com.par/com.org/com.fin for the line content.
Concepts
Sales InvoiceThe header of an outbound customer invoice, identified by its document code. Goes through
Draft→Confirmedlifecycle.Sales Invoice LineOne line of the invoice. Carries amounts excl./incl. VAT in foreign and internal currency, the VAT code and percentage, and the journal entry the line was posted as. A line aggregates the
BillableChargerows it covers.Sales Invoice TypeA reference type that names the invoice variant (e.g. "standard", "credit note") and pins the number series and default terms-of-invoice for it.
Sales Invoice BatchA periodic run that consumes pending
BillableChargerows for a billing window and emits one or more sales invoices. Goes throughPending→Completed.
Entities
Sales Invoice Type (SalesInvoiceType)
A reference type for sales-invoice variants.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Human-readable name. |
| Whether invoices of this type are debit invoices or credit notes. |
| Number series used to allocate document codes. |
| Default terms of invoice. |
Sales Invoice (SalesInvoice)
The invoice header.
| Field | Description |
|---|---|
| Business key — the document code (final). |
| Human-readable description (final). |
| The invoice type (final). |
| Invoice currency and conversion rate (final). |
| Invoice date (final). |
| Owning department (final). |
| The customer (final). |
| The postal/invoice address (final). |
| Terms applied (final). |
| The batch this invoice was emitted in (final). |
| Derived from |
| Whether all lines have been settled. Default |
| Lifecycle flag. |
| Derived status ( |
| Derived due date. |
| Sum of line amounts (excl. VAT) in foreign / internal currency. |
| Sum of line VAT amounts. |
| Cumulative paid amount. |
| Outstanding amount. |
| The lines and the payment-allocation rows for this invoice. |
A validation rule enforces that the customer’s company equals the department’s company.
Sales Invoice Line (SalesInvoiceLine)
One line of a sales invoice.
| Field | Description |
|---|---|
| Owning invoice (composite business key with |
| Line number. |
| The product item (final). |
| Line description (final). |
| VAT code and percentage (final). |
| Amount excluding VAT (final). |
| VAT amount (final). |
| Amount including VAT (final). |
| The journal entry that posts the line (operational). |
| The ledger account the line posts to (operational). |
| The billable charges the line covers. |
| Sum of the matched charge amounts. |
Sales Invoice Batch (SalesInvoiceBatch)
A periodic run that turns pending BillableCharge rows into invoices.
| Field | Description |
|---|---|
| Business key (final). |
| Owning department (final). |
| Owning company derived from the department (operational, internal). |
| Free-form description (set while pending). |
| Date the batch is run. |
| Window of charge dates picked up. |
| Daily / weekly / monthly grouping. |
| Invoice type used for emitted invoices. |
| Lifecycle flag. |
| Derived status — see Batch Statuses below. |
| Number of charges picked up by the run. |
| Number of invoices emitted. |
| The emitted invoices. |
Batch Statuses (SalesInvoiceBatchStatus)
| Code | Name | Meaning |
|---|---|---|
| Pending | Configured but not yet run. |
| Completed | Run; |
| Undone | Reverted (charges put back to Pending). |
Functionality
Confirm / unconfirm of a sales invoice
The confirm and confirmUndo write actions on SalesInvoice flip the invoice between Draft and Confirmed. Confirming triggers downstream posting (the matching journal entry is created via acc.jrn); unconfirming reverses that.
Run a sales-invoice batch
The createSalesInvoices write action on SalesInvoiceBatch consumes the BillableCharge rows pending for the configured (department, billing period, invoice frequency) and emits one or more sales invoices. Each emitted invoice points back at this batch through salesInvoiceBatch. The batch’s status moves from Pending to Completed. The action handlers for both flows (SalesInvoiceActionWriter, SalesInvoiceBatchActionWriter) are the framework dispatch targets.
Public API
ACC_SIN_QueryApi and ACC_SIN_CommandApi
This submodule does not provide query- or command-API classes. Other modules read invoices, lines, and batches through the standard generated readers and trigger confirm/unconfirm or batch run through the entity action handlers.
ViewModel actions
| Action | User-visible effect |
|---|---|
| Locks a draft invoice and posts the matching journal entry. |
| Reverts a confirmed invoice back to draft and rolls back the journal entry. |
| Picks up pending billable charges in the batch’s window and emits sales invoices for them. |
title: "VAT (VAT)" ---
VAT (VAT)
The vat submodule of acc owns the VAT/tax codes used on invoice and journal-entry lines, plus the per-(item-type, item, country) lookup table that resolves the right VAT code for a given item-and-counterparty combination. It depends on acc.gld for the VAT-to-pay and VAT-to-claim ledger accounts, and on cat.itm for the item / item-type rows that VAT codes are scoped to.
Concepts
VAT CodeA tax code with an optional VAT percentage and the two ledger accounts the VAT side of a posting routes to (one for VAT to pay, one for VAT to claim).
Item VAT CodeA lookup row keyed by (item type, item, country) that says which
VatCodeapplies. Resolution falls back from the most specific to the least specific row.
Entities
VAT Code (VatCode)
A tax code.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Human-readable name. |
| Optional VAT percentage. |
| Ledger account hit when the VAT side is a payable. |
| Ledger account hit when the VAT side is a receivable. |
Item VAT Code (ItemVatCode)
A lookup row.
| Field | Description |
|---|---|
| The item type (composite business key with |
| Optional specific item — when set, the row applies only to that item. |
| Optional counter-party country — when set, the row applies only to that country. |
| The VAT code that applies. |
Functionality
VAT-code resolution
VatCodeReaderService.getVatCode resolves the VAT code that applies to a (partner, item) or (item, country) combination. It walks the lookup table from most specific to least specific:
Match on (item, country).
Match on (item-type, country).
Match on (item-type) only.
If no row matches, the service shows a warning in the UI desktop and returns null so the caller can decide whether to proceed without a VAT code.
Public API
ACC_VAT_QueryApi and ACC_VAT_CommandApi
This submodule does not provide query- or command-API classes. Other modules read VAT codes through the standard generated readers and resolve the right code through VatCodeReaderService (an internal service).
ViewModel actions
The submodule defines view models for VatCode and ItemVatCode but does not declare any custom UI actions.
title: "Joint Ventures (VEN)" ---
Joint Ventures (VEN)
The ven submodule of acc owns the joint-venture configuration: a JointVenture is a named cooperation, and JointVenturePartner rows record each partner’s ownership percentage, interest contract, and pre-settle flag. The pre-settle flag is consulted by acc.gld’s `JointVentureAccountingUtil so a transaction’s partner can be routed through the JV pre-settle accounts. It depends on com.par for the partner / partner-address rows, and on acc.bas for the interest contract.
Concepts
Joint VentureA named cooperation between two or more partners.
Joint Venture PartnerOne partner’s stake in a joint venture: their ownership percentage, the interest contract they accrue under, the calculation type (simple or compound), and whether the partner is "pre-settle" — meaning postings against this partner inside the venture should be routed through the JV pre-settle accounts.
Entities
Joint Venture (JointVenture)
A named cooperation.
| Field | Description |
|---|---|
| Business key (a |
| Human-readable name. |
| The contained |
Joint Venture Partner (JointVenturePartner)
One partner’s stake in a joint venture.
| Field | Description |
|---|---|
| Owning venture (composite business key with |
| The partner. |
| Optional partner address; must belong to the partner (validated). |
| The partner’s ownership percentage in the venture. |
| Interest contract used to accrue interest on the partner’s balance. |
| Simple or compound interest. Default |
| Whether postings against this partner inside the venture should be routed through the JV pre-settle accounts. Default |
Functionality
Pre-settle routing
The presettle flag is the only externally observable behaviour of a JV partner. It is consulted by JointVentureAccountingUtil in acc.gld: when a posting’s partner matches a JV partner that is pre-settle, the posting is routed through the JV pre-settle ledger accounts instead of the regular accounts. The lookup is exposed through JointVentureAccountingUtil.isPresettleJointVenturePartner (and a null-safe variant).
Public API
ACC_VEN_QueryApi and ACC_VEN_CommandApi
This submodule does not provide query- or command-API classes. The configuration is read by the standard generated readers and consumed by acc.gld’s `JointVentureAccountingUtil.
ViewModel actions
The submodule defines view models for JointVenture and JointVenturePartner but does not declare any custom UI actions.