Merge branch 'development' of https://git.aduanasoft.com/ADUANASOFT/anexo76 into feature/partePais_BOM
This commit is contained in:
@@ -88,6 +88,18 @@ export interface LineReferences {
|
||||
serie_id?: number;
|
||||
}
|
||||
|
||||
export interface Serie {
|
||||
id?: number;
|
||||
line_item_id?: number;
|
||||
row?: number;
|
||||
serial_numbers?: string;
|
||||
model?: string;
|
||||
sub_model?: string;
|
||||
brand?: string;
|
||||
expo_brad?: string;
|
||||
number_id?: string;
|
||||
}
|
||||
|
||||
export interface FaLineItem {
|
||||
id?: number;
|
||||
tenant_id?: number;
|
||||
@@ -183,7 +195,8 @@ export interface Item {
|
||||
quantity?: LineQuantities;
|
||||
description?: LineDescriptions;
|
||||
reference?: LineReferences;
|
||||
fa_data?: FaLineItem; // Fixed Asset specific data
|
||||
fa_data?: FaLineItem; // Fixed Asset specific data
|
||||
series?: Serie[]; // Series data (multiple per line)
|
||||
}
|
||||
|
||||
export interface ItemListResponse {
|
||||
|
||||
59
frontend/src/lib/api/dashboard/a76/saldos-report.ts
Normal file
59
frontend/src/lib/api/dashboard/a76/saldos-report.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
/**
|
||||
* API Client for Saldos Temporales Report
|
||||
*/
|
||||
import { api } from '$lib/api';
|
||||
|
||||
// ===== TYPES =====
|
||||
|
||||
export interface SaldosFilter {
|
||||
// Range / Period
|
||||
range_type: string; // pedimento | payment_date | invoice_date | parts | classes
|
||||
start_date?: string | null; // For pedimento/part/class identifiers
|
||||
end_date?: string | null; // For pedimento/part/class identifiers
|
||||
date_start?: string | null; // Explicit start date filter
|
||||
date_end?: string | null; // Explicit end date filter
|
||||
|
||||
// Column 2 – Filtros e Identificadores
|
||||
currency: string; // foreign | national
|
||||
report_type: string; // normal | detailed | with_download
|
||||
exchange_rate: string; // invoice_date | payment_date
|
||||
omit_low_balance: boolean;
|
||||
balance_type: string; // normal | repair | both
|
||||
level: string; // partida | subpartida | all
|
||||
|
||||
// Column 3 – Configuración Final
|
||||
end_date_as_cutoff: boolean;
|
||||
show_pending_series: boolean;
|
||||
include_asset_tag_images: boolean;
|
||||
use_large_asset_tag_icons: boolean;
|
||||
send_email: boolean;
|
||||
julian_date: boolean;
|
||||
include_regla_octava: boolean;
|
||||
shelter: boolean;
|
||||
|
||||
// Print options
|
||||
print_part: boolean;
|
||||
print_class: boolean;
|
||||
|
||||
// Optional identifiers populated from catalog selectors
|
||||
provider?: string | null;
|
||||
buyer?: string | null;
|
||||
asset_class?: string | null;
|
||||
asset_type?: string | null;
|
||||
location?: string | null;
|
||||
pedimento_code?: string | null;
|
||||
}
|
||||
|
||||
// ===== API METHODS =====
|
||||
|
||||
export const saldosReportApi = {
|
||||
/** Trigger async CSV generation; returns task_id */
|
||||
generateReportAsync: (filters: SaldosFilter, companyId: number) =>
|
||||
api.post<{ task_id: string }>(`/v1/a76/reports/movements/saldos/generate?company_id=${companyId}`, filters),
|
||||
|
||||
/** Poll task status */
|
||||
getTaskStatus: (taskId: string) =>
|
||||
api.get<{ task_id: string; status: string; result?: any; meta?: any }>(
|
||||
`/v1/a76/reports/movements/saldos/task/${taskId}`
|
||||
)
|
||||
};
|
||||
Reference in New Issue
Block a user