tables · table
CompanyConfig
The CompanyConfig table serves as a centralized policy and configuration engine within the ERP system. It defines business rules, validation constraints, and functional toggles (e.g., auto-authorizations, quantity locks, grace days) categorized by module and specific forms. It allows for company-specific behavior adjustments without changing the underlying codebase by enabling or disabling (Apply) specific ConditionName rules and providing numerical parameters (addqty).
Row count
86
Last entry
—
Source
tables
Columns
7| Column | Type | Nullable | Meaning |
|---|---|---|---|
compcode | string | NO | Unique identifier for the company/branch. |
ModuleName | string | NO | Functional module group. |
FormName | string | NO | The specific UI screen or process the rule affects. |
ConditionName | string | NO | Descriptive name of the business rule or validation. |
Apply | string | NO | Toggle indicating if the rule is active for this company. |
addqty | number | YES | Numeric parameter associated with the condition (e.g., Grace Days). |
conditioncode | string | NO | System code uniquely identifying the specific rule logic. |
Full documentation
### 1) Overview The `CompanyConfig` table serves as a centralized policy and configuration engine within the ERP system. It defines business rules, validation constraints, and functional toggles (e.g., auto-authorizations, quantity locks, grace days) categorized by module and specific forms. It allows for company-specific behavior adjustments without changing the underlying codebase by enabling or disabling (`Apply`) specific `ConditionName` rules and providing numerical parameters (`addqty`). ### 2) Column Dictionary | Column | Type | Nullable | Meaning | Allowed Values | SQL Usage | | :--- | :--- | :--- | :--- | :--- | :--- | | **compcode** | string | NO | Unique identifier for the company/branch. | e.g., 'DAS', 'BPH', 'PDS' | Primary Filter / Join Key | | **ModuleName** | string | NO | Functional module group. | CSM, PROD, RMS, SMS, VMS | Filtering by department | | **FormName** | string | NO | The specific UI screen or process the rule affects. | e.g., 'CS MRP(Prel)', 'CS PO' | Logic branching | | **ConditionName** | string | NO | Descriptive name of the business rule or validation. | e.g., 'Lock PO Qty > MRN Qty' | Business logic checks | | **Apply** | string | NO | Toggle indicating if the rule is active for this company. | 'Y', 'N' | Conditional logic (IF Apply='Y'...) | | **addqty** | number | YES | Numeric parameter associated with the condition (e.g., Grace Days). | e.g., 3.0, 90.0 | Thresholds or offsets | | **conditioncode** | string | NO | System code uniquely identifying the specific rule logic. | e.g., 'CSM0000009', 'PRD0000005' | Join key for rule definitions | ### 3) Relationships & Join Map The `CompanyConfig` table is a foundational reference table used to validate transactions across various modules. #### Logical Joins * **dbo.CompanyConfigMenu (via compcode):** Likely used to toggle visibility or behavior of menu items based on active configurations. * **dbo.Deletion_Log (via compcode, FormName):** Likely used to track if deletions are allowed on specific forms based on configuration settings. * **Global Joins (via compcode):** Joins to nearly all transactional tables (e.g., `dbo.Debithdr`, `dbo.invhdr`) to enforce company-specific logic during data entry. #### Join Example ```sql SELECT t.vouno, c.ConditionName, c.Apply FROM dbo.Debithdr t INNER JOIN dbo.CompanyConfig c ON t.compcode = c.compcode WHERE c.ModuleName = 'CSM' AND c.Apply = 'Y'; ```