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.
This commit is contained in:
2026-03-20 11:42:18 -05:00
parent a2ad6d782d
commit 54c137c156
26 changed files with 880 additions and 101 deletions

View File

@@ -52,7 +52,6 @@ export interface LineQuantities {
// Special quantities
quantity_temp_export?: number;
quantity_returned?: number;
// Weight
net_weight?: number;
@@ -338,8 +337,8 @@ export interface ImportLineWithBalance {
unit_of_measure_code?: string;
// Quantities
quantity?: number;
quantity_returned_temp?: number;
quantity_returned?: number;
quantity_used_temp?: number;
quantity_used_def?: number;
// Balance
available_balance: number;
has_balance: boolean;