Partidas por tipo de factura en importacion
This commit is contained in:
@@ -35,6 +35,33 @@ export interface IdentifierListResponse {
|
||||
pages: number;
|
||||
}
|
||||
|
||||
export interface IdentifierDetail {
|
||||
id: number;
|
||||
invoice_consecutive: number | null;
|
||||
part_line: number | null;
|
||||
identifier_code: string | null;
|
||||
module: string | null;
|
||||
complement1: string | null;
|
||||
complement2: string | null;
|
||||
complement3: string | null;
|
||||
item_line_id: number | null;
|
||||
company_id: number;
|
||||
tenant_id: number;
|
||||
}
|
||||
|
||||
export interface IdentifierDetailCreate {
|
||||
invoice_consecutive?: number | null;
|
||||
part_line?: number | null;
|
||||
identifier_code?: string | null;
|
||||
module?: string | null;
|
||||
complement1?: string | null;
|
||||
complement2?: string | null;
|
||||
complement3?: string | null;
|
||||
item_line_id?: number | null;
|
||||
}
|
||||
|
||||
export interface IdentifierDetailUpdate extends Partial<IdentifierDetailCreate> { }
|
||||
|
||||
export async function getIdentifiers(
|
||||
page = 1,
|
||||
pageSize = 50,
|
||||
@@ -71,4 +98,29 @@ export async function deleteIdentifier(
|
||||
companyId: number
|
||||
): Promise<ApiResponse<void>> {
|
||||
return await api.delete(`/v1/a76/identifiers/${id}/?company_id=${companyId}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* API for Identifier Details
|
||||
*/
|
||||
export async function createIdentifierDetail(
|
||||
data: IdentifierDetailCreate,
|
||||
companyId: number
|
||||
): Promise<ApiResponse<IdentifierDetail>> {
|
||||
return await api.post(`/v1/a76/identifiers/details/?company_id=${companyId}`, data);
|
||||
}
|
||||
|
||||
export async function updateIdentifierDetail(
|
||||
id: number,
|
||||
data: IdentifierDetailUpdate,
|
||||
companyId: number
|
||||
): Promise<ApiResponse<IdentifierDetail>> {
|
||||
return await api.put(`/v1/a76/identifiers/details/${id}/?company_id=${companyId}`, data);
|
||||
}
|
||||
|
||||
export async function deleteIdentifierDetail(
|
||||
id: number,
|
||||
companyId: number
|
||||
): Promise<ApiResponse<void>> {
|
||||
return await api.delete(`/v1/a76/identifiers/details/${id}/?company_id=${companyId}`);
|
||||
}
|
||||
@@ -88,6 +88,10 @@ export interface LineReferences {
|
||||
serie_id?: number;
|
||||
}
|
||||
|
||||
import type {
|
||||
IdentifierDetail
|
||||
} from './general_catalogs/identifiers';
|
||||
|
||||
export interface Serie {
|
||||
id?: number;
|
||||
line_item_id?: number;
|
||||
@@ -98,6 +102,9 @@ export interface Serie {
|
||||
brand?: string;
|
||||
expo_brad?: string;
|
||||
number_id?: string;
|
||||
import_invoice?: string;
|
||||
import_line?: number;
|
||||
image_path?: string;
|
||||
}
|
||||
|
||||
export interface FaLineItem {
|
||||
@@ -207,6 +214,7 @@ export interface Item {
|
||||
reference?: LineReferences;
|
||||
fa_data?: FaLineItem; // Fixed Asset specific data
|
||||
series?: Serie[]; // Series data (multiple per line)
|
||||
identifiers?: IdentifierDetail[]; // Identifiers for this line
|
||||
}
|
||||
|
||||
export interface ItemListResponse {
|
||||
|
||||
Reference in New Issue
Block a user