Skip to main content
The payroll module (nóminas) provides complete employee lifecycle management, from hiring to payment processing, including bonuses, contract tracking, and detailed payment history.

Employee Management

Employee Model Overview

Each employee record includes:
FieldTypeDescription
userOneToOneFieldOptional link to system user account
nombreCharField(100)Full name
cargoCharField(100)Job title/position
salarioDecimalField(10,2)Base salary
fecha_contratacionDateFieldHire date
estadoCharFieldStatus (see below)
tipo_contratoCharFieldContract type (see below)
emailEmailFieldContact email (optional)
telefonoCharField(20)Phone number (validated format)
direccionTextFieldHome address (optional)

Employee Status Options

Employees can have one of five statuses:
  • activo: Currently working
  • inactivo: No longer employed
  • vacaciones: On vacation leave
  • permiso: Temporary leave of absence
  • suspendido: Suspended from duties

Contract Types

Supported employment arrangements:
  • tiempo_completo: Full-time employment
  • medio_tiempo: Part-time employment
  • temporal: Temporary/seasonal contract
  • por_proyecto: Project-based contract
Employees can be linked to system user accounts for access control. If linked, their role is automatically pulled from the user’s userprofile.rol.

Adding Employees

1

Navigate to Employees

Go to Nóminas > Empleados > Add Employee
2

Enter Basic Information

  • Full name (nombre)
  • Job title (cargo) - optional if linked to system user
  • Base salary (salario)
  • Hire date (fecha_contratacion)
3

Set Employment Details

  • Status: Select from activo, inactivo, etc.
  • Contract Type: Choose the employment arrangement
4

Add Contact Info

  • Email (optional)
  • Phone (format: +999999999)
  • Address (optional)
5

Link User Account (Optional)

If this employee needs system access, link their user account. This syncs their role automatically.
6

Save

The employee is created with timestamps for auditing

Managing Bonuses (Bonificaciones)

Bonuses are additional recurring or one-time payments beyond base salary.

Bonus Structure

FieldTypeDescription
empleadoForeignKeyAssociated employee
nombreCharField(100)Bonus name (e.g., “Performance Bonus”)
montoDecimalField(10,2)Bonus amount
recurrenteBooleanFieldRecurring monthly bonus?
fecha_inicioDateFieldStart date
fecha_finDateFieldEnd date (optional for ongoing)
activaBooleanFieldIs bonus currently active?
created_byForeignKeyUser who created the bonus
modified_byForeignKeyUser who last modified it

Adding a Bonus

1

Select Employee

Navigate to the employee’s detail page
2

Add Bonificación

Click Add Bonus or go to Bonificaciones > Add
3

Define Bonus Details

  • Name: Descriptive title (e.g., “Sales Commission”)
  • Amount: Bonus value
  • Recurring: Check if this bonus applies every pay period
  • Start Date: When the bonus begins
  • End Date: Optional - leave blank for ongoing bonuses
4

Activate

Ensure Active is checked to include in salary calculations
5

Save

The bonus is tracked with creation/modification audit fields
The esta_vigente property automatically checks if a bonus is currently valid based on dates and active status.

Calculating Total Salary

The employee model provides a method to calculate total compensation:
def get_salario_total(self):
    """Base salary + all active bonuses"""
    return self.salario + sum(bonificacion.monto for bonificacion in self.bonificaciones.all())

Payment Tracking (Pagos)

Record all payments made to employees:

Payment Types

  • salario: Regular salary payment
  • bono: Bonus payment
  • vacaciones: Vacation pay
  • liquidacion: Final settlement payment
  • otro: Other payment types

Recording Payments

1

Navigate to Payments

Go to Nóminas > Pagos > Add Payment
2

Select Employee

Choose the employee receiving payment
3

Enter Payment Details

  • Date: Payment date (defaults to today)
  • Amount: Payment amount
  • Type: Select payment type
  • Description: Optional notes
4

Upload Receipt (Optional)

Attach payment receipt or proof (stored in nominas/comprobantes/)
5

Save

Payment is recorded with audit trail (created_by, modified_by)

Payment Model

FieldTypeDescription
empleadoForeignKeyEmployee receiving payment
fecha_pagoDateFieldPayment date
montoDecimalField(10,2)Payment amount
tipoCharFieldPayment type (choices above)
descripcionTextFieldOptional details
comprobanteFileFieldPayment receipt file
created_byForeignKeyUser who recorded payment
modified_byForeignKeyUser who last modified
fecha_creacionDateTimeFieldCreated timestamp
fecha_modificacionDateTimeFieldLast updated timestamp
Payments are ordered by fecha_pago descending. Always verify payment dates are correct for accurate reporting.

Employee Properties

The employee model includes helpful properties:

antiguedad (Seniority)

Automatically calculates years of service:
@property
def antiguedad(self):
    """Returns years since hire date"""
    today = timezone.now().date()
    return (today - self.fecha_contratacion).days // 365

tiene_usuario (Has User)

Checks if employee has a linked system account:
@property
def tiene_usuario(self):
    return self.user is not None

usuario_activo (Active User)

Verifies if linked user account is active:
@property
def usuario_activo(self):
    return self.user and self.user.is_active if self.tiene_usuario else False

Payroll Reports

Generate comprehensive payroll reports:

Report Contents

  • Total active employees
  • Total salary commitments
  • Distribution by contract type
  • Detailed employee list with:
    • Name, position, contract type
    • Base salary
    • Years of service

Generating Payroll Reports

1

Access Reports

Navigate to Reports > Create Report
2

Select Payroll Type

Choose Type: Nóminas (Payroll)
3

Set Date Range

Define the reporting period
4

Choose Format

Select PDF for official documents or Excel for analysis
5

Generate and Export

Process the report and download in your selected format

Best Practices

Update employee status promptly when they go on leave, vacation, or are suspended to ensure accurate payroll calculations.
Always attach payment receipts (comprobante) for audit compliance and to resolve disputes.
Check active bonuses every quarter to deactivate expired ones and ensure current bonuses are accurate.
Use the antiguedad property for annual reviews, raises, and recognition programs.

Validation Rules

Bonus Date Validation: The system prevents creating bonuses where fecha_fin is before fecha_inicio. Always verify dates before saving.

Phone Number Format

Phone numbers must match the pattern: +?1?\d{9,15}$
  • Optional country code (+)
  • 9-15 digits
  • Example: +573222271308

Integration with Reports

Payroll data integrates with the general reports module:
  • Nominas Report: Detailed employee and salary breakdown
  • General Report: Includes payroll as part of operational expenses
For financial analysis, payroll expenses can be compared against sales in the General Report type.

Troubleshooting

Verify the bonus is marked as activa=True and the date range is current. Use the esta_vigente property to check validity.
Check that the payment date falls within the report period and that you’ve regenerated the report after adding payments.
Use international format with country code (e.g., +57 for Colombia). Ensure 9-15 digits total.

Next Steps: Learn about Expense Tracking and Reports.

Build docs developers (and LLMs) love