feat: Implement detailed and normal report types for invoice movements, enhancing number formatting and API request handling.
This commit is contained in:
@@ -28,7 +28,7 @@ export interface BaseFilter {
|
||||
database_name: string;
|
||||
}
|
||||
|
||||
export interface ImportTemporaryFilter extends BaseFilter {}
|
||||
export interface ImportTemporaryFilter extends BaseFilter { }
|
||||
|
||||
export interface ImportDefinitiveFilter extends BaseFilter {
|
||||
movement_type: MovementTypeFilter;
|
||||
@@ -57,6 +57,7 @@ export interface AllMovementsFilter {
|
||||
provider?: string | null;
|
||||
buyer?: string | null;
|
||||
pedimento_code?: string | null;
|
||||
report_type: ReportType;
|
||||
currency_type: CurrencyType;
|
||||
exchange_rate_type: ExchangeRateType;
|
||||
is_shelter: boolean;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
const BASE_URL = import.meta.env.VITE_API_URL || '';
|
||||
const BASE_URL = import.meta.env.VITE_API_URL || '';
|
||||
|
||||
export const invoicesReportsApi = {
|
||||
@@ -15,7 +14,6 @@ export const invoicesReportsApi = {
|
||||
|
||||
const token = localStorage.getItem('access_token');
|
||||
const response = await fetch(endpoint, {
|
||||
method: 'POST',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Authorization': `Bearer ${token}`,
|
||||
@@ -25,14 +23,11 @@ export const invoicesReportsApi = {
|
||||
|
||||
if (!response.ok) throw new Error('Error al iniciar la generación');
|
||||
return await response.json();
|
||||
return await response.json();
|
||||
},
|
||||
|
||||
getTaskStatus: async (taskId: string) => {
|
||||
const endpoint = `${BASE_URL}/v1/a76/reports/importacion/facturas/tasks/${taskId}`;
|
||||
|
||||
const endpoint = `${BASE_URL}/v1/a76/reports/importacion/facturas/tasks/${taskId}`;
|
||||
|
||||
const token = localStorage.getItem('access_token');
|
||||
const response = await fetch(endpoint, {
|
||||
method: 'GET',
|
||||
|
||||
Reference in New Issue
Block a user