Files
erp-efintel-2026-portainer/payroll/admin.py
T
2026-09-07 18:44:32 -03:00

20 lines
1.1 KiB
Python

from django.contrib import admin
from .models import EmployeeProfile, SalarySlip, PayrollCentralizationEntry
@admin.register(EmployeeProfile)
class EmployeeProfileAdmin(admin.ModelAdmin):
list_display = ('rut', 'first_name', 'last_name', 'position', 'contract_type', 'work_schedule', 'base_salary_clp', 'afp', 'health_system', 'is_active')
search_fields = ('rut', 'first_name', 'last_name', 'position')
list_filter = ('contract_type', 'work_schedule', 'afp', 'health_system', 'is_active')
@admin.register(SalarySlip)
class SalarySlipAdmin(admin.ModelAdmin):
list_display = ('employee', 'month', 'year', 'total_gross_income', 'net_salary', 'total_company_cost', 'status', 'signed_at')
search_fields = ('employee__rut', 'employee__first_name', 'employee__last_name')
list_filter = ('year', 'month', 'status')
@admin.register(PayrollCentralizationEntry)
class PayrollCentralizationEntryAdmin(admin.ModelAdmin):
list_display = ('month', 'year', 'account_code', 'total_debit', 'total_credit', 'is_balanced', 'status')
list_filter = ('year', 'month', 'is_balanced')