coati-payroll 0.0.12__py3-none-any.whl → 0.0.13__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 +7 -17
- coati_payroll/app.py +2 -13
- coati_payroll/audit_helpers.py +2 -13
- coati_payroll/auth.py +2 -13
- coati_payroll/cli.py +17 -14
- coati_payroll/config.py +2 -13
- coati_payroll/demo_data.py +2 -13
- coati_payroll/enums.py +2 -13
- coati_payroll/forms.py +7 -13
- coati_payroll/formula_engine/__init__.py +14 -13
- coati_payroll/formula_engine/ast/__init__.py +16 -1
- coati_payroll/formula_engine/ast/ast_visitor.py +15 -17
- coati_payroll/formula_engine/ast/expression_evaluator.py +12 -14
- coati_payroll/formula_engine/ast/safe_operators.py +16 -15
- coati_payroll/formula_engine/ast/type_converter.py +17 -17
- coati_payroll/formula_engine/data_sources.py +3 -13
- coati_payroll/formula_engine/engine.py +12 -13
- coati_payroll/formula_engine/exceptions.py +13 -13
- coati_payroll/formula_engine/execution/__init__.py +15 -13
- coati_payroll/formula_engine/execution/execution_context.py +12 -13
- coati_payroll/formula_engine/execution/step_executor.py +12 -14
- coati_payroll/formula_engine/execution/variable_store.py +13 -13
- coati_payroll/formula_engine/novelty_codes.py +3 -13
- coati_payroll/formula_engine/results/__init__.py +14 -13
- coati_payroll/formula_engine/results/execution_result.py +47 -35
- coati_payroll/formula_engine/steps/__init__.py +14 -14
- coati_payroll/formula_engine/steps/assignment_step.py +12 -13
- coati_payroll/formula_engine/steps/base_step.py +13 -13
- coati_payroll/formula_engine/steps/calculation_step.py +12 -13
- coati_payroll/formula_engine/steps/conditional_step.py +12 -13
- coati_payroll/formula_engine/steps/step_factory.py +11 -13
- coati_payroll/formula_engine/steps/tax_lookup_step.py +12 -13
- coati_payroll/formula_engine/tables/__init__.py +14 -13
- coati_payroll/formula_engine/tables/bracket_calculator.py +12 -13
- coati_payroll/formula_engine/tables/table_lookup.py +12 -14
- coati_payroll/formula_engine/tables/tax_table.py +13 -13
- coati_payroll/formula_engine/validation/__init__.py +14 -13
- coati_payroll/formula_engine/validation/schema_validator.py +12 -14
- coati_payroll/formula_engine/validation/security_validator.py +12 -13
- coati_payroll/formula_engine/validation/tax_table_validator.py +12 -13
- coati_payroll/formula_engine_examples.py +2 -13
- coati_payroll/i18n.py +2 -13
- coati_payroll/initial_data.py +2 -13
- coati_payroll/interes_engine.py +2 -13
- coati_payroll/liquidacion_engine/__init__.py +2 -13
- coati_payroll/liquidacion_engine/engine.py +2 -13
- coati_payroll/locale_config.py +2 -13
- coati_payroll/migrations/20260125_032900_initial_migration.py +2 -14
- coati_payroll/migrations/__init__.py +2 -13
- coati_payroll/model.py +83 -82
- coati_payroll/nomina_engine/__init__.py +2 -13
- coati_payroll/nomina_engine/calculators/__init__.py +2 -13
- coati_payroll/nomina_engine/calculators/benefit_calculator.py +2 -13
- coati_payroll/nomina_engine/calculators/concept_calculator.py +2 -1
- coati_payroll/nomina_engine/calculators/deduction_calculator.py +2 -13
- coati_payroll/nomina_engine/calculators/exchange_rate_calculator.py +2 -13
- coati_payroll/nomina_engine/calculators/perception_calculator.py +2 -13
- coati_payroll/nomina_engine/calculators/salary_calculator.py +2 -13
- coati_payroll/nomina_engine/domain/__init__.py +2 -13
- coati_payroll/nomina_engine/domain/calculation_items.py +2 -13
- coati_payroll/nomina_engine/domain/employee_calculation.py +2 -13
- coati_payroll/nomina_engine/domain/payroll_context.py +2 -13
- coati_payroll/nomina_engine/engine.py +2 -13
- coati_payroll/nomina_engine/processors/__init__.py +2 -13
- coati_payroll/nomina_engine/processors/accounting_processor.py +2 -13
- coati_payroll/nomina_engine/processors/accumulation_processor.py +2 -13
- coati_payroll/nomina_engine/processors/loan_processor.py +2 -13
- coati_payroll/nomina_engine/processors/novelty_processor.py +2 -13
- coati_payroll/nomina_engine/processors/vacation_processor.py +2 -13
- coati_payroll/nomina_engine/repositories/__init__.py +2 -13
- coati_payroll/nomina_engine/repositories/acumulado_repository.py +2 -13
- coati_payroll/nomina_engine/repositories/base_repository.py +2 -13
- coati_payroll/nomina_engine/repositories/config_repository.py +2 -13
- coati_payroll/nomina_engine/repositories/employee_repository.py +2 -13
- coati_payroll/nomina_engine/repositories/exchange_rate_repository.py +2 -13
- coati_payroll/nomina_engine/repositories/novelty_repository.py +2 -13
- coati_payroll/nomina_engine/repositories/planilla_repository.py +2 -13
- coati_payroll/nomina_engine/results/__init__.py +2 -13
- coati_payroll/nomina_engine/results/error_result.py +2 -13
- coati_payroll/nomina_engine/results/payroll_result.py +2 -13
- coati_payroll/nomina_engine/results/validation_result.py +2 -13
- coati_payroll/nomina_engine/services/__init__.py +2 -13
- coati_payroll/nomina_engine/services/accounting_voucher_service.py +2 -13
- coati_payroll/nomina_engine/services/employee_processing_service.py +2 -13
- coati_payroll/nomina_engine/services/payroll_execution_service.py +2 -13
- coati_payroll/nomina_engine/validators/__init__.py +2 -13
- coati_payroll/nomina_engine/validators/base_validator.py +2 -13
- coati_payroll/nomina_engine/validators/currency_validator.py +2 -13
- coati_payroll/nomina_engine/validators/employee_validator.py +2 -13
- coati_payroll/nomina_engine/validators/period_validator.py +2 -13
- coati_payroll/nomina_engine/validators/planilla_validator.py +2 -13
- coati_payroll/queue/__init__.py +2 -13
- coati_payroll/queue/driver.py +2 -13
- coati_payroll/queue/drivers/__init__.py +2 -13
- coati_payroll/queue/drivers/dramatiq_driver.py +9 -16
- coati_payroll/queue/drivers/huey_driver.py +2 -13
- coati_payroll/queue/drivers/noop_driver.py +2 -13
- coati_payroll/queue/selector.py +2 -13
- coati_payroll/queue/tasks.py +13 -20
- coati_payroll/rate_limiting.py +2 -13
- coati_payroll/rbac.py +12 -19
- coati_payroll/report_engine.py +2 -13
- coati_payroll/report_export.py +2 -13
- coati_payroll/schema_validator.py +2 -13
- coati_payroll/security.py +2 -13
- coati_payroll/static/schema_editor.js +862 -0
- coati_payroll/static/styles.css +5 -0
- coati_payroll/system_reports.py +2 -13
- coati_payroll/templates/auth/login.html +5 -0
- coati_payroll/templates/base.html +5 -1
- coati_payroll/templates/index.html +5 -0
- coati_payroll/templates/macros.html +5 -0
- coati_payroll/templates/modules/calculation_rule/form.html +5 -0
- coati_payroll/templates/modules/calculation_rule/index.html +5 -0
- coati_payroll/templates/modules/calculation_rule/schema_editor.html +292 -974
- coati_payroll/templates/modules/carga_inicial_prestacion/form.html +5 -0
- coati_payroll/templates/modules/carga_inicial_prestacion/index.html +5 -0
- coati_payroll/templates/modules/carga_inicial_prestacion/reporte.html +5 -0
- coati_payroll/templates/modules/config_calculos/index.html +5 -0
- coati_payroll/templates/modules/configuracion/index.html +24 -27
- coati_payroll/templates/modules/currency/form.html +5 -0
- coati_payroll/templates/modules/currency/index.html +5 -0
- coati_payroll/templates/modules/custom_field/form.html +5 -0
- coati_payroll/templates/modules/custom_field/index.html +5 -0
- coati_payroll/templates/modules/deduccion/form.html +5 -0
- coati_payroll/templates/modules/deduccion/index.html +5 -0
- coati_payroll/templates/modules/employee/form.html +5 -0
- coati_payroll/templates/modules/employee/index.html +5 -0
- coati_payroll/templates/modules/empresa/form.html +5 -0
- coati_payroll/templates/modules/empresa/index.html +5 -0
- coati_payroll/templates/modules/exchange_rate/form.html +5 -0
- coati_payroll/templates/modules/exchange_rate/import.html +5 -0
- coati_payroll/templates/modules/exchange_rate/index.html +5 -0
- coati_payroll/templates/modules/liquidacion/index.html +5 -0
- coati_payroll/templates/modules/liquidacion/nueva.html +5 -0
- coati_payroll/templates/modules/liquidacion/ver.html +5 -0
- coati_payroll/templates/modules/payroll_concepts/audit_log.html +5 -0
- coati_payroll/templates/modules/percepcion/form.html +5 -0
- coati_payroll/templates/modules/percepcion/index.html +5 -0
- coati_payroll/templates/modules/planilla/config.html +5 -0
- coati_payroll/templates/modules/planilla/config_deducciones.html +5 -0
- coati_payroll/templates/modules/planilla/config_empleados.html +5 -0
- coati_payroll/templates/modules/planilla/config_percepciones.html +5 -0
- coati_payroll/templates/modules/planilla/config_prestaciones.html +5 -0
- coati_payroll/templates/modules/planilla/config_reglas.html +5 -0
- coati_payroll/templates/modules/planilla/ejecutar_nomina.html +5 -0
- coati_payroll/templates/modules/planilla/form.html +5 -0
- coati_payroll/templates/modules/planilla/index.html +5 -0
- coati_payroll/templates/modules/planilla/listar_nominas.html +5 -0
- coati_payroll/templates/modules/planilla/log_nomina.html +5 -0
- coati_payroll/templates/modules/planilla/novedades/form.html +5 -0
- coati_payroll/templates/modules/planilla/novedades/index.html +5 -0
- coati_payroll/templates/modules/planilla/ver_nomina.html +5 -0
- coati_payroll/templates/modules/planilla/ver_nomina_empleado.html +5 -0
- coati_payroll/templates/modules/plugins/index.html +5 -0
- coati_payroll/templates/modules/prestacion/form.html +5 -0
- coati_payroll/templates/modules/prestacion/index.html +5 -0
- coati_payroll/templates/modules/prestacion_management/dashboard.html +5 -0
- coati_payroll/templates/modules/prestacion_management/initial_balance_bulk.html +5 -0
- coati_payroll/templates/modules/prestamo/approve.html +5 -0
- coati_payroll/templates/modules/prestamo/condonacion.html +5 -0
- coati_payroll/templates/modules/prestamo/detail.html +5 -0
- coati_payroll/templates/modules/prestamo/form.html +5 -0
- coati_payroll/templates/modules/prestamo/index.html +5 -0
- coati_payroll/templates/modules/prestamo/pago_extraordinario.html +5 -0
- coati_payroll/templates/modules/prestamo/tabla_pago_pdf.html +5 -0
- coati_payroll/templates/modules/report/admin_index.html +5 -0
- coati_payroll/templates/modules/report/detail.html +5 -0
- coati_payroll/templates/modules/report/execute.html +5 -0
- coati_payroll/templates/modules/report/index.html +5 -0
- coati_payroll/templates/modules/report/permissions.html +5 -0
- coati_payroll/templates/modules/settings/index.html +5 -0
- coati_payroll/templates/modules/shared/concept_form.html +19 -12
- coati_payroll/templates/modules/shared/concept_index.html +39 -27
- coati_payroll/templates/modules/tipo_planilla/form.html +5 -0
- coati_payroll/templates/modules/tipo_planilla/index.html +5 -0
- coati_payroll/templates/modules/user/form.html +5 -0
- coati_payroll/templates/modules/user/index.html +5 -0
- coati_payroll/templates/modules/user/profile.html +5 -0
- coati_payroll/templates/modules/vacation/account_detail.html +5 -0
- coati_payroll/templates/modules/vacation/account_form.html +5 -0
- coati_payroll/templates/modules/vacation/account_index.html +5 -0
- coati_payroll/templates/modules/vacation/dashboard.html +5 -0
- coati_payroll/templates/modules/vacation/initial_balance_bulk.html +5 -0
- coati_payroll/templates/modules/vacation/initial_balance_form.html +5 -0
- coati_payroll/templates/modules/vacation/leave_request_detail.html +5 -0
- coati_payroll/templates/modules/vacation/leave_request_form.html +5 -0
- coati_payroll/templates/modules/vacation/leave_request_index.html +5 -0
- coati_payroll/templates/modules/vacation/policy_detail.html +5 -0
- coati_payroll/templates/modules/vacation/policy_form.html +5 -0
- coati_payroll/templates/modules/vacation/policy_index.html +5 -0
- coati_payroll/templates/modules/vacation/register_taken_form.html +5 -0
- coati_payroll/translations/en/LC_MESSAGES/messages.mo +0 -0
- coati_payroll/translations/en/LC_MESSAGES/messages.po +2963 -3561
- coati_payroll/vacation_service.py +2 -13
- coati_payroll/version.py +3 -14
- coati_payroll/vistas/__init__.py +2 -13
- coati_payroll/vistas/calculation_rule.py +14 -24
- coati_payroll/vistas/carga_inicial_prestacion.py +2 -13
- coati_payroll/vistas/config_calculos.py +2 -13
- coati_payroll/vistas/configuracion.py +29 -39
- coati_payroll/vistas/constants.py +2 -13
- coati_payroll/vistas/currency.py +2 -13
- coati_payroll/vistas/custom_field.py +2 -13
- coati_payroll/vistas/employee.py +2 -13
- coati_payroll/vistas/empresa.py +2 -13
- coati_payroll/vistas/exchange_rate.py +2 -13
- coati_payroll/vistas/liquidacion.py +2 -13
- coati_payroll/vistas/payroll_concepts.py +2 -13
- coati_payroll/vistas/planilla/__init__.py +2 -13
- coati_payroll/vistas/planilla/association_routes.py +8 -17
- coati_payroll/vistas/planilla/config_routes.py +2 -13
- coati_payroll/vistas/planilla/export_routes.py +28 -35
- coati_payroll/vistas/planilla/helpers/__init__.py +2 -13
- coati_payroll/vistas/planilla/helpers/association_helpers.py +2 -13
- coati_payroll/vistas/planilla/helpers/excel_helpers.py +2 -13
- coati_payroll/vistas/planilla/helpers/form_helpers.py +2 -13
- coati_payroll/vistas/planilla/nomina_routes.py +2 -13
- coati_payroll/vistas/planilla/novedad_routes.py +2 -13
- coati_payroll/vistas/planilla/routes.py +2 -13
- coati_payroll/vistas/planilla/services/__init__.py +2 -13
- coati_payroll/vistas/planilla/services/export_service.py +4 -15
- coati_payroll/vistas/planilla/services/nomina_service.py +2 -13
- coati_payroll/vistas/planilla/services/novedad_service.py +3 -16
- coati_payroll/vistas/planilla/services/planilla_service.py +2 -13
- coati_payroll/vistas/planilla/validators/__init__.py +2 -13
- coati_payroll/vistas/planilla/validators/planilla_validators.py +2 -13
- coati_payroll/vistas/prestacion.py +2 -13
- coati_payroll/vistas/prestamo.py +2 -13
- coati_payroll/vistas/report.py +2 -13
- coati_payroll/vistas/settings.py +2 -13
- coati_payroll/vistas/tipo_planilla.py +2 -13
- coati_payroll/vistas/user.py +2 -13
- coati_payroll/vistas/vacation.py +15 -13
- coati_payroll/wsgi_server.py +37 -0
- {coati_payroll-0.0.12.dist-info → coati_payroll-0.0.13.dist-info}/METADATA +11 -4
- coati_payroll-0.0.13.dist-info/RECORD +248 -0
- coati_payroll/translations/es/LC_MESSAGES/messages.mo +0 -0
- coati_payroll/translations/es/LC_MESSAGES/messages.po +0 -7374
- coati_payroll-0.0.12.dist-info/RECORD +0 -248
- {coati_payroll-0.0.12.dist-info → coati_payroll-0.0.13.dist-info}/LICENSE +0 -0
- {coati_payroll-0.0.12.dist-info → coati_payroll-0.0.13.dist-info}/WHEEL +0 -0
- {coati_payroll-0.0.12.dist-info → coati_payroll-0.0.13.dist-info}/entry_points.txt +0 -0
- {coati_payroll-0.0.12.dist-info → coati_payroll-0.0.13.dist-info}/top_level.txt +0 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Exceptions for formula engine."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
10
|
+
|
|
11
|
+
# <-------------------------------------------------------------------------> #
|
|
12
|
+
# Third party packages
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
# Local modules
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
18
|
from coati_payroll.schema_validator import ValidationError as _BaseValidationError
|
|
19
19
|
|
|
20
20
|
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Execution context and step execution modules."""
|
|
15
4
|
|
|
5
|
+
# <-------------------------------------------------------------------------> #
|
|
6
|
+
# Standard library
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
# <-------------------------------------------------------------------------> #
|
|
11
|
+
# Third party packages
|
|
12
|
+
# <-------------------------------------------------------------------------> #
|
|
13
|
+
|
|
14
|
+
# <-------------------------------------------------------------------------> #
|
|
15
|
+
# Local modules
|
|
16
|
+
# <-------------------------------------------------------------------------> #
|
|
16
17
|
from .execution_context import ExecutionContext
|
|
17
18
|
from .step_executor import StepExecutor
|
|
18
19
|
from .variable_store import VariableStore
|
|
19
20
|
|
|
21
|
+
# <==================[ Expose all varaibles and constants ]===================>
|
|
20
22
|
__all__ = [
|
|
21
23
|
"ExecutionContext",
|
|
22
24
|
"StepExecutor",
|
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Execution context for formula engine."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from dataclasses import dataclass, field
|
|
19
11
|
from decimal import Decimal
|
|
20
12
|
from typing import Any, Callable
|
|
21
13
|
|
|
14
|
+
# <-------------------------------------------------------------------------> #
|
|
15
|
+
# Third party packages
|
|
16
|
+
# <-------------------------------------------------------------------------> #
|
|
17
|
+
|
|
18
|
+
# <-------------------------------------------------------------------------> #
|
|
19
|
+
# Local modules
|
|
20
|
+
# <-------------------------------------------------------------------------> #
|
|
22
21
|
from ..ast.safe_operators import SAFE_FUNCTIONS, SAFE_OPERATORS
|
|
23
22
|
|
|
24
23
|
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Step executor for formula engine."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from typing import TYPE_CHECKING, Any
|
|
19
11
|
|
|
20
|
-
|
|
12
|
+
# <-------------------------------------------------------------------------> #
|
|
13
|
+
# Third party packages
|
|
14
|
+
# <-------------------------------------------------------------------------> #
|
|
21
15
|
|
|
16
|
+
# <-------------------------------------------------------------------------> #
|
|
17
|
+
# Local modules
|
|
18
|
+
# <-------------------------------------------------------------------------> #
|
|
19
|
+
from coati_payroll.i18n import _
|
|
22
20
|
from ..exceptions import CalculationError
|
|
23
21
|
from .execution_context import ExecutionContext
|
|
24
22
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Variable store for formula execution."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from decimal import Decimal
|
|
19
11
|
from typing import Any
|
|
20
12
|
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Third party packages
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
20
|
+
|
|
21
21
|
|
|
22
22
|
class VariableStore:
|
|
23
23
|
"""Manages variables during formula execution."""
|
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Mapping of novelty codes to their calculation behavior.
|
|
15
4
|
|
|
16
5
|
This module defines the mapping between novelty codes and their
|
|
17
6
|
calculation behavior (perception/deduction, gravable, etc.).
|
|
18
7
|
"""
|
|
19
8
|
|
|
9
|
+
# ................................ CONTANTES ................................ #
|
|
20
10
|
NOVELTY_CODES = {
|
|
21
11
|
"HORAS_EXTRA": {
|
|
22
12
|
"tipo": "percepcion",
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Result DTOs for formula engine execution."""
|
|
15
4
|
|
|
5
|
+
# <-------------------------------------------------------------------------> #
|
|
6
|
+
# Standard library
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
10
|
+
# Third party packages
|
|
11
|
+
# <-------------------------------------------------------------------------> #
|
|
12
|
+
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Local modules
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
16
|
from .execution_result import ExecutionResult
|
|
17
17
|
|
|
18
|
+
# <==================[ Expose all varaibles and constants ]===================>
|
|
18
19
|
__all__ = [
|
|
19
20
|
"ExecutionResult",
|
|
20
21
|
]
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Execution result DTO."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
18
|
-
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
10
|
+
from decimal import Decimal, ROUND_HALF_UP
|
|
19
11
|
from typing import Any
|
|
20
12
|
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Third party packages
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
20
|
+
|
|
21
21
|
|
|
22
22
|
class ExecutionResult:
|
|
23
23
|
"""Result of formula execution."""
|
|
@@ -28,32 +28,44 @@ class ExecutionResult:
|
|
|
28
28
|
step_results: dict[str, Any],
|
|
29
29
|
final_output: Decimal,
|
|
30
30
|
):
|
|
31
|
-
"""Initialize execution result.
|
|
32
|
-
|
|
33
|
-
Args:
|
|
34
|
-
variables: All variables after execution
|
|
35
|
-
step_results: Results from each step
|
|
36
|
-
final_output: Final output value
|
|
37
|
-
"""
|
|
38
31
|
self.variables = variables
|
|
39
32
|
self.step_results = step_results
|
|
40
33
|
self.final_output = final_output
|
|
41
34
|
|
|
42
35
|
def to_dict(self) -> dict[str, Any]:
|
|
43
|
-
"""Convert result to dictionary format.
|
|
36
|
+
"""Convert result to dictionary format with 2 decimal places rounding."""
|
|
37
|
+
|
|
38
|
+
def _round_to_two(value: Decimal) -> float:
|
|
39
|
+
"""Round Decimal to 2 decimal places."""
|
|
40
|
+
rounded = value.quantize(Decimal("0.01"), rounding=ROUND_HALF_UP)
|
|
41
|
+
return float(rounded)
|
|
42
|
+
|
|
43
|
+
# Procesar variables
|
|
44
|
+
processed_vars = {}
|
|
45
|
+
for key, value in self.variables.items():
|
|
46
|
+
if isinstance(value, Decimal):
|
|
47
|
+
processed_vars[key] = _round_to_two(value)
|
|
48
|
+
else:
|
|
49
|
+
processed_vars[key] = value
|
|
50
|
+
|
|
51
|
+
# Procesar step_results
|
|
52
|
+
processed_results = {}
|
|
53
|
+
for key, value in self.step_results.items():
|
|
54
|
+
if isinstance(value, Decimal):
|
|
55
|
+
processed_results[key] = _round_to_two(value)
|
|
56
|
+
elif isinstance(value, dict):
|
|
57
|
+
processed_dict = {}
|
|
58
|
+
for k, v in value.items():
|
|
59
|
+
if isinstance(v, Decimal):
|
|
60
|
+
processed_dict[k] = _round_to_two(v)
|
|
61
|
+
else:
|
|
62
|
+
processed_dict[k] = v
|
|
63
|
+
processed_results[key] = processed_dict
|
|
64
|
+
else:
|
|
65
|
+
processed_results[key] = value
|
|
44
66
|
|
|
45
|
-
Returns:
|
|
46
|
-
Dictionary representation of result
|
|
47
|
-
"""
|
|
48
67
|
return {
|
|
49
|
-
"variables":
|
|
50
|
-
"results":
|
|
51
|
-
|
|
52
|
-
float(v)
|
|
53
|
-
if isinstance(v, Decimal)
|
|
54
|
-
else ({kk: float(vv) for kk, vv in v.items()} if isinstance(v, dict) else v)
|
|
55
|
-
)
|
|
56
|
-
for k, v in self.step_results.items()
|
|
57
|
-
},
|
|
58
|
-
"output": float(self.final_output),
|
|
68
|
+
"variables": processed_vars,
|
|
69
|
+
"results": processed_results,
|
|
70
|
+
"output": _round_to_two(self.final_output),
|
|
59
71
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Step execution modules using Strategy pattern."""
|
|
15
4
|
|
|
5
|
+
# <-------------------------------------------------------------------------> #
|
|
6
|
+
# Standard library
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
10
|
+
# Third party packages
|
|
11
|
+
# <-------------------------------------------------------------------------> #
|
|
12
|
+
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Local modules
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
16
|
from .base_step import Step
|
|
17
17
|
from .calculation_step import CalculationStep
|
|
18
18
|
from .conditional_step import ConditionalStep
|
|
@@ -20,7 +20,7 @@ from .tax_lookup_step import TaxLookupStep
|
|
|
20
20
|
from .assignment_step import AssignmentStep
|
|
21
21
|
from .step_factory import StepFactory
|
|
22
22
|
|
|
23
|
-
__all__ = [
|
|
23
|
+
__all__ = [ # <==================[ Expose all varaibles and constants ]===================>
|
|
24
24
|
"Step",
|
|
25
25
|
"CalculationStep",
|
|
26
26
|
"ConditionalStep",
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Assignment step implementation."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from decimal import Decimal
|
|
19
11
|
from typing import TYPE_CHECKING, Any
|
|
20
12
|
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Third party packages
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
21
20
|
from ..ast.type_converter import to_decimal
|
|
22
21
|
from .base_step import Step
|
|
23
22
|
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Base step interface for Strategy pattern."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from abc import ABC, abstractmethod
|
|
19
11
|
from typing import Any, TYPE_CHECKING
|
|
20
12
|
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Third party packages
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
20
|
+
|
|
21
21
|
if TYPE_CHECKING:
|
|
22
22
|
from ..execution.execution_context import ExecutionContext
|
|
23
23
|
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Calculation step implementation."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from decimal import Decimal
|
|
19
11
|
from typing import TYPE_CHECKING
|
|
20
12
|
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Third party packages
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
21
20
|
from ..ast.expression_evaluator import ExpressionEvaluator
|
|
22
21
|
from .base_step import Step
|
|
23
22
|
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Conditional step implementation."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from decimal import Decimal
|
|
19
11
|
from typing import TYPE_CHECKING, Any
|
|
20
12
|
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Third party packages
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
21
20
|
from ..ast.expression_evaluator import ExpressionEvaluator
|
|
22
21
|
from ..ast.safe_operators import COMPARISON_OPERATORS
|
|
23
22
|
from ..ast.type_converter import to_decimal
|
|
@@ -1,24 +1,22 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Factory for creating step instances."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from typing import Any
|
|
19
11
|
|
|
12
|
+
# <-------------------------------------------------------------------------> #
|
|
13
|
+
# Third party packages
|
|
14
|
+
# <-------------------------------------------------------------------------> #
|
|
20
15
|
from coati_payroll.enums import StepType
|
|
21
16
|
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
22
20
|
from ..exceptions import CalculationError
|
|
23
21
|
from .assignment_step import AssignmentStep
|
|
24
22
|
from .base_step import Step
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Tax lookup step implementation."""
|
|
15
4
|
|
|
16
5
|
from __future__ import annotations
|
|
17
6
|
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
# Standard library
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
18
10
|
from decimal import Decimal
|
|
19
11
|
from typing import TYPE_CHECKING
|
|
20
12
|
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Third party packages
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
|
+
|
|
17
|
+
# <-------------------------------------------------------------------------> #
|
|
18
|
+
# Local modules
|
|
19
|
+
# <-------------------------------------------------------------------------> #
|
|
21
20
|
from ..tables.table_lookup import TableLookup
|
|
22
21
|
from .base_step import Step
|
|
23
22
|
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
#
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
# SPDX-FileCopyrightText: 2025 - 2026 BMO Soluciones, S.A.
|
|
14
3
|
"""Tax table and bracket calculation modules."""
|
|
15
4
|
|
|
5
|
+
# <-------------------------------------------------------------------------> #
|
|
6
|
+
# Standard library
|
|
7
|
+
# <-------------------------------------------------------------------------> #
|
|
8
|
+
|
|
9
|
+
# <-------------------------------------------------------------------------> #
|
|
10
|
+
# Third party packages
|
|
11
|
+
# <-------------------------------------------------------------------------> #
|
|
12
|
+
|
|
13
|
+
# <-------------------------------------------------------------------------> #
|
|
14
|
+
# Local modules
|
|
15
|
+
# <-------------------------------------------------------------------------> #
|
|
16
16
|
from .tax_table import TaxTable
|
|
17
17
|
from .bracket_calculator import BracketCalculator
|
|
18
18
|
from .table_lookup import TableLookup
|
|
19
19
|
|
|
20
|
+
# <==================[ Expose all varaibles and constants ]===================>
|
|
20
21
|
__all__ = [
|
|
21
22
|
"TaxTable",
|
|
22
23
|
"BracketCalculator",
|