Merge branch 'development' of https://git.aduanasoft.com/ADUANASOFT/anexo76 into feature/item_por_tipo_factura
This commit is contained in:
@@ -8,6 +8,7 @@ export interface UMCustomsMex {
|
||||
id: number;
|
||||
code: string;
|
||||
description: string | null;
|
||||
a76_unit_code: string | null;
|
||||
created_at: string | null;
|
||||
updated_at: string | null;
|
||||
}
|
||||
@@ -15,11 +16,13 @@ export interface UMCustomsMex {
|
||||
export interface UMCustomsMexCreate {
|
||||
code: string;
|
||||
description?: string | null;
|
||||
a76_unit_code?: string | null;
|
||||
}
|
||||
|
||||
export interface UMCustomsMexUpdate {
|
||||
code?: string;
|
||||
description?: string | null;
|
||||
a76_unit_code?: string | null;
|
||||
}
|
||||
|
||||
export interface UMCustomsMexListResponse {
|
||||
|
||||
@@ -222,7 +222,7 @@ export interface UnitOfMeasureCustoms {
|
||||
id: number;
|
||||
code: string;
|
||||
description: string | null;
|
||||
scaii_unit_code: string | null;
|
||||
a76_unit_code: string | null;
|
||||
created_at: string | null;
|
||||
updated_at: string | null;
|
||||
}
|
||||
@@ -230,13 +230,13 @@ export interface UnitOfMeasureCustoms {
|
||||
export interface UnitOfMeasureCustomsCreate {
|
||||
code: string;
|
||||
description?: string | null;
|
||||
scaii_unit_code?: string | null;
|
||||
a76_unit_code?: string | null;
|
||||
}
|
||||
|
||||
export interface UnitOfMeasureCustomsUpdate {
|
||||
code?: string;
|
||||
description?: string | null;
|
||||
scaii_unit_code?: string | null;
|
||||
a76_unit_code?: string | null;
|
||||
}
|
||||
|
||||
export interface UnitOfMeasureCustomsListResponse {
|
||||
|
||||
@@ -208,7 +208,7 @@ export interface Invoice {
|
||||
invoice_date?: string | null;
|
||||
capture_date: string;
|
||||
emission_date?: string | null;
|
||||
status?: boolean | null;
|
||||
status?: "pending" | "processed" | "reversed" | boolean | null;
|
||||
processed_date?: string | null;
|
||||
who_processed?: string | null;
|
||||
capture_user?: string | null;
|
||||
@@ -266,7 +266,7 @@ export interface CreateInvoiceData {
|
||||
proforma_number?: string | null;
|
||||
invoice_date?: string | null;
|
||||
emission_date?: string | null;
|
||||
status?: boolean | null;
|
||||
status?: "pending" | "processed" | "reversed" | boolean | null;
|
||||
processed_date?: string | null;
|
||||
who_processed?: string | null;
|
||||
capture_user?: string | null;
|
||||
@@ -319,7 +319,7 @@ export interface UpdateInvoiceData {
|
||||
cfdi_uuid?: string | null;
|
||||
path_pdf?: string | null;
|
||||
path_xml?: string | null;
|
||||
status?: boolean | null;
|
||||
status?: "pending" | "processed" | "reversed" | boolean | null;
|
||||
compliance_mx?: Partial<InvoiceComplianceMx> | null;
|
||||
financials?: Partial<InvoiceFinancials> | null;
|
||||
logistics?: Partial<InvoiceLogistics>[] | null;
|
||||
@@ -515,5 +515,29 @@ export const invoicesApi = {
|
||||
sql_errors?: Array<{ consecutive: number; error: string }>;
|
||||
};
|
||||
}>(`/v1/a76/invoices/process/${taskId}/status`);
|
||||
},
|
||||
|
||||
revertInvoice: (invoiceId: number, companyId: number) => {
|
||||
const params = new URLSearchParams({
|
||||
company_id: companyId.toString()
|
||||
});
|
||||
return api.post<{ task_id: string }>(
|
||||
`/v1/a76/invoices/${invoiceId}/revert?${params.toString()}`,
|
||||
{}
|
||||
);
|
||||
},
|
||||
|
||||
getRevertStatus: (taskId: string) => {
|
||||
return api.get<{
|
||||
state: 'PROCESSING' | 'SUCCESS' | 'FAILURE';
|
||||
info?: { current: number; status: string };
|
||||
result?: {
|
||||
status: 'success' | 'validation_error' | 'error';
|
||||
invoice_id?: number;
|
||||
message?: string;
|
||||
errors?: Array<{ field: string; message: string; code?: string; solution?: string[] }>;
|
||||
sql_errors?: Array<{ consecutive: number; error: string }>;
|
||||
};
|
||||
}>(`/v1/a76/invoices/revert/${taskId}/status`);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -66,6 +66,12 @@ export interface InvData {
|
||||
use_rule_8?: boolean | null;
|
||||
|
||||
fraction_9801?: string | null;
|
||||
immex_type?: string | null;
|
||||
disable_movements?: boolean | null;
|
||||
pga_program_code?: string | null;
|
||||
non_discharge_clients?: unknown[] | null;
|
||||
bom_items?: unknown[] | null;
|
||||
countries?: unknown[] | null;
|
||||
fraction_type?: string | null;
|
||||
use_alternate_quantity?: boolean | null;
|
||||
repair_unit_cost?: number | null;
|
||||
|
||||
Reference in New Issue
Block a user