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.
This commit is contained in:
2026-03-19 14:22:21 -05:00
parent 264188e112
commit cf56ca3a68
13 changed files with 197 additions and 80 deletions

View File

@@ -232,13 +232,14 @@ export interface Invoice {
download_substance?: boolean | null;
download_class?: boolean | null;
download_def?: boolean | null;
total_items?: number | null;
payment_terms?: string | null;
handling_fees?: number | null;
option_iv18?: string | null;
enajenation_goods?: boolean | null;
compliance_mx?: InvoiceComplianceMx | null;
financials?: InvoiceFinancials | null;
logistics?: InvoiceLogistics[];
logistics?: InvoiceLogistics | null;
details?: InvoiceSalesDetails[];
collections?: InvoiceCollections[];
// Client-side only properties