Overview
Payroll concepts (tab_conceptos) define all the components that make up an employee’s compensation - both earnings (devengados) and deductions (deducidos). Each concept specifies calculation rules, whether it’s mandatory, and the payment frequency.
Concept Structure
Thetab_conceptos table contains the following fields:
| Field | Type | Description |
|---|---|---|
id_concepto | DECIMAL(2) | Unique concept identifier (1-99) |
nom_concepto | VARCHAR | Concept name (≥ 5 characters) |
ind_operacion | BOOLEAN | Operation type: TRUE = Add (earnings), FALSE = Subtract (deductions) |
ind_perio_pago | CHAR(1) | Payment frequency: ‘Q’ = Biweekly, ‘M’ = Monthly |
neto_pagado | BOOLEAN | TRUE if this represents net payment, FALSE otherwise |
val_porcent | DECIMAL(3,0) | Percentage value (0-999), 0 if not applicable |
val_fijo | DECIMAL(8,0) | Fixed amount (0-99,999,999), 0 if not applicable |
ind_legal | BOOLEAN | TRUE = Mandatory/legal concept, FALSE = Optional |
Concept Types
Mandatory vs. Optional Concepts
Concepts are categorized by theind_legal field:
- Mandatory (ind_legal = TRUE)
- Optional (ind_legal = FALSE)
Legally Required ConceptsThese concepts are automatically processed for every employee during payroll calculation:
- Basic Salary (Salario Básico)
- Transportation Subsidy (Auxilio de Transporte)
- Health Insurance - EPS (4%)
- Pension Fund - AFP (4%)
Mandatory concepts are queried and applied in the payroll calculation function:
Earnings vs. Deductions
Theind_operacion field determines how the concept affects total compensation:
Earnings (TRUE)
Concepts that add to employee compensation:
- Basic Salary
- Transportation Subsidy
- Overtime Pay
- Bonuses
- Allowances
wsum_devengado (total earnings)Deductions (FALSE)
Concepts that subtract from employee compensation:
- Health Insurance (EPS)
- Pension Fund (AFP)
- Loan Repayments
- Advances
wsum_deducido (total deductions)Calculation Methods
Concepts can be calculated using percentage, fixed value, or both:Percentage-Based Calculations
Whenval_porcent is non-zero, the concept is calculated as a percentage of the basic salary:
| Concept | ID | Percentage | Description |
|---|---|---|---|
| EPS (Health) | 3 | 4% | Monthly health insurance deduction |
| AFP (Pension) | 4 | 4% | Monthly pension fund deduction |
| Overtime - Daytime | 7 | 25% | 25% premium on hourly rate |
| Overtime - Nighttime | 8 | 75% | 75% premium on hourly rate |
| Overtime - Holiday Day | 9 | 100% | 100% premium on hourly rate |
| Overtime - Holiday Night | 10 | 150% | 150% premium on hourly rate |
Example: Calculate EPS Deduction
Example: Calculate EPS Deduction
For an employee earning $8,000,000/month:Result: 160,000/biweekly period
Fixed-Value Calculations
Whenval_fijo is non-zero, the concept uses a fixed amount:
| Concept | ID | Fixed Amount | Description |
|---|---|---|---|
| Transportation Subsidy | 2 | $200,000 | Monthly transport allowance (if eligible) |
| Special Bonus | 6 | $100,000 | Monthly bonus for achievements |
Example: Transportation Subsidy
Example: Transportation Subsidy
The transportation subsidy is a fixed amount set by government:Result: 100,000/biweekly period (only for eligible employees)
Hybrid Calculations
Some concepts could theoretically use both percentage and fixed values:Standard Concept Catalog
Mandatory Earnings (ind_legal = TRUE, ind_operacion = TRUE)
IDs 1 and 2 are special:
- ID 1 is referenced in
tab_pmtros.id_concep_sb(basic salary concept) - ID 2 is referenced in
tab_pmtros.id_concep_at(transportation concept)
Mandatory Deductions (ind_legal = TRUE, ind_operacion = FALSE)
Optional Earnings (ind_legal = FALSE, ind_operacion = TRUE)
Optional Deductions (ind_legal = FALSE, ind_operacion = FALSE)
Creating New Concepts
Use thefun_insert_conceptos() function to create new payroll concepts:
Function Signature
Example: Create Meal Allowance Concept
Determine concept parameters
- Name: “Auxilio de Alimentación” (Meal Allowance)
- Type: Earning (TRUE)
- Frequency: Monthly (‘M’)
- Not net payment (FALSE)
- Fixed amount: $150,000
- Optional (FALSE - requires novelty entry)
Example: Create Commission Concept
Updating Concepts
Usefun_update_conceptos() to modify existing concepts:
Example: Update Pension Percentage
If government changes pension contribution from 4% to 5%:Deleting Concepts
Usefun_delete_conceptos() to remove concepts:
Payment Frequency Considerations
Biweekly (‘Q’) vs Monthly (‘M’)
Theind_perio_pago field determines when the concept applies:
- Biweekly (Q)
- Monthly (M)
Applied in both payroll periods:
- Period 1 (first half of month)
- Period 2 (second half of month)
- Basic Salary (divided by 2)
- Transportation Subsidy (divided by 2)
- Overtime pay
Validation Rules
The concept table enforces several constraints:Insert Function Validations
Thefun_insert_conceptos() function includes additional validations:
Best Practices
Naming Conventions
Naming Conventions
- Use descriptive names (≥ 5 characters)
- Include concept type in name when helpful
- Be consistent with Spanish/English choice
- Examples:
- ✅ “Auxilio de Transporte”
- ✅ “Horas Extras Nocturnas”
- ❌ “AET” (too cryptic)
- ❌ “Bono” (too short)
Percentage vs Fixed
Percentage vs Fixed
- Use percentage for concepts that scale with salary:
- Health insurance
- Pension contributions
- Overtime premiums
- Use fixed value for concepts with set amounts:
- Transportation subsidy (government-mandated)
- Meal allowances
- Uniform allowances
- Set unused field to 0 (don’t leave NULL)
Mandatory vs Optional
Mandatory vs Optional
- Set
ind_legal = TRUEfor:- Government-mandated deductions
- Standard salary components
- Concepts applied to ALL employees
- Set
ind_legal = FALSEfor:- Position-specific bonuses
- Overtime (varies by employee)
- Discretionary allowances
- Loan deductions
Frequency Selection
Frequency Selection
- Use ‘M’ (Monthly) for:
- Social security deductions (EPS, AFP)
- Monthly bonuses
- Recurring monthly allowances
- Use ‘Q’ (Biweekly) for:
- Basic salary
- Transportation subsidy
- Overtime pay
- Variable earnings
Next Steps
Payroll Calculation
See how concepts are applied in payroll processing
Function Reference
Concept management functions