Organization (ORG)
The org submodule of com owns the legal-entity and internal-organization reference data: the finance companies that own inventory and balance the books, and the departments that issue purchase, sales, and production orders. It exposes a small lookup API and a static utility that other modules use to assert that two records belong to the same finance company. It depends on sys.loc for country/currency, on com.fin for default terms, on com.log for the partner number series, and is referenced by com.par whenever customers and suppliers are scoped to a company.
Concepts
Finance CompanyThe legal entity that owns inventory and to which all costs and revenues from purchase, sales, or production are assigned. Inventory is linked directly to the finance company; orders and production lines are linked to it indirectly through their department.
DepartmentAn internal organizational unit that belongs to a finance company. Departments issue purchase and sales orders; multiple departments can share the same company.
Same-company checkA pre-validation rule applied wherever two records (a department and a partner, two departments) participate in the same business operation: they must (or in some cases, must not) belong to the same finance company.
Entities
Finance Company (Company)
A legal entity that owns inventory and is the bearer of costs and revenues.
| Field | Description |
|---|---|
| Business key (up to 4 characters). |
| Internal/reporting currency (final field — set at creation, never changed). |
| Primary and optional secondary registered name. |
| Registered address. |
| Optional website URL. |
| Optional phone number. |
| Optional email address. |
| Optional Chamber-of-Commerce registration. |
| Optional VAT registration. |
| Optional default terms of payment used as a fallback for new partner records. |
| Optional default terms of delivery. |
| Optional default terms of invoice. |
| The number series allocated for partner codes that belong to this company. |
Department (Department)
An internal organizational unit within a finance company.
| Field | Description |
|---|---|
| Business key (up to 6 characters). |
| Human-readable name. |
| The finance company the department belongs to. |
| Optional number series used when this department creates documents. |
Functionality
Lookups
COM_ORG_QueryApi exposes thin lookups: getAllCompanies, getAllFinancialCompanies (currently identical), findCompanyByCode, and findDepartmentByCode. Other modules use these to resolve a code from a configuration or a request payload to the live entity.
Same-company assertions
COM_ORG_Util is a static helper used wherever a business operation requires two records to share (or not share) a finance company:
| Helper | Effect |
|---|---|
| Fails when the department and supplier belong to different companies. |
| Fails when the department and customer belong to different companies. |
| Fails when two departments belong to different companies. |
| Same as above, with a request trace for diagnostics. |
| Fails when two departments belong to the same company (used for inter-company transfers). |
Each helper raises a business exception that names the offending records.
Public API
COM_ORG_QueryApi
Read-side facade.
| Method | Description |
|---|---|
| Every finance company. |
| Currently the same as |
| Company by code, or |
| Department by code, or |
COM_ORG_CommandApi
This submodule does not provide a command API class. Companies and departments are maintained through their default CRUD pages.
COM_ORG_Util
Static utility (see Same-company assertions above).
ViewModel actions
The submodule defines view models for Company and Department but does not declare any custom UI actions.