Commit Graph

991 Commits

Author SHA1 Message Date
1150b59dcf Update example for TEST_DATABASE_URL in CI workflow
- Modified the error message in the build workflow to clarify the expected format for the TEST_DATABASE_URL, specifying the use of a real IP address instead of the placeholder "host".
- This change enhances the guidance provided to users, ensuring correct configuration for database connections in testing scenarios.
2026-03-24 15:42:22 -05:00
309835be8c Enhance SQLAlchemy URL validation in Alembic environment
- Added a new function to reject documentation placeholder hosts in database URLs, improving error handling for misconfigurations.
- Updated the `get_database_url` function to incorporate this new validation, ensuring that users are alerted when using "host" as a placeholder.
- Enhanced error messages to provide clearer guidance on valid host configurations.

These changes aim to improve the robustness and clarity of database connection handling in the application.
2026-03-24 15:41:47 -05:00
76c81a57ee Merge pull request 'Enhance database URL validation in Alembic environment' (#252) from ci-cd/migrations into development
Reviewed-on: ADUANASOFT/anexo76#252
2026-03-24 20:40:19 +00:00
2cd6b165d7 Enhance database URL validation in Alembic environment
- Introduced a new validation function for SQLAlchemy URLs to ensure proper formatting and provide clearer error messages.
- Updated the `get_database_url` function to include checks for both `TEST_DATABASE_URL` and `DATABASE_URL`, improving flexibility in configuration.
- Removed the previous URL scheme validation in favor of the new validation method, streamlining the error handling process.

These changes aim to improve the robustness and clarity of database connection handling in the application.
2026-03-24 15:39:53 -05:00
9408300dc0 Merge pull request 'Add TEST_DATABASE_URL to configuration settings' (#251) from ci-cd/migrations into development
Reviewed-on: ADUANASOFT/anexo76#251
2026-03-24 20:36:11 +00:00
18e4477bf1 Add TEST_DATABASE_URL to configuration settings
- Introduced a new configuration variable, TEST_DATABASE_URL, to specify the test database connection string.
- This addition enhances the flexibility of database handling, particularly for testing scenarios, aligning with recent improvements in database URL management.
2026-03-24 15:35:13 -05:00
10461afd6e Merge pull request 'Enhance database URL handling in Alembic environment' (#250) from ci-cd/migrations into development
Reviewed-on: ADUANASOFT/anexo76#250
2026-03-24 20:33:15 +00:00
a3ba317d2c Enhance database URL handling in Alembic environment
- Added a new helper function to strip unwanted characters from environment variable URLs, improving the normalization process.
- Updated the `get_database_url` function to validate the database URL scheme and provide clearer error messages for misconfigurations.
- Expanded the environment variable checks to include `DATABASE_URL`, enhancing flexibility for different deployment scenarios.

These changes aim to improve the robustness and clarity of database connection handling in the application.
2026-03-24 15:32:49 -05:00
ba738c35f6 Merge pull request 'Refactor database URL handling in Alembic environment' (#249) from ci-cd/migrations into development
Reviewed-on: ADUANASOFT/anexo76#249
2026-03-24 20:29:07 +00:00
4b2a3da611 Refactor database URL handling in Alembic environment
- Introduced a new function to normalize database URLs for Alembic, ensuring compatibility with different PostgreSQL drivers.
- Updated the `get_database_url` function to prioritize the use of the `TEST_DATABASE_URL` environment variable for CI and testing scenarios.
- Enhanced error messaging to clarify configuration requirements for database connections.

This change aims to improve the flexibility and reliability of database connections in the testing environment.
2026-03-24 15:28:41 -05:00
0c194697be Merge pull request 'Update CI workflow to include database migration before running tests' (#248) from ci-cd/migrations into development
Reviewed-on: ADUANASOFT/anexo76#248
2026-03-24 20:21:41 +00:00
3ba9359881 Update CI workflow to include database migration before running tests
- Added an environment variable for the test database URL and executed an Alembic migration to ensure the database schema is up-to-date prior to running tests.
- This change aims to improve the reliability of test execution by ensuring the correct database state.
2026-03-24 15:20:08 -05:00
481b295ab0 Merge pull request 'feature/table-celery-tasks' (#247) from feature/table-celery-tasks into development
Reviewed-on: ADUANASOFT/anexo76#247
2026-03-24 19:16:49 +00:00
3d1c73565f fix/un-alembic 2026-03-24 13:15:15 -06:00
b5b99a5ddb feature/tabla-bitacora-logs-task 2026-03-24 13:07:35 -06:00
bf8062acea Merge pull request 'Add detailed test flow documentation to backend tests README' (#246) from feature/testing into development
Reviewed-on: ADUANASOFT/anexo76#246
2026-03-24 17:58:23 +00:00
0ea17fd091 Add detailed test flow documentation to backend tests README
- Expanded the README.md for backend tests to include a comprehensive overview of the test flow, infrastructure, and edge cases.
- Introduced sections detailing the structure of tests, including integration and unit tests, along with diagrams to illustrate the business flow and common scenarios.
- Enhanced clarity on the setup and execution of tests, including database handling and security measures during testing.
- This update aims to improve understanding and maintainability of the testing framework for future contributors.
2026-03-24 12:58:01 -05:00
7ce3bdfcee Merge pull request 'Enhance test output verbosity in CI workflow' (#245) from feature/testing into development
Reviewed-on: ADUANASOFT/anexo76#245
2026-03-24 17:45:29 +00:00
939053aea9 Enhance test output verbosity in CI workflow
- Updated the pytest command in the CI workflow to include additional flags for verbose output, allowing for more detailed test results and easier debugging.
- This change improves the visibility of test execution details, aiding in the identification of issues during the CI process.
2026-03-24 12:44:28 -05:00
673ec5d1d6 Merge pull request 'Add address handling for ClientProvider in business catalog creation' (#244) from feature/testing into development
Reviewed-on: ADUANASOFT/anexo76#244
2026-03-24 17:42:40 +00:00
c812f5214c Add address handling for ClientProvider in business catalog creation
- Introduced a new helper function `_ensure_client_provider_address` to manage the assignment of addresses for ClientProvider instances.
- Refactored the `create_business_catalogs` function to utilize the new helper, ensuring that existing addresses are reused if available, preventing duplicate entries.
- This change enhances the integrity of address data during business catalog creation by ensuring proper address assignment based on existing records.
2026-03-24 12:42:19 -05:00
0b6b6d86b5 Merge pull request 'Improve CI workflow for backend tests by enhancing virtual environment setup' (#243) from feature/testing into development
Reviewed-on: ADUANASOFT/anexo76#243
2026-03-24 17:37:45 +00:00
b1a74d8e30 Improve CI workflow for backend tests by enhancing virtual environment setup
- Added a function to install the python3-venv package if the virtual environment creation fails due to missing ensurepip.
- Improved error handling and messaging for the installation process, ensuring compatibility with both root and non-root users.
- Streamlined the activation of the virtual environment for better clarity in the CI pipeline.
2026-03-24 12:37:27 -05:00
e766c2e00d Merge pull request 'Refactor CI workflow for backend tests' (#242) from feature/testing into development
Reviewed-on: ADUANASOFT/anexo76#242
2026-03-24 17:36:25 +00:00
c8e6cb568a Refactor CI workflow for backend tests
- Consolidated the installation of backend dependencies and test execution into a single job in the CI workflow.
- Removed the use of actions/setup-python in favor of system Python and virtual environments to avoid issues on self-hosted runners.
- Added checks for the TEST_DATABASE_URL secret and improved error handling for virtual environment creation.
- Enhanced the overall reliability and clarity of the testing process in the CI pipeline.
2026-03-24 12:35:50 -05:00
a44b54e28b Merge pull request 'feature/testing' (#241) from feature/testing into development
Reviewed-on: ADUANASOFT/anexo76#241
2026-03-24 17:33:48 +00:00
b750c35522 Add backend test job to CI workflow
- Introduced a new job in the CI workflow to run backend tests before the build process.
- Configured Python environment and installed dependencies from the backend requirements.
- Added a check for the TEST_DATABASE_URL secret to ensure it is defined before running tests.
- The test job must pass for the build job to execute, enhancing the reliability of the CI pipeline.
2026-03-24 12:33:21 -05:00
23509cbcc9 Refactor DTO classes to use model_config with ConfigDict for attribute handling
- Updated multiple DTO classes across various modules to replace the `Config` class with `model_config = ConfigDict(from_attributes=True)`.
- This change enhances consistency in attribute handling and aligns with the latest Pydantic practices.
- Adjusted error handling in core modules to change status codes from `HTTP_422_UNPROCESSABLE_ENTITY` to `HTTP_422_UNPROCESSABLE_CONTENT` for improved clarity in validation responses.
2026-03-24 12:06:55 -05:00
d8d7c778c8 Merge pull request 'fix/bug-catalog-envoices-select' (#239) from fix/bug-catalog-envoices-select into development
Reviewed-on: ADUANASOFT/anexo76#239
2026-03-24 16:27:28 +00:00
5b2962d53b fix/bug-catalog-envoices-select-per-type 2026-03-24 09:32:49 -06:00
58222e9ca9 fix/pedimentos-edit-datos-borrados 2026-03-24 09:16:05 -06:00
ee88a5c5ac Merge pull request 'feature/csv-pruebas' (#238) from feature/csv-pruebas into development
Reviewed-on: ADUANASOFT/anexo76#238
2026-03-24 14:18:11 +00:00
2144ef572f fix/borrar-lineas-migracion 2026-03-24 08:16:55 -06:00
0c090c0b1f Merge branch 'development' into feature/csv-pruebas 2026-03-24 08:08:32 -06:00
79b2506af4 feature/fix-invoices-csv 2026-03-24 08:06:48 -06:00
396c40b2fb Merge pull request 'feature/invoice-def' (#237) from feature/invoice-def into development
Reviewed-on: ADUANASOFT/anexo76#237
2026-03-23 16:42:58 +00:00
d69dd23bcd Enhance invoice processing logic for IMD and Mexican purchases
- Updated validation logic to restrict 'IMD' document type usage unless the invoice type is 'DEF'.
- Refactored value assignment in the main processing flow to handle 'DEF' and 'MEX' invoice types with specific IVA calculations.
- Added logging for invoice processing to improve traceability and debugging.

These changes improve the accuracy of invoice validations and processing for specific document types.
2026-03-23 11:42:35 -05:00
e549a84459 Remove legacy MovementService class and associated methods from services_old.py
- Deleted the MovementService class, which handled movement operations for temporary imports, including methods for building query clauses and calculating exchange rates.
- This removal streamlines the codebase by eliminating unused legacy code, improving maintainability and clarity in the invoice processing logic.
2026-03-23 09:48:41 -05:00
fbb24f2cd3 Refactor invoice financials to change iva_factor type from string to numeric
- Updated the `iva_factor` field in the `InvoiceFinancials` model to use a numeric type with precision and scale.
- Adjusted related frontend components and API interfaces to reflect the new numeric type for `iva_factor`.
- Enhanced Alembic migration scripts to accommodate the schema changes, ensuring proper index management and data type conversions.

These changes improve data integrity and consistency for financial calculations in invoices.
2026-03-23 09:48:33 -05:00
9cfc8b3215 feature/carga-csv-db-expo-data-to-platform 2026-03-20 15:04:28 -06:00
ebd555363f Merge pull request 'Refactor date handling in DashboardService for invoice queries' (#235) from fix/tendency into development
Reviewed-on: ADUANASOFT/anexo76#235
2026-03-20 16:53:12 +00:00
a8d548d91e Refactor date handling in DashboardService for invoice queries
- Updated the date calculations in the DashboardService to use the `invoice_date` field instead of `created_at` for querying previous totals and monthly data.
- Changed the date variables to return only the date part, improving clarity and consistency in date handling.

These changes enhance the accuracy of invoice data retrieval in the dashboard service.
2026-03-20 11:52:47 -05:00
06eb461181 Merge pull request 'Refactor invoice processing logic to remove legacy returned quantity fields and enhance data handling' (#234) from feature/revert-exports into development
Reviewed-on: ADUANASOFT/anexo76#234
2026-03-20 16:42:56 +00:00
54c137c156 Refactor invoice processing logic to remove legacy returned quantity fields and enhance data handling
- Updated invoice processing functions to eliminate legacy fields related to returned quantities, now relying on new balance movement and discharge records.
- Adjusted various components and services to reflect changes in quantity handling, including updates to the frontend for displaying used quantities instead of returned ones.
- Improved the logic for invoice total updates and validation processes to ensure consistency with the new data structure.

These changes aim to streamline invoice management and improve data integrity across the application.
2026-03-20 11:42:18 -05:00
9e30dede1c checkpoint 2026-03-20 09:49:46 -06:00
a2ad6d782d Merge pull request 'Correcion para restarle cantidad a la version mas actualiazda de la factrua de importacion' (#233) from fix/saldos_temporales into development
Reviewed-on: ADUANASOFT/anexo76#233
2026-03-19 22:36:51 +00:00
98175fcee6 Merge pull request 'Enhance invoice processing and validation logic' (#232) from fix/items into development
Reviewed-on: ADUANASOFT/anexo76#232
2026-03-19 22:36:12 +00:00
0d3b29ef00 Correcion para restarle cantidad a la version mas actualiazda de la factrua de importacion 2026-03-19 15:58:14 -05:00
cf56ca3a68 Enhance invoice processing and validation logic
- Updated `InvoiceService` to accurately reflect the number of line items in `party_count` for invoices.
- Modified weight calculations in the create and update validators to ensure consistent handling of weight types, now using lowercase comparison for "KGS".
- Adjusted invoice data structure in the frontend to include `total_items` and refined logistics handling.
- Improved table rendering in the invoice edit component for better sticky header behavior and item visibility.

These changes aim to improve data integrity and user experience in invoice management.
2026-03-19 14:22:21 -05:00
264188e112 Merge pull request 'se arreglo los furmularios de partes' (#231) from fix/partes into development
Reviewed-on: ADUANASOFT/anexo76#231
2026-03-19 18:42:32 +00:00