- 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.
- 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.
- 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.
- 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.
- 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.
- Renamed the 'download' field to 'discharge' in the FaLineItem model and updated related services and schemas accordingly.
- Adjusted frontend components to reflect the new 'discharge' terminology.
- Ensured consistency in filtering and validation logic across the application to use the updated field name.
- Changed the type of the depreciation_date field from Integer to Date in the LineItem model to enhance date accuracy and compliance with SQLAlchemy v2 standards.
- Changed the type of the depreciation_date field from Optional[int] to Optional[datetime] in the LineItem model and LineItemBase schema for improved accuracy in date representation.
- Updated the frontend interface to reflect the change, altering depreciation_date from number to string to accommodate the new datetime format.
- Changed the assignment of subitem_number from None to 0 in the apply_calculations_after_values function to ensure consistent initialization of subitem data during calculations.
- Renamed instances of 'invoice_updated' to 'invoice_processed' across various modules to improve clarity and consistency in invoice status management.
- Updated validation and processing logic to reflect the new terminology, ensuring that all references are aligned with the recent changes in the invoice processing model.
- Adjusted related functions and validation checks to maintain functionality and accuracy in invoice processing workflows.
- Added `common.py` to handle shared validation logic for line items, including checks for invoice existence, class validity, and customs data.
- Introduced `create.py` for validating new line items, ensuring required fields are present and calculating costs based on currency type.
- Created `update.py` to manage partial updates of line items, maintaining existing values when new data is not provided.
- Enhanced error handling with specific messages and solutions for various validation failures.
- Moved validation functions for creating and updating line items to dedicated modules.
- Introduced new calculations module for handling financial calculations related to line items.
- Updated import paths for validation functions to reflect new structure.
- Renamed LineItem interface to Item and adjusted properties accordingly.
- Updated CreateItemData and UpdateItemData interfaces to reflect new structure.
- Modified components to use the new Item interface, removing nested lines.
- Adjusted data binding in item configuration, main data, and other related components.
- Simplified item creation and editing logic by removing unnecessary nesting.
- Ensured all references to line items are updated to reflect the new structure.
Integración de funcionalidad de Descargo PEPS con reportes de Packing List y Aviso Consolidado:
- Frontend: Agregados imports de dischargeReportsApi y ClipboardList
- Frontend: Agregada función handleDownloadDescargo con cálculo PEPS
- Frontend: Agregado botón condicional de Descargo PEPS (solo exportaciones)
- Frontend: Integradas funciones de Aviso Consolidado y Packing List
- Backend: Agregados routers y tasks de descargo y otros reportes
- Backend: Configurado Celery con todas las tareas de reportes
- Backend: Corregido ForeignKey en line_quantities.package_id
- Resueltos conflictos manteniendo funcionalidades de ambas ramas