Commit Graph

116 Commits

Author SHA1 Message Date
da088ef6e6 feature/correccion-de-actualizar 2026-05-08 15:23:45 -06:00
6113c47839 Add BaseAPIException handling to invoice routes for improved error management 2026-05-08 14:12:31 -05:00
9152750a9f feature/bitacora-correccion-por-tenant 2026-05-07 07:52:31 -06:00
9435e73761 feature/permisos-desabilitar-botones 2026-05-05 12:12:17 -06:00
aac5607e05 feature/permisos-invoices 2026-05-04 14:06:44 -06:00
1e4eaf0576 Merge pull request 'fix/facturas_ame_mez' (#358) from fix/facturas_ame_mez into development
Reviewed-on: ADUANASOFT/anexo76#358
2026-05-02 02:40:44 +00:00
cb2a68fd35 Merge pull request 'feat: increase character limit for who_processed and capture_user fields in InvoiceHeader to 100' (#351) from fix/character-limit into development
Reviewed-on: ADUANASOFT/anexo76#351
2026-04-30 14:25:31 +00:00
f225731625 feat: increase character limit for who_processed and capture_user fields in InvoiceHeader to 100 2026-04-30 09:22:44 -05:00
f10fee9bc3 refactor: update role handling in security and permissions modules, and change hub-net to non-external in docker-compose 2026-04-29 22:08:37 -05:00
953edc6127 Merge branch 'development' of https://git.aduanasoft.com/ADUANASOFT/anexo76 into fix/facturas_ame_mez 2026-04-29 10:35:55 -05:00
c92d114080 refactor: enhance invoice filtering and dropdown menu functionality
- Updated SQLAlchemy imports for better clarity and organization in invoice service.
- Refactored dropdown menu components to improve state management and accessibility.
- Adjusted invoice year filter logic for consistency in dashboard components.
- Improved internationalization handling in invoice titles and headers.
2026-04-29 09:03:01 -05:00
41e1a1767b fix: standardize multiplication notation from '×' to 'x' across various files for consistency 2026-04-28 17:25:37 -05:00
243fa0bc3b Merge branch 'development' of https://git.aduanasoft.com/ADUANASOFT/anexo76 into fix/facturas_ame_mez 2026-04-28 12:50:18 -05:00
cbb31dc1c9 Arreglando las factruas 2026-04-28 09:29:39 -06:00
356ea99b04 Merge branch 'feature/errores-legibles-tabla' into development 2026-04-28 09:49:41 -05:00
9797ec96f8 fix: standardize multiplication notation from '×' to 'x' across various files for consistency 2026-04-28 09:48:20 -05:00
8374975a30 chore: resolve remaining merge conflicts in data-table-actions components 2026-04-27 13:39:04 -05:00
5c2a84e95d fix: solución de bloqueos y estandarización de permisos 2026-04-27 10:47:30 -05:00
73a6d92863 Implement row-level security (RLS) context management for database sessions. Refactor invoice processing and reverting tasks to utilize scoped database sessions with RLS context. Update middleware to extract and set company ID from requests. Enhance task dispatching to propagate RLS context via Celery headers. Update architecture documentation to reflect RLS implementation details. 2026-04-24 18:01:46 -05:00
eabc3e5b42 Merge branch 'development' into feature/partes-descargadas
# Conflicts:
#	frontend/src/lib/components/dashboard/invoices/edit/InvoiceSelectorModal.svelte
#	frontend/src/lib/components/dashboard/invoices/edit/items/fa/item-sheet-fa.svelte
2026-04-16 16:50:33 -06:00
de8f944a35 feature/reportes 2026-04-16 15:59:18 -06:00
cd04841adc Resolviendo conflictos 2026-04-16 12:00:52 -05:00
5e6ee5d4d1 Funciones y logia de exportacion, como mejoras CRUD en las partes de exportacion 2026-04-16 11:30:40 -05:00
fda269c4cb Merge pull request 'feature/docs' (#274) from feature/docs into development
Reviewed-on: ADUANASOFT/anexo76#274
2026-04-15 14:28:03 +00:00
1f48d0a605 correcion de errores 2026-04-14 12:44:53 -05:00
3a00782162 Arreglando la importacion que impedia avanzar el script de prueba 2026-04-14 11:42:11 -05:00
5167d8bc9e validaciones flatantes y pruebas 2026-04-14 10:40:15 -05:00
e5fa5f0326 TODOS de configuracion general lista 2026-04-13 18:02:39 -05:00
f9e8563efe docs 2026-04-09 08:27:59 -06:00
7f621f4826 docs 2026-04-09 08:27:49 -06:00
309a26bf8f Refactor sort_order parameter in tenant and invoice routes to use 'pattern' instead of 'regex' for validation. This change enhances consistency across the API query parameters. 2026-04-02 08:36:16 -05:00
3cdb227ccc Merge branch 'development' into fix/filtro_facturas 2026-04-02 08:19:51 -05:00
1a01757c63 Merge branch 'development' into feature/validaciones-invoices-transports 2026-04-01 13:42:49 -06:00
7a029307a8 feature/validaciones-invoices-transortes 2026-03-27 12:56:47 -06:00
b477233245 feature/migraciones-id-transportes 2026-03-27 09:32:59 -06:00
d93c4c6b7b Mecanismo sort para tablas 2026-03-27 08:45:51 -05:00
9255dbc6b2 Se arreglo los filtros de facturas 2026-03-26 09:07:28 -05:00
a6c5abbe4c Enhance invoice validation logic to support existing invoices
- Updated the `validate_common` function to accept an optional `existing_invoice` parameter, allowing for more robust validation when updating invoices.
- Introduced a new helper function, `_normalize_invoice_currency_value`, to standardize currency code handling.
- Adjusted currency validation logic to ensure proper handling of existing invoice data, preventing changes to currency types when associated line items exist.
- Modified the `validate_update` functions in both imports and exports to pass the `existing_invoice` parameter, ensuring consistent validation across different update scenarios.
2026-03-24 18:52:53 -05:00
b5b99a5ddb feature/tabla-bitacora-logs-task 2026-03-24 13:07:35 -06: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
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
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
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
cc8a3582ba Merge branch 'development' into feature/catalog-importation 2026-03-18 13:40:33 -05:00
d37d6ef699 feature/catalog-importation 2026-03-18 08:28:20 -06:00
420901dd4e Add proportional quantity calculation and caching for line items in discharge ledger processing
- Introduced `_proportional_qty` function to calculate prorated quantities based on consumed amounts.
- Implemented caching for line items and import invoice numbers to optimize database queries during discharge ledger registration.
- Enhanced `register_discharge_ledger` function to utilize cached data for improved performance and reduced N+1 query issues.
- Updated discharge detail creation to include denormalized fields for reporting, such as net and gross weights, and customs information.
2026-03-18 08:24:46 -05:00
2a861e480c Enhance invoice and item processing with balance tracking features
- Added `company_id` to `ClientProviderAddress` and `ClientProviderPrograms` for better association.
- Updated `_process_with_discharge` to simplify invoice review by removing redundant parameters.
- Improved `pre_validators` to ensure address validation checks for existence before accessing country.
- Enhanced balance comparison logic in `compare_balances` by tracking consumed quantities.
- Modified `fill_available_balances` to reflect invoice status changes from 'UNPROCESSED' to 'PENDING'.
- Introduced `get_lines_with_balance` method in `ItemService` to fetch invoice lines with available balance.
- Added new API endpoint to retrieve import invoice lines with balance information.
- Updated frontend components to display available balances and improve user experience in invoice selection.
2026-03-18 00:55:17 -05:00
196525c684 Enhance invoice processing to support export and import differentiation
- Updated the invoice processing route to automatically detect and handle invoice types based on the operation_type.
- Introduced error handling for non-existent invoices, returning a 404 status when an invoice is not found.
- Added a new field 'serie_row' in the Serie model to accommodate additional data for export scenarios.
2026-03-17 22:43:53 -05:00
5d9f4041e4 Add balance entry creation and void functionality for import invoices
- Introduced `create_balance_entries` function to generate `BalanceMovement` entries for each line item of a processed import invoice, ensuring accurate inventory balance tracking.
- Implemented `void_balance_entries` function to cancel open ENTRY movements by inserting corresponding ENTRY_VOID movements, with safeguards against already consumed lots.
- Enhanced transaction handling to maintain data integrity during invoice processing and reverting operations.
2026-03-17 21:09:01 -05:00
73462fcec3 Add ENTRY_VOID movement type and integrate balance entry creation in invoice processing
- Introduced a new movement type 'ENTRY_VOID' to handle invoice reversals, ensuring net balance remains zero.
- Updated the FaLineItem DTOs to replace 'download' with 'discharge' for consistency.
- Implemented balance entry creation in the invoice processing and reverting workflows, enhancing inventory management.
- Adjusted progress tracking messages to reflect the new balance entry generation steps.
2026-03-17 19:46:09 -05:00