Merge remote-tracking branch 'origin/development' into feature/fraction-catalogs
This commit is contained in:
@@ -17,7 +17,11 @@ export interface LineCustoms {
|
||||
origin_country?: string;
|
||||
destination_country?: string;
|
||||
advalorem?: string;
|
||||
advalorem_american?: number; // Backend: Decimal
|
||||
advalorem_numeric?: number;
|
||||
advalorem_american?: number;
|
||||
advalorem_tlcan?: number;
|
||||
rate?: string;
|
||||
depreciation_rate?: number;
|
||||
sector?: string;
|
||||
}
|
||||
|
||||
@@ -31,11 +35,13 @@ export interface LineFinancials {
|
||||
unit_cost_commercial_usd?: number;
|
||||
|
||||
// Values
|
||||
value_mc?: number;
|
||||
value_usd?: number;
|
||||
value_mxn?: number;
|
||||
value_returned_usd?: number;
|
||||
value_returned_mxn?: number;
|
||||
customs_value_usd?: number;
|
||||
customs_value_mxn?: number;
|
||||
}
|
||||
|
||||
export interface LineQuantities {
|
||||
@@ -105,8 +111,7 @@ export interface FaLineItem {
|
||||
|
||||
// Subitems
|
||||
is_subitem?: boolean;
|
||||
contains_subitems?: boolean;
|
||||
includes_subitems?: boolean;
|
||||
contains_subitems?: boolean;
|
||||
subitem_number?: number;
|
||||
|
||||
// Special flags
|
||||
@@ -119,9 +124,9 @@ export interface FaLineItem {
|
||||
updated_at?: string;
|
||||
}
|
||||
|
||||
export interface LineItem {
|
||||
id?: number;
|
||||
item_id?: number;
|
||||
export interface Item {
|
||||
id?: number;
|
||||
invoice_id: number;
|
||||
line_number: number;
|
||||
|
||||
// Identification
|
||||
@@ -159,20 +164,7 @@ export interface LineItem {
|
||||
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;
|
||||
financial?: LineFinancials;
|
||||
quantity?: LineQuantities;
|
||||
description?: LineDescriptions;
|
||||
reference?: LineReferences;
|
||||
fa_data?: FaLineItem; // Fixed Asset specific data
|
||||
}
|
||||
|
||||
export interface Item {
|
||||
id?: number;
|
||||
invoice_id: number;
|
||||
unit_of_measure_code?: string;
|
||||
reference_number?: string;
|
||||
order?: string;
|
||||
guide_number?: string;
|
||||
@@ -182,8 +174,14 @@ export interface Item {
|
||||
location?: string;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
|
||||
lines?: LineItem[];
|
||||
|
||||
// Nested relations (Singular names to match backend Pydantic models)
|
||||
customs?: LineCustoms;
|
||||
financial?: LineFinancials;
|
||||
quantity?: LineQuantities;
|
||||
description?: LineDescriptions;
|
||||
reference?: LineReferences;
|
||||
fa_data?: FaLineItem; // Fixed Asset specific data
|
||||
}
|
||||
|
||||
export interface ItemListResponse {
|
||||
@@ -193,28 +191,11 @@ export interface ItemListResponse {
|
||||
limit: number;
|
||||
}
|
||||
|
||||
export interface CreateItemData {
|
||||
export interface CreateItemData extends Omit<Item, 'id' | 'created_at' | 'updated_at'> {
|
||||
invoice_id: number;
|
||||
reference_number?: string;
|
||||
order?: string;
|
||||
guide_number?: string;
|
||||
depreciation_date?: number;
|
||||
rectification?: number;
|
||||
warehouse?: string;
|
||||
location?: string;
|
||||
lines?: LineItem[];
|
||||
}
|
||||
|
||||
export interface UpdateItemData {
|
||||
reference_number?: string;
|
||||
order?: string;
|
||||
guide_number?: string;
|
||||
depreciation_date?: number;
|
||||
rectification?: boolean;
|
||||
warehouse?: string;
|
||||
location?: string;
|
||||
lines?: LineItem[];
|
||||
}
|
||||
export interface UpdateItemData extends Partial<Omit<Item, 'id' | 'invoice_id' | 'created_at' | 'updated_at'>> {}
|
||||
|
||||
/**
|
||||
* API para Items
|
||||
|
||||
Reference in New Issue
Block a user