Overview
Inserts a new payroll concept intotab_conceptos with calculation rules and payment settings.
Signature
Parameters
Concept name (minimum 5 characters)
Operation indicator (TRUE for addition, FALSE for subtraction)
Payment period: ‘Q’ (quincenal/biweekly) or ‘M’ (mensual/monthly)
Indicates if concept affects net payment
Percentage value (0-100)
Fixed value amount
Indicates if concept is legally mandated
Returns
TRUE- Concept inserted successfullyFALSE- Insert failed
Example Usage
Validation Rules
- Concept name must be at least 5 characters
- Payment period must be ‘Q’ or ‘M’
- Percentage value must be between 0 and 100
- Fixed value must be positive
Error Handling
| SQL State | Description |
|---|---|
| 23505 | NULL value in ID field |
| 23514 | Value violates check constraint |
| others | Unknown error during insert |
Source
source/func/conceptos/fun_insert_conceptos.sql