coati-payroll 0.0.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of coati-payroll might be problematic. Click here for more details.
- coati_payroll/__init__.py +415 -0
- coati_payroll/app.py +95 -0
- coati_payroll/audit_helpers.py +904 -0
- coati_payroll/auth.py +123 -0
- coati_payroll/cli.py +1318 -0
- coati_payroll/config.py +219 -0
- coati_payroll/demo_data.py +813 -0
- coati_payroll/enums.py +278 -0
- coati_payroll/forms.py +1769 -0
- coati_payroll/formula_engine/__init__.py +81 -0
- coati_payroll/formula_engine/ast/__init__.py +110 -0
- coati_payroll/formula_engine/ast/ast_visitor.py +259 -0
- coati_payroll/formula_engine/ast/expression_evaluator.py +228 -0
- coati_payroll/formula_engine/ast/safe_operators.py +131 -0
- coati_payroll/formula_engine/ast/type_converter.py +172 -0
- coati_payroll/formula_engine/data_sources.py +752 -0
- coati_payroll/formula_engine/engine.py +247 -0
- coati_payroll/formula_engine/exceptions.py +52 -0
- coati_payroll/formula_engine/execution/__init__.py +24 -0
- coati_payroll/formula_engine/execution/execution_context.py +52 -0
- coati_payroll/formula_engine/execution/step_executor.py +62 -0
- coati_payroll/formula_engine/execution/variable_store.py +59 -0
- coati_payroll/formula_engine/novelty_codes.py +206 -0
- coati_payroll/formula_engine/results/__init__.py +20 -0
- coati_payroll/formula_engine/results/execution_result.py +59 -0
- coati_payroll/formula_engine/steps/__init__.py +30 -0
- coati_payroll/formula_engine/steps/assignment_step.py +71 -0
- coati_payroll/formula_engine/steps/base_step.py +48 -0
- coati_payroll/formula_engine/steps/calculation_step.py +42 -0
- coati_payroll/formula_engine/steps/conditional_step.py +122 -0
- coati_payroll/formula_engine/steps/step_factory.py +58 -0
- coati_payroll/formula_engine/steps/tax_lookup_step.py +45 -0
- coati_payroll/formula_engine/tables/__init__.py +24 -0
- coati_payroll/formula_engine/tables/bracket_calculator.py +51 -0
- coati_payroll/formula_engine/tables/table_lookup.py +161 -0
- coati_payroll/formula_engine/tables/tax_table.py +32 -0
- coati_payroll/formula_engine/validation/__init__.py +24 -0
- coati_payroll/formula_engine/validation/schema_validator.py +37 -0
- coati_payroll/formula_engine/validation/security_validator.py +52 -0
- coati_payroll/formula_engine/validation/tax_table_validator.py +205 -0
- coati_payroll/formula_engine_examples.py +153 -0
- coati_payroll/i18n.py +54 -0
- coati_payroll/initial_data.py +613 -0
- coati_payroll/interes_engine.py +450 -0
- coati_payroll/liquidacion_engine/__init__.py +25 -0
- coati_payroll/liquidacion_engine/engine.py +267 -0
- coati_payroll/locale_config.py +165 -0
- coati_payroll/log.py +138 -0
- coati_payroll/model.py +2410 -0
- coati_payroll/nomina_engine/__init__.py +87 -0
- coati_payroll/nomina_engine/calculators/__init__.py +30 -0
- coati_payroll/nomina_engine/calculators/benefit_calculator.py +79 -0
- coati_payroll/nomina_engine/calculators/concept_calculator.py +254 -0
- coati_payroll/nomina_engine/calculators/deduction_calculator.py +105 -0
- coati_payroll/nomina_engine/calculators/exchange_rate_calculator.py +51 -0
- coati_payroll/nomina_engine/calculators/perception_calculator.py +75 -0
- coati_payroll/nomina_engine/calculators/salary_calculator.py +86 -0
- coati_payroll/nomina_engine/domain/__init__.py +27 -0
- coati_payroll/nomina_engine/domain/calculation_items.py +52 -0
- coati_payroll/nomina_engine/domain/employee_calculation.py +53 -0
- coati_payroll/nomina_engine/domain/payroll_context.py +44 -0
- coati_payroll/nomina_engine/engine.py +188 -0
- coati_payroll/nomina_engine/processors/__init__.py +28 -0
- coati_payroll/nomina_engine/processors/accounting_processor.py +171 -0
- coati_payroll/nomina_engine/processors/accumulation_processor.py +90 -0
- coati_payroll/nomina_engine/processors/loan_processor.py +227 -0
- coati_payroll/nomina_engine/processors/novelty_processor.py +42 -0
- coati_payroll/nomina_engine/processors/vacation_processor.py +67 -0
- coati_payroll/nomina_engine/repositories/__init__.py +32 -0
- coati_payroll/nomina_engine/repositories/acumulado_repository.py +83 -0
- coati_payroll/nomina_engine/repositories/base_repository.py +40 -0
- coati_payroll/nomina_engine/repositories/config_repository.py +102 -0
- coati_payroll/nomina_engine/repositories/employee_repository.py +34 -0
- coati_payroll/nomina_engine/repositories/exchange_rate_repository.py +58 -0
- coati_payroll/nomina_engine/repositories/novelty_repository.py +54 -0
- coati_payroll/nomina_engine/repositories/planilla_repository.py +52 -0
- coati_payroll/nomina_engine/results/__init__.py +24 -0
- coati_payroll/nomina_engine/results/error_result.py +28 -0
- coati_payroll/nomina_engine/results/payroll_result.py +53 -0
- coati_payroll/nomina_engine/results/validation_result.py +39 -0
- coati_payroll/nomina_engine/services/__init__.py +22 -0
- coati_payroll/nomina_engine/services/accounting_voucher_service.py +708 -0
- coati_payroll/nomina_engine/services/employee_processing_service.py +173 -0
- coati_payroll/nomina_engine/services/payroll_execution_service.py +374 -0
- coati_payroll/nomina_engine/services/snapshot_service.py +295 -0
- coati_payroll/nomina_engine/validators/__init__.py +31 -0
- coati_payroll/nomina_engine/validators/base_validator.py +48 -0
- coati_payroll/nomina_engine/validators/currency_validator.py +50 -0
- coati_payroll/nomina_engine/validators/employee_validator.py +87 -0
- coati_payroll/nomina_engine/validators/period_validator.py +44 -0
- coati_payroll/nomina_engine/validators/planilla_validator.py +136 -0
- coati_payroll/plugin_manager.py +176 -0
- coati_payroll/queue/__init__.py +33 -0
- coati_payroll/queue/driver.py +127 -0
- coati_payroll/queue/drivers/__init__.py +22 -0
- coati_payroll/queue/drivers/dramatiq_driver.py +268 -0
- coati_payroll/queue/drivers/huey_driver.py +390 -0
- coati_payroll/queue/drivers/noop_driver.py +54 -0
- coati_payroll/queue/selector.py +121 -0
- coati_payroll/queue/tasks.py +764 -0
- coati_payroll/rate_limiting.py +83 -0
- coati_payroll/rbac.py +183 -0
- coati_payroll/report_engine.py +512 -0
- coati_payroll/report_export.py +208 -0
- coati_payroll/schema_validator.py +167 -0
- coati_payroll/security.py +77 -0
- coati_payroll/static/styles.css +1044 -0
- coati_payroll/system_reports.py +573 -0
- coati_payroll/templates/auth/login.html +189 -0
- coati_payroll/templates/base.html +283 -0
- coati_payroll/templates/index.html +227 -0
- coati_payroll/templates/macros.html +146 -0
- coati_payroll/templates/modules/calculation_rule/form.html +78 -0
- coati_payroll/templates/modules/calculation_rule/index.html +102 -0
- coati_payroll/templates/modules/calculation_rule/schema_editor.html +1159 -0
- coati_payroll/templates/modules/carga_inicial_prestacion/form.html +170 -0
- coati_payroll/templates/modules/carga_inicial_prestacion/index.html +170 -0
- coati_payroll/templates/modules/carga_inicial_prestacion/reporte.html +193 -0
- coati_payroll/templates/modules/config_calculos/index.html +44 -0
- coati_payroll/templates/modules/configuracion/index.html +90 -0
- coati_payroll/templates/modules/currency/form.html +47 -0
- coati_payroll/templates/modules/currency/index.html +64 -0
- coati_payroll/templates/modules/custom_field/form.html +62 -0
- coati_payroll/templates/modules/custom_field/index.html +78 -0
- coati_payroll/templates/modules/deduccion/form.html +1 -0
- coati_payroll/templates/modules/deduccion/index.html +1 -0
- coati_payroll/templates/modules/employee/form.html +254 -0
- coati_payroll/templates/modules/employee/index.html +76 -0
- coati_payroll/templates/modules/empresa/form.html +74 -0
- coati_payroll/templates/modules/empresa/index.html +71 -0
- coati_payroll/templates/modules/exchange_rate/form.html +47 -0
- coati_payroll/templates/modules/exchange_rate/import.html +93 -0
- coati_payroll/templates/modules/exchange_rate/index.html +114 -0
- coati_payroll/templates/modules/liquidacion/index.html +58 -0
- coati_payroll/templates/modules/liquidacion/nueva.html +51 -0
- coati_payroll/templates/modules/liquidacion/ver.html +91 -0
- coati_payroll/templates/modules/payroll_concepts/audit_log.html +146 -0
- coati_payroll/templates/modules/percepcion/form.html +1 -0
- coati_payroll/templates/modules/percepcion/index.html +1 -0
- coati_payroll/templates/modules/planilla/config.html +190 -0
- coati_payroll/templates/modules/planilla/config_deducciones.html +129 -0
- coati_payroll/templates/modules/planilla/config_empleados.html +116 -0
- coati_payroll/templates/modules/planilla/config_percepciones.html +113 -0
- coati_payroll/templates/modules/planilla/config_prestaciones.html +118 -0
- coati_payroll/templates/modules/planilla/config_reglas.html +120 -0
- coati_payroll/templates/modules/planilla/ejecutar_nomina.html +106 -0
- coati_payroll/templates/modules/planilla/form.html +197 -0
- coati_payroll/templates/modules/planilla/index.html +144 -0
- coati_payroll/templates/modules/planilla/listar_nominas.html +91 -0
- coati_payroll/templates/modules/planilla/log_nomina.html +135 -0
- coati_payroll/templates/modules/planilla/novedades/form.html +177 -0
- coati_payroll/templates/modules/planilla/novedades/index.html +170 -0
- coati_payroll/templates/modules/planilla/ver_nomina.html +477 -0
- coati_payroll/templates/modules/planilla/ver_nomina_empleado.html +231 -0
- coati_payroll/templates/modules/plugins/index.html +71 -0
- coati_payroll/templates/modules/prestacion/form.html +1 -0
- coati_payroll/templates/modules/prestacion/index.html +1 -0
- coati_payroll/templates/modules/prestacion_management/dashboard.html +150 -0
- coati_payroll/templates/modules/prestacion_management/initial_balance_bulk.html +195 -0
- coati_payroll/templates/modules/prestamo/approve.html +156 -0
- coati_payroll/templates/modules/prestamo/condonacion.html +249 -0
- coati_payroll/templates/modules/prestamo/detail.html +443 -0
- coati_payroll/templates/modules/prestamo/form.html +203 -0
- coati_payroll/templates/modules/prestamo/index.html +150 -0
- coati_payroll/templates/modules/prestamo/pago_extraordinario.html +211 -0
- coati_payroll/templates/modules/prestamo/tabla_pago_pdf.html +181 -0
- coati_payroll/templates/modules/report/admin_index.html +125 -0
- coati_payroll/templates/modules/report/detail.html +129 -0
- coati_payroll/templates/modules/report/execute.html +266 -0
- coati_payroll/templates/modules/report/index.html +95 -0
- coati_payroll/templates/modules/report/permissions.html +64 -0
- coati_payroll/templates/modules/settings/index.html +274 -0
- coati_payroll/templates/modules/shared/concept_form.html +201 -0
- coati_payroll/templates/modules/shared/concept_index.html +145 -0
- coati_payroll/templates/modules/tipo_planilla/form.html +70 -0
- coati_payroll/templates/modules/tipo_planilla/index.html +68 -0
- coati_payroll/templates/modules/user/form.html +65 -0
- coati_payroll/templates/modules/user/index.html +76 -0
- coati_payroll/templates/modules/user/profile.html +81 -0
- coati_payroll/templates/modules/vacation/account_detail.html +149 -0
- coati_payroll/templates/modules/vacation/account_form.html +52 -0
- coati_payroll/templates/modules/vacation/account_index.html +68 -0
- coati_payroll/templates/modules/vacation/dashboard.html +156 -0
- coati_payroll/templates/modules/vacation/initial_balance_bulk.html +149 -0
- coati_payroll/templates/modules/vacation/initial_balance_form.html +93 -0
- coati_payroll/templates/modules/vacation/leave_request_detail.html +158 -0
- coati_payroll/templates/modules/vacation/leave_request_form.html +61 -0
- coati_payroll/templates/modules/vacation/leave_request_index.html +98 -0
- coati_payroll/templates/modules/vacation/policy_detail.html +176 -0
- coati_payroll/templates/modules/vacation/policy_form.html +152 -0
- coati_payroll/templates/modules/vacation/policy_index.html +79 -0
- coati_payroll/templates/modules/vacation/register_taken_form.html +178 -0
- coati_payroll/translations/en/LC_MESSAGES/messages.mo +0 -0
- coati_payroll/translations/en/LC_MESSAGES/messages.po +7283 -0
- coati_payroll/translations/es/LC_MESSAGES/messages.mo +0 -0
- coati_payroll/translations/es/LC_MESSAGES/messages.po +7374 -0
- coati_payroll/vacation_service.py +451 -0
- coati_payroll/version.py +18 -0
- coati_payroll/vistas/__init__.py +64 -0
- coati_payroll/vistas/calculation_rule.py +307 -0
- coati_payroll/vistas/carga_inicial_prestacion.py +423 -0
- coati_payroll/vistas/config_calculos.py +72 -0
- coati_payroll/vistas/configuracion.py +87 -0
- coati_payroll/vistas/constants.py +17 -0
- coati_payroll/vistas/currency.py +112 -0
- coati_payroll/vistas/custom_field.py +120 -0
- coati_payroll/vistas/employee.py +305 -0
- coati_payroll/vistas/empresa.py +153 -0
- coati_payroll/vistas/exchange_rate.py +341 -0
- coati_payroll/vistas/liquidacion.py +205 -0
- coati_payroll/vistas/payroll_concepts.py +580 -0
- coati_payroll/vistas/planilla/__init__.py +38 -0
- coati_payroll/vistas/planilla/association_routes.py +238 -0
- coati_payroll/vistas/planilla/config_routes.py +158 -0
- coati_payroll/vistas/planilla/export_routes.py +175 -0
- coati_payroll/vistas/planilla/helpers/__init__.py +34 -0
- coati_payroll/vistas/planilla/helpers/association_helpers.py +161 -0
- coati_payroll/vistas/planilla/helpers/excel_helpers.py +29 -0
- coati_payroll/vistas/planilla/helpers/form_helpers.py +97 -0
- coati_payroll/vistas/planilla/nomina_routes.py +488 -0
- coati_payroll/vistas/planilla/novedad_routes.py +227 -0
- coati_payroll/vistas/planilla/routes.py +145 -0
- coati_payroll/vistas/planilla/services/__init__.py +26 -0
- coati_payroll/vistas/planilla/services/export_service.py +687 -0
- coati_payroll/vistas/planilla/services/nomina_service.py +233 -0
- coati_payroll/vistas/planilla/services/novedad_service.py +126 -0
- coati_payroll/vistas/planilla/services/planilla_service.py +34 -0
- coati_payroll/vistas/planilla/validators/__init__.py +18 -0
- coati_payroll/vistas/planilla/validators/planilla_validators.py +40 -0
- coati_payroll/vistas/plugins.py +45 -0
- coati_payroll/vistas/prestacion.py +272 -0
- coati_payroll/vistas/prestamo.py +808 -0
- coati_payroll/vistas/report.py +432 -0
- coati_payroll/vistas/settings.py +29 -0
- coati_payroll/vistas/tipo_planilla.py +134 -0
- coati_payroll/vistas/user.py +172 -0
- coati_payroll/vistas/vacation.py +1045 -0
- coati_payroll-0.0.2.dist-info/LICENSE +201 -0
- coati_payroll-0.0.2.dist-info/METADATA +581 -0
- coati_payroll-0.0.2.dist-info/RECORD +243 -0
- coati_payroll-0.0.2.dist-info/WHEEL +5 -0
- coati_payroll-0.0.2.dist-info/entry_points.txt +2 -0
- coati_payroll-0.0.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block content %}
|
|
4
|
+
<div class="container-fluid">
|
|
5
|
+
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
6
|
+
<h2>
|
|
7
|
+
<i class="bi bi-calculator me-2"></i>
|
|
8
|
+
{% if is_edit %}{{ _('Editar Planilla') }}{% else %}{{ _('Nueva Planilla') }}{% endif %}
|
|
9
|
+
</h2>
|
|
10
|
+
<div>
|
|
11
|
+
{% if is_edit %}
|
|
12
|
+
<a href="{{ url_for('planilla.config', planilla_id=planilla.id) }}" class="btn btn-outline-primary me-2">
|
|
13
|
+
<i class="bi bi-gear me-1"></i>{{ _('Ver Configuración') }}
|
|
14
|
+
</a>
|
|
15
|
+
{% endif %}
|
|
16
|
+
<a href="{{ url_for('planilla.index') }}" class="btn btn-outline-secondary">
|
|
17
|
+
<i class="bi bi-arrow-left me-1"></i>{{ _('Volver') }}
|
|
18
|
+
</a>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
23
|
+
{% if messages %}
|
|
24
|
+
{% for category, message in messages %}
|
|
25
|
+
<div class="alert alert-{{ 'danger' if category == 'error' else category }} alert-dismissible fade show" role="alert">
|
|
26
|
+
{{ message }}
|
|
27
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
28
|
+
</div>
|
|
29
|
+
{% endfor %}
|
|
30
|
+
{% endif %}
|
|
31
|
+
{% endwith %}
|
|
32
|
+
|
|
33
|
+
<div class="row">
|
|
34
|
+
<!-- Main Form Column -->
|
|
35
|
+
<div class="col-lg-8">
|
|
36
|
+
<div class="card shadow-sm mb-4">
|
|
37
|
+
<div class="card-header bg-coaty-light">
|
|
38
|
+
<h5 class="mb-0"><i class="bi bi-gear me-2"></i>{{ _('Configuración General') }}</h5>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="card-body">
|
|
41
|
+
<form method="POST">
|
|
42
|
+
{{ form.hidden_tag() }}
|
|
43
|
+
|
|
44
|
+
<div class="row">
|
|
45
|
+
<div class="col-md-8 mb-3">
|
|
46
|
+
{{ form.nombre.label(class="form-label") }}
|
|
47
|
+
{{ form.nombre(class="form-control" + (" is-invalid" if form.nombre.errors else "")) }}
|
|
48
|
+
{% if form.nombre.description %}
|
|
49
|
+
<div class="form-text">{{ form.nombre.description }}</div>
|
|
50
|
+
{% endif %}
|
|
51
|
+
{% for error in form.nombre.errors %}
|
|
52
|
+
<div class="invalid-feedback">{{ error }}</div>
|
|
53
|
+
{% endfor %}
|
|
54
|
+
</div>
|
|
55
|
+
<div class="col-md-4 mb-3">
|
|
56
|
+
<label class="form-label"> </label>
|
|
57
|
+
<div class="form-check mt-2">
|
|
58
|
+
{{ form.activo(class="form-check-input") }}
|
|
59
|
+
{{ form.activo.label(class="form-check-label") }}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
|
|
64
|
+
<div class="mb-3">
|
|
65
|
+
{{ form.descripcion.label(class="form-label") }}
|
|
66
|
+
{{ form.descripcion(class="form-control") }}
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<div class="row">
|
|
70
|
+
<div class="col-md-4 mb-3">
|
|
71
|
+
{{ form.tipo_planilla_id.label(class="form-label") }}
|
|
72
|
+
{{ form.tipo_planilla_id(class="form-select" + (" is-invalid" if form.tipo_planilla_id.errors else "")) }}
|
|
73
|
+
{% if form.tipo_planilla_id.description %}
|
|
74
|
+
<div class="form-text">{{ form.tipo_planilla_id.description }}</div>
|
|
75
|
+
{% endif %}
|
|
76
|
+
{% for error in form.tipo_planilla_id.errors %}
|
|
77
|
+
<div class="invalid-feedback">{{ error }}</div>
|
|
78
|
+
{% endfor %}
|
|
79
|
+
</div>
|
|
80
|
+
<div class="col-md-4 mb-3">
|
|
81
|
+
{{ form.moneda_id.label(class="form-label") }}
|
|
82
|
+
{{ form.moneda_id(class="form-select" + (" is-invalid" if form.moneda_id.errors else "")) }}
|
|
83
|
+
{% if form.moneda_id.description %}
|
|
84
|
+
<div class="form-text">{{ form.moneda_id.description }}</div>
|
|
85
|
+
{% endif %}
|
|
86
|
+
{% for error in form.moneda_id.errors %}
|
|
87
|
+
<div class="invalid-feedback">{{ error }}</div>
|
|
88
|
+
{% endfor %}
|
|
89
|
+
</div>
|
|
90
|
+
<div class="col-md-4 mb-3">
|
|
91
|
+
{{ form.empresa_id.label(class="form-label") }}
|
|
92
|
+
{{ form.empresa_id(class="form-select" + (" is-invalid" if form.empresa_id.errors else "")) }}
|
|
93
|
+
{% if form.empresa_id.description %}
|
|
94
|
+
<div class="form-text">{{ form.empresa_id.description }}</div>
|
|
95
|
+
{% endif %}
|
|
96
|
+
{% for error in form.empresa_id.errors %}
|
|
97
|
+
<div class="invalid-feedback">{{ error }}</div>
|
|
98
|
+
{% endfor %}
|
|
99
|
+
</div>
|
|
100
|
+
</div>
|
|
101
|
+
|
|
102
|
+
<div class="row">
|
|
103
|
+
<div class="col-md-6 mb-3">
|
|
104
|
+
{{ form.periodo_fiscal_inicio.label(class="form-label") }}
|
|
105
|
+
{{ form.periodo_fiscal_inicio(class="form-control", type="date") }}
|
|
106
|
+
{% if form.periodo_fiscal_inicio.description %}
|
|
107
|
+
<div class="form-text">{{ form.periodo_fiscal_inicio.description }}</div>
|
|
108
|
+
{% endif %}
|
|
109
|
+
</div>
|
|
110
|
+
<div class="col-md-6 mb-3">
|
|
111
|
+
{{ form.periodo_fiscal_fin.label(class="form-label") }}
|
|
112
|
+
{{ form.periodo_fiscal_fin(class="form-control", type="date") }}
|
|
113
|
+
{% if form.periodo_fiscal_fin.description %}
|
|
114
|
+
<div class="form-text">{{ form.periodo_fiscal_fin.description }}</div>
|
|
115
|
+
{% endif %}
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
|
|
119
|
+
<hr class="my-4">
|
|
120
|
+
<h6 class="text-muted mb-3"><i class="bi bi-lightning me-2"></i>{{ _('Deducciones Automáticas') }}</h6>
|
|
121
|
+
|
|
122
|
+
<div class="row">
|
|
123
|
+
<div class="col-md-6 mb-3">
|
|
124
|
+
<div class="form-check mb-2">
|
|
125
|
+
{{ form.aplicar_prestamos_automatico(class="form-check-input") }}
|
|
126
|
+
{{ form.aplicar_prestamos_automatico.label(class="form-check-label") }}
|
|
127
|
+
</div>
|
|
128
|
+
{{ form.prioridad_prestamos.label(class="form-label") }}
|
|
129
|
+
{{ form.prioridad_prestamos(class="form-control", placeholder="250") }}
|
|
130
|
+
{% if form.prioridad_prestamos.description %}
|
|
131
|
+
<div class="form-text">{{ form.prioridad_prestamos.description }}</div>
|
|
132
|
+
{% endif %}
|
|
133
|
+
</div>
|
|
134
|
+
<div class="col-md-6 mb-3">
|
|
135
|
+
<div class="form-check mb-2">
|
|
136
|
+
{{ form.aplicar_adelantos_automatico(class="form-check-input") }}
|
|
137
|
+
{{ form.aplicar_adelantos_automatico.label(class="form-check-label") }}
|
|
138
|
+
</div>
|
|
139
|
+
{{ form.prioridad_adelantos.label(class="form-label") }}
|
|
140
|
+
{{ form.prioridad_adelantos(class="form-control", placeholder="251") }}
|
|
141
|
+
{% if form.prioridad_adelantos.description %}
|
|
142
|
+
<div class="form-text">{{ form.prioridad_adelantos.description }}</div>
|
|
143
|
+
{% endif %}
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
|
|
147
|
+
<div class="d-grid gap-2 d-md-flex justify-content-md-end mt-4">
|
|
148
|
+
<a href="{{ url_for('planilla.index') }}" class="btn btn-outline-secondary">{{ _('Cancelar') }}</a>
|
|
149
|
+
{{ form.submit(class="btn btn-coaty") }}
|
|
150
|
+
</div>
|
|
151
|
+
</form>
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
|
|
156
|
+
{% if is_edit %}
|
|
157
|
+
<!-- Associations Summary Column -->
|
|
158
|
+
<div class="col-lg-4">
|
|
159
|
+
<div class="card shadow-sm">
|
|
160
|
+
<div class="card-header bg-coaty-light">
|
|
161
|
+
<h5 class="mb-0"><i class="bi bi-diagram-3 me-2"></i>{{ _('Componentes Asignados') }}</h5>
|
|
162
|
+
</div>
|
|
163
|
+
<div class="card-body">
|
|
164
|
+
<ul class="list-group list-group-flush">
|
|
165
|
+
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
166
|
+
<span><i class="bi bi-people me-2 text-primary"></i>{{ _('Empleados') }}</span>
|
|
167
|
+
<span class="badge bg-primary rounded-pill">{{ empleados_count }}</span>
|
|
168
|
+
</li>
|
|
169
|
+
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
170
|
+
<span><i class="bi bi-plus-circle me-2 text-success"></i>{{ _('Percepciones') }}</span>
|
|
171
|
+
<span class="badge bg-success rounded-pill">{{ percepciones_count }}</span>
|
|
172
|
+
</li>
|
|
173
|
+
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
174
|
+
<span><i class="bi bi-dash-circle me-2 text-danger"></i>{{ _('Deducciones') }}</span>
|
|
175
|
+
<span class="badge bg-danger rounded-pill">{{ deducciones_count }}</span>
|
|
176
|
+
</li>
|
|
177
|
+
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
178
|
+
<span><i class="bi bi-gift me-2 text-info"></i>{{ _('Prestaciones') }}</span>
|
|
179
|
+
<span class="badge bg-info rounded-pill">{{ prestaciones_count }}</span>
|
|
180
|
+
</li>
|
|
181
|
+
<li class="list-group-item d-flex justify-content-between align-items-center">
|
|
182
|
+
<span><i class="bi bi-code-square me-2 text-warning"></i>{{ _('Reglas') }}</span>
|
|
183
|
+
<span class="badge bg-warning text-dark rounded-pill">{{ reglas_count }}</span>
|
|
184
|
+
</li>
|
|
185
|
+
</ul>
|
|
186
|
+
<div class="d-grid mt-3">
|
|
187
|
+
<a href="{{ url_for('planilla.config', planilla_id=planilla.id) }}" class="btn btn-outline-primary">
|
|
188
|
+
<i class="bi bi-gear me-1"></i>{{ _('Gestionar Componentes') }}
|
|
189
|
+
</a>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
</div>
|
|
194
|
+
{% endif %}
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
{% endblock %}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
|
|
3
|
+
{% block content %}
|
|
4
|
+
<div class="container-fluid">
|
|
5
|
+
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
6
|
+
<h2><i class="bi bi-calculator me-2"></i>{{ _('Planillas') }}</h2>
|
|
7
|
+
<a href="{{ url_for('planilla.new') }}" class="btn btn-coaty">
|
|
8
|
+
<i class="bi bi-plus-circle me-1"></i>{{ _('Nueva Planilla') }}
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
13
|
+
{% if messages %}
|
|
14
|
+
{% for category, message in messages %}
|
|
15
|
+
<div class="alert alert-{{ 'danger' if category == 'error' else category }} alert-dismissible fade show" role="alert">
|
|
16
|
+
{{ message }}
|
|
17
|
+
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
18
|
+
</div>
|
|
19
|
+
{% endfor %}
|
|
20
|
+
{% endif %}
|
|
21
|
+
{% endwith %}
|
|
22
|
+
|
|
23
|
+
<div class="card shadow-sm">
|
|
24
|
+
<div class="card-body">
|
|
25
|
+
{% if planillas %}
|
|
26
|
+
<div class="table-responsive">
|
|
27
|
+
<table class="table table-hover align-middle">
|
|
28
|
+
<thead class="table-light">
|
|
29
|
+
<tr>
|
|
30
|
+
<th>{{ _('Nombre') }}</th>
|
|
31
|
+
<th>{{ _('Tipo') }}</th>
|
|
32
|
+
<th>{{ _('Moneda') }}</th>
|
|
33
|
+
<th class="text-center">{{ _('Empleados') }}</th>
|
|
34
|
+
<th class="text-center">{{ _('Percepciones') }}</th>
|
|
35
|
+
<th class="text-center">{{ _('Deducciones') }}</th>
|
|
36
|
+
<th class="text-center">{{ _('Prestaciones') }}</th>
|
|
37
|
+
<th class="text-center">{{ _('Activo') }}</th>
|
|
38
|
+
<th class="text-end">{{ _('Acciones') }}</th>
|
|
39
|
+
</tr>
|
|
40
|
+
</thead>
|
|
41
|
+
<tbody>
|
|
42
|
+
{% for planilla in planillas %}
|
|
43
|
+
<tr>
|
|
44
|
+
<td>
|
|
45
|
+
<strong>{{ planilla.nombre }}</strong>
|
|
46
|
+
{% if planilla.descripcion %}
|
|
47
|
+
<br><small class="text-muted">{{ planilla.descripcion }}</small>
|
|
48
|
+
{% endif %}
|
|
49
|
+
</td>
|
|
50
|
+
<td>
|
|
51
|
+
{% if planilla.tipo_planilla %}
|
|
52
|
+
{{ planilla.tipo_planilla.codigo }}
|
|
53
|
+
{% else %}
|
|
54
|
+
<span class="text-muted">-</span>
|
|
55
|
+
{% endif %}
|
|
56
|
+
</td>
|
|
57
|
+
<td>
|
|
58
|
+
{% if planilla.moneda %}
|
|
59
|
+
{{ planilla.moneda.codigo }}
|
|
60
|
+
{% else %}
|
|
61
|
+
<span class="text-muted">-</span>
|
|
62
|
+
{% endif %}
|
|
63
|
+
</td>
|
|
64
|
+
<td class="text-center">
|
|
65
|
+
<span class="text-muted">{{ planilla.planilla_empleados | length }}</span>
|
|
66
|
+
</td>
|
|
67
|
+
<td class="text-center">
|
|
68
|
+
<span class="text-muted">{{ planilla.planilla_percepciones | length }}</span>
|
|
69
|
+
</td>
|
|
70
|
+
<td class="text-center">
|
|
71
|
+
<span class="text-muted">{{ planilla.planilla_deducciones | length }}</span>
|
|
72
|
+
</td>
|
|
73
|
+
<td class="text-center">
|
|
74
|
+
<span class="text-muted">{{ planilla.planilla_prestaciones | length }}</span>
|
|
75
|
+
</td>
|
|
76
|
+
<td class="text-center">
|
|
77
|
+
{% if planilla.activo %}
|
|
78
|
+
<span class="badge bg-success">{{ _('Sí') }}</span>
|
|
79
|
+
{% else %}
|
|
80
|
+
<span class="badge bg-secondary">{{ _('No') }}</span>
|
|
81
|
+
{% endif %}
|
|
82
|
+
</td>
|
|
83
|
+
<td class="text-end">
|
|
84
|
+
<div class="btn-group btn-group-sm">
|
|
85
|
+
<a href="{{ url_for('planilla.ejecutar_nomina', planilla_id=planilla.id) }}"
|
|
86
|
+
class="btn btn-outline-primary" title="{{ _('Ejecutar Nómina') }}">
|
|
87
|
+
<i class="bi bi-play-fill"></i>
|
|
88
|
+
</a>
|
|
89
|
+
<a href="{{ url_for('planilla.listar_nominas', planilla_id=planilla.id) }}"
|
|
90
|
+
class="btn btn-outline-primary" title="{{ _('Ver Nóminas') }}">
|
|
91
|
+
<i class="bi bi-list-ul"></i>
|
|
92
|
+
</a>
|
|
93
|
+
<a href="{{ url_for('planilla.edit', planilla_id=planilla.id) }}"
|
|
94
|
+
class="btn btn-outline-primary" title="{{ _('Editar') }}">
|
|
95
|
+
<i class="bi bi-pencil"></i>
|
|
96
|
+
</a>
|
|
97
|
+
<button type="button" class="btn btn-outline-danger"
|
|
98
|
+
title="{{ _('Eliminar') }}"
|
|
99
|
+
data-bs-toggle="modal"
|
|
100
|
+
data-bs-target="#deleteModal{{ planilla.id }}">
|
|
101
|
+
<i class="bi bi-trash"></i>
|
|
102
|
+
</button>
|
|
103
|
+
</div>
|
|
104
|
+
|
|
105
|
+
<!-- Delete Modal -->
|
|
106
|
+
<div class="modal fade" id="deleteModal{{ planilla.id }}" tabindex="-1">
|
|
107
|
+
<div class="modal-dialog">
|
|
108
|
+
<div class="modal-content">
|
|
109
|
+
<div class="modal-header">
|
|
110
|
+
<h5 class="modal-title">{{ _('Confirmar eliminación') }}</h5>
|
|
111
|
+
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
|
112
|
+
</div>
|
|
113
|
+
<div class="modal-body text-start">
|
|
114
|
+
<p>{{ _('¿Está seguro que desea eliminar la planilla') }} <strong>{{ planilla.nombre }}</strong>?</p>
|
|
115
|
+
<p class="text-danger"><small>{{ _('Esta acción no se puede deshacer.') }}</small></p>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="modal-footer">
|
|
118
|
+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{{ _('Cancelar') }}</button>
|
|
119
|
+
<form action="{{ url_for('planilla.delete', planilla_id=planilla.id) }}" method="POST" class="d-inline">
|
|
120
|
+
<button type="submit" class="btn btn-danger">{{ _('Eliminar') }}</button>
|
|
121
|
+
</form>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
</div>
|
|
126
|
+
</td>
|
|
127
|
+
</tr>
|
|
128
|
+
{% endfor %}
|
|
129
|
+
</tbody>
|
|
130
|
+
</table>
|
|
131
|
+
</div>
|
|
132
|
+
{% else %}
|
|
133
|
+
<div class="text-center py-5">
|
|
134
|
+
<i class="bi bi-calculator display-1 text-muted"></i>
|
|
135
|
+
<p class="lead mt-3">{{ _('No hay planillas registradas') }}</p>
|
|
136
|
+
<a href="{{ url_for('planilla.new') }}" class="btn btn-coaty">
|
|
137
|
+
<i class="bi bi-plus-circle me-1"></i>{{ _('Crear Primera Planilla') }}
|
|
138
|
+
</a>
|
|
139
|
+
</div>
|
|
140
|
+
{% endif %}
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
{% endblock %}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
{% block content %}
|
|
3
|
+
<div class="content-header">
|
|
4
|
+
<h3>Historial de Nóminas: {{ planilla.nombre }}</h3>
|
|
5
|
+
<div>
|
|
6
|
+
<a href="{{ url_for('planilla.edit', planilla_id=planilla.id) }}" class="btn btn-secondary">
|
|
7
|
+
<i class="fas fa-arrow-left"></i> Volver a Planilla
|
|
8
|
+
</a>
|
|
9
|
+
<a href="{{ url_for('planilla.ejecutar_nomina', planilla_id=planilla.id) }}" class="btn btn-primary">
|
|
10
|
+
<i class="fas fa-play"></i> Nueva Ejecución
|
|
11
|
+
</a>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="card">
|
|
16
|
+
<div class="card-body">
|
|
17
|
+
{% if nominas %}
|
|
18
|
+
<table class="table table-striped table-hover">
|
|
19
|
+
<thead>
|
|
20
|
+
<tr>
|
|
21
|
+
<th>Período</th>
|
|
22
|
+
<th>Fecha Generación</th>
|
|
23
|
+
<th>Estado</th>
|
|
24
|
+
<th class="text-right">Total Bruto</th>
|
|
25
|
+
<th class="text-right">Total Deducciones</th>
|
|
26
|
+
<th class="text-right">Total Neto</th>
|
|
27
|
+
<th>Generado Por</th>
|
|
28
|
+
<th>Acciones</th>
|
|
29
|
+
</tr>
|
|
30
|
+
</thead>
|
|
31
|
+
<tbody>
|
|
32
|
+
{% for nomina in nominas %}
|
|
33
|
+
<tr>
|
|
34
|
+
<td>
|
|
35
|
+
{{ nomina.periodo_inicio.strftime('%d/%m/%Y') }} -
|
|
36
|
+
{{ nomina.periodo_fin.strftime('%d/%m/%Y') }}
|
|
37
|
+
</td>
|
|
38
|
+
<td>{{ nomina.fecha_generacion.strftime('%d/%m/%Y %H:%M') }}</td>
|
|
39
|
+
<td>
|
|
40
|
+
{% if nomina.estado == 'calculando' %}
|
|
41
|
+
<span class="badge bg-primary">
|
|
42
|
+
<i class="fas fa-spinner fa-spin"></i> Calculando
|
|
43
|
+
{% if nomina.total_empleados and nomina.total_empleados > 0 %}
|
|
44
|
+
({{ nomina.empleados_procesados }}/{{ nomina.total_empleados }})
|
|
45
|
+
{% endif %}
|
|
46
|
+
</span>
|
|
47
|
+
{% elif nomina.estado == 'generado' %}
|
|
48
|
+
<span class="badge bg-warning">Generado</span>
|
|
49
|
+
{% elif nomina.estado == 'aprobado' %}
|
|
50
|
+
<span class="badge bg-info">Aprobado</span>
|
|
51
|
+
{% elif nomina.estado == 'aplicado' %}
|
|
52
|
+
<span class="badge bg-success">Aplicado</span>
|
|
53
|
+
{% elif nomina.estado == 'error' %}
|
|
54
|
+
<span class="badge bg-danger">Error</span>
|
|
55
|
+
{% else %}
|
|
56
|
+
<span class="badge bg-secondary">{{ nomina.estado }}</span>
|
|
57
|
+
{% endif %}
|
|
58
|
+
</td>
|
|
59
|
+
<td class="text-right">{{ "{:,.2f}".format(nomina.total_bruto|float) }}</td>
|
|
60
|
+
<td class="text-right">{{ "{:,.2f}".format(nomina.total_deducciones|float) }}</td>
|
|
61
|
+
<td class="text-right"><strong>{{ "{:,.2f}".format(nomina.total_neto|float) }}</strong></td>
|
|
62
|
+
<td>{{ nomina.generado_por or 'N/A' }}</td>
|
|
63
|
+
<td>
|
|
64
|
+
<a href="{{ url_for('planilla.ver_nomina', planilla_id=planilla.id, nomina_id=nomina.id) }}"
|
|
65
|
+
class="btn btn-sm btn-outline-primary" title="Ver Detalle">
|
|
66
|
+
<i class="bi bi-eye"></i>
|
|
67
|
+
</a>
|
|
68
|
+
{% if nomina.estado == 'error' %}
|
|
69
|
+
<form action="{{ url_for('planilla.reintentar_nomina', planilla_id=planilla.id, nomina_id=nomina.id) }}"
|
|
70
|
+
method="post" style="display: inline;" class="ms-1">
|
|
71
|
+
<button type="submit" class="btn btn-sm btn-warning"
|
|
72
|
+
onclick="return confirm('¿Reintentar esta nómina?')"
|
|
73
|
+
title="Reintentar Procesamiento">
|
|
74
|
+
<i class="fas fa-redo"></i>
|
|
75
|
+
</button>
|
|
76
|
+
</form>
|
|
77
|
+
{% endif %}
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
{% endfor %}
|
|
81
|
+
</tbody>
|
|
82
|
+
</table>
|
|
83
|
+
{% else %}
|
|
84
|
+
<div class="alert alert-info">
|
|
85
|
+
<i class="fas fa-info-circle"></i> No hay nóminas generadas para esta planilla.
|
|
86
|
+
<a href="{{ url_for('planilla.ejecutar_nomina', planilla_id=planilla.id) }}">Ejecutar primera nómina</a>
|
|
87
|
+
</div>
|
|
88
|
+
{% endif %}
|
|
89
|
+
</div>
|
|
90
|
+
</div>
|
|
91
|
+
{% endblock %}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
{% extends "base.html" %}
|
|
2
|
+
{% block content %}
|
|
3
|
+
<div class="content-header">
|
|
4
|
+
<h3>
|
|
5
|
+
Log de Ejecución - Nómina
|
|
6
|
+
</h3>
|
|
7
|
+
<div>
|
|
8
|
+
<a href="{{ url_for('planilla.ver_nomina', planilla_id=planilla.id, nomina_id=nomina.id) }}" class="btn btn-secondary">
|
|
9
|
+
<i class="fas fa-arrow-left"></i> Volver a la Nómina
|
|
10
|
+
</a>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="card mb-4">
|
|
15
|
+
<div class="card-header">
|
|
16
|
+
<h5 class="mb-0">Información de la Nómina</h5>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="card-body">
|
|
19
|
+
<div class="row">
|
|
20
|
+
<div class="col-md-4">
|
|
21
|
+
<strong>Planilla:</strong><br>
|
|
22
|
+
{{ planilla.nombre }}
|
|
23
|
+
</div>
|
|
24
|
+
<div class="col-md-4">
|
|
25
|
+
<strong>Período:</strong><br>
|
|
26
|
+
{{ nomina.periodo_inicio.strftime('%d/%m/%Y') }} - {{ nomina.periodo_fin.strftime('%d/%m/%Y') }}
|
|
27
|
+
</div>
|
|
28
|
+
<div class="col-md-4">
|
|
29
|
+
<strong>Estado:</strong><br>
|
|
30
|
+
<span class="badge
|
|
31
|
+
{% if nomina.estado == 'generado' %}bg-success
|
|
32
|
+
{% elif nomina.estado == 'aprobado' %}bg-info
|
|
33
|
+
{% elif nomina.estado == 'aplicado' %}bg-primary
|
|
34
|
+
{% elif nomina.estado == 'error' %}bg-danger
|
|
35
|
+
{% else %}bg-warning{% endif %}">
|
|
36
|
+
{{ nomina.estado|upper }}
|
|
37
|
+
</span>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
{% if comprobante_warnings %}
|
|
44
|
+
<div class="card mb-4 border-warning">
|
|
45
|
+
<div class="card-header bg-warning text-dark">
|
|
46
|
+
<h5 class="mb-0">
|
|
47
|
+
<i class="fas fa-exclamation-triangle"></i> Advertencias de Configuración Contable
|
|
48
|
+
</h5>
|
|
49
|
+
</div>
|
|
50
|
+
<div class="card-body">
|
|
51
|
+
<p class="mb-3">
|
|
52
|
+
Se detectaron las siguientes configuraciones incompletas al generar el comprobante contable:
|
|
53
|
+
</p>
|
|
54
|
+
<ul class="list-group">
|
|
55
|
+
{% for warning in comprobante_warnings %}
|
|
56
|
+
<li class="list-group-item list-group-item-warning">
|
|
57
|
+
<i class="fas fa-exclamation-circle"></i> {{ warning }}
|
|
58
|
+
</li>
|
|
59
|
+
{% endfor %}
|
|
60
|
+
</ul>
|
|
61
|
+
<div class="alert alert-info mt-3 mb-0">
|
|
62
|
+
<i class="fas fa-info-circle"></i>
|
|
63
|
+
<strong>Recomendación:</strong> Configure las cuentas contables y descripciones faltantes en los conceptos de nómina
|
|
64
|
+
(Percepciones, Deducciones, Prestaciones) y en la configuración de la planilla.
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
{% endif %}
|
|
69
|
+
|
|
70
|
+
{% if log_entries %}
|
|
71
|
+
<div class="card mb-4">
|
|
72
|
+
<div class="card-header">
|
|
73
|
+
<h5 class="mb-0">
|
|
74
|
+
<i class="fas fa-list"></i> Log de Procesamiento
|
|
75
|
+
</h5>
|
|
76
|
+
</div>
|
|
77
|
+
<div class="card-body">
|
|
78
|
+
<div class="table-responsive">
|
|
79
|
+
<table class="table table-sm table-hover">
|
|
80
|
+
<thead>
|
|
81
|
+
<tr>
|
|
82
|
+
<th style="width: 20%;">Fecha/Hora</th>
|
|
83
|
+
<th style="width: 15%;">Tipo</th>
|
|
84
|
+
<th>Mensaje</th>
|
|
85
|
+
</tr>
|
|
86
|
+
</thead>
|
|
87
|
+
<tbody>
|
|
88
|
+
{% for entry in log_entries %}
|
|
89
|
+
<tr>
|
|
90
|
+
<td>
|
|
91
|
+
{% if entry.timestamp %}
|
|
92
|
+
{{ entry.timestamp[:19] }}
|
|
93
|
+
{% endif %}
|
|
94
|
+
</td>
|
|
95
|
+
<td>
|
|
96
|
+
{% set entry_status = entry.status or entry.tipo %}
|
|
97
|
+
{% if entry_status == 'advertencia_contabilidad' or entry_status == 'warning' %}
|
|
98
|
+
<span class="badge bg-warning text-dark">
|
|
99
|
+
<i class="fas fa-exclamation-triangle"></i> Advertencia
|
|
100
|
+
</span>
|
|
101
|
+
{% elif entry_status == 'error' %}
|
|
102
|
+
<span class="badge bg-danger">
|
|
103
|
+
<i class="fas fa-times-circle"></i> Error
|
|
104
|
+
</span>
|
|
105
|
+
{% elif entry_status == 'info' or entry_status == 'success' %}
|
|
106
|
+
<span class="badge bg-success">
|
|
107
|
+
<i class="fas fa-check-circle"></i> OK
|
|
108
|
+
</span>
|
|
109
|
+
{% else %}
|
|
110
|
+
<span class="badge bg-secondary">{{ entry_status }}</span>
|
|
111
|
+
{% endif %}
|
|
112
|
+
</td>
|
|
113
|
+
<td>{{ entry.message or entry.mensaje }}</td>
|
|
114
|
+
</tr>
|
|
115
|
+
{% endfor %}
|
|
116
|
+
</tbody>
|
|
117
|
+
</table>
|
|
118
|
+
</div>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
{% else %}
|
|
122
|
+
<div class="alert alert-info">
|
|
123
|
+
<i class="fas fa-info-circle"></i>
|
|
124
|
+
No hay mensajes en el log de procesamiento para esta nómina.
|
|
125
|
+
</div>
|
|
126
|
+
{% endif %}
|
|
127
|
+
|
|
128
|
+
{% if not comprobante_warnings and not log_entries %}
|
|
129
|
+
<div class="alert alert-success">
|
|
130
|
+
<i class="fas fa-check-circle"></i>
|
|
131
|
+
<strong>¡Perfecto!</strong> No se detectaron advertencias ni errores durante el procesamiento de esta nómina.
|
|
132
|
+
</div>
|
|
133
|
+
{% endif %}
|
|
134
|
+
|
|
135
|
+
{% endblock %}
|