Merge branch 'feature/invoices' into development
This commit is contained in:
@@ -15,6 +15,14 @@ export interface InvoiceComplianceMx {
|
||||
pedimento_r1?: number | null;
|
||||
pedimento_k1?: number | null;
|
||||
remesa?: number | null;
|
||||
// Pedimento relationship data (when joined)
|
||||
pedimento?: {
|
||||
pedimento_number?: string;
|
||||
pedimento_code?: string;
|
||||
customs_office?: string;
|
||||
license?: string;
|
||||
year?: string;
|
||||
} | null;
|
||||
aduana?: string | null;
|
||||
port_of_entry?: string | null;
|
||||
destination?: string | null;
|
||||
@@ -220,7 +228,7 @@ export interface Invoice {
|
||||
enajenation_goods?: boolean | null;
|
||||
compliance_mx?: InvoiceComplianceMx | null;
|
||||
financials?: InvoiceFinancials | null;
|
||||
logistics?: InvoiceLogistics[];
|
||||
logistics?: InvoiceLogistics;
|
||||
details?: InvoiceSalesDetails[];
|
||||
collections?: InvoiceCollections[];
|
||||
}
|
||||
@@ -282,6 +290,7 @@ export interface CreateInvoiceData {
|
||||
}
|
||||
|
||||
export interface UpdateInvoiceData {
|
||||
id: number; // Required by backend
|
||||
operation_type?: OperationType | null;
|
||||
invoice_type?: string | null;
|
||||
document_type?: string | null;
|
||||
|
||||
@@ -76,15 +76,52 @@ export interface LineReferences {
|
||||
serie_id?: number;
|
||||
}
|
||||
|
||||
export interface FaLineItem {
|
||||
id?: number;
|
||||
tenant_id?: number;
|
||||
company_id?: number;
|
||||
|
||||
// Asset information (SCAF specific)
|
||||
asset_number?: string;
|
||||
asset_photo?: string;
|
||||
equipment_message?: string;
|
||||
invoice_type_asset?: string;
|
||||
return_import_invoice?: string;
|
||||
return_import_date?: number;
|
||||
movement_type_import?: string;
|
||||
|
||||
// Cross-references for import repair
|
||||
search_invoice?: string;
|
||||
search_line?: number;
|
||||
|
||||
// Search type
|
||||
search_type?: string;
|
||||
|
||||
// Subitems
|
||||
is_subitem?: boolean;
|
||||
contains_subitems?: boolean;
|
||||
includes_subitems?: boolean;
|
||||
subitem_number?: number;
|
||||
|
||||
// Special flags
|
||||
download?: boolean;
|
||||
own_equipment?: boolean;
|
||||
omit_annex31?: boolean;
|
||||
|
||||
// Timestamps
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface LineItem {
|
||||
id?: number;
|
||||
item_id?: number;
|
||||
line_number: number;
|
||||
|
||||
// Identification
|
||||
part_number?: string;
|
||||
component_part_number?: string;
|
||||
class_code?: string;
|
||||
part_number_id?: string;
|
||||
component_part_number_id?: string;
|
||||
class_id?: number;
|
||||
identifier?: string;
|
||||
|
||||
// Unit of Measure
|
||||
@@ -106,6 +143,12 @@ export interface LineItem {
|
||||
payment_method?: string;
|
||||
igi_amount?: number;
|
||||
|
||||
// Computed fields from class_info relation
|
||||
class_code?: string;
|
||||
class_description?: string;
|
||||
|
||||
// Computed field from unit_of_measure_info relation
|
||||
unit_of_measure_code?: string;
|
||||
|
||||
// Nested relations (Singular names to match backend Pydantic models)
|
||||
customs?: LineCustoms;
|
||||
@@ -113,6 +156,7 @@ export interface LineItem {
|
||||
quantity?: LineQuantities;
|
||||
description?: LineDescriptions;
|
||||
reference?: LineReferences;
|
||||
fa_data?: FaLineItem; // Fixed Asset specific data
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
|
||||
Reference in New Issue
Block a user