133 lines
2.8 KiB
TypeScript
133 lines
2.8 KiB
TypeScript
export type PeriodType = 'quincena_15' | 'quincena_30';
|
|
|
|
export type ViewType = 'cruce' | 'historial';
|
|
|
|
export type ToastType = 'success' | 'error' | 'info';
|
|
|
|
export type CountryCode = 'GT' | 'TT' | 'PA' | 'SV';
|
|
|
|
export interface CountryConfig {
|
|
code: CountryCode;
|
|
name: string;
|
|
flag: string;
|
|
currency: string;
|
|
locale: string;
|
|
enabled: boolean;
|
|
}
|
|
|
|
export type ReconciliationStatus =
|
|
| 'Coincidencia'
|
|
| 'Riesgo'
|
|
| 'No encontrado'
|
|
| 'Pendiente revisión'
|
|
| 'Resuelto';
|
|
|
|
export type ReconciliationSource =
|
|
| 'nomina_vs_banco'
|
|
| 'banco_sin_nomina'
|
|
| 'banco_sin_bamboo'
|
|
| 'nomina_sin_cuenta'
|
|
| 'posible_cuenta_mal_digitada'
|
|
| 'diferencia_nombre_banco'
|
|
| 'discrepancia'
|
|
| 'coincidencia';
|
|
|
|
export interface UploadedFile {
|
|
name: string;
|
|
size: string;
|
|
type: 'payroll' | 'bank';
|
|
rawFile?: File;
|
|
}
|
|
|
|
export interface PeriodRange {
|
|
start: string;
|
|
end: string;
|
|
label: string;
|
|
}
|
|
|
|
export interface BambooCandidate {
|
|
employeeNumber: string;
|
|
employeeName: string;
|
|
score: number | null;
|
|
}
|
|
|
|
export interface ReconciliationRow {
|
|
id: string;
|
|
employee: string;
|
|
employeeNumber: string;
|
|
account?: string;
|
|
currency?: string;
|
|
amountPayroll: number | null;
|
|
amountBank: number | null;
|
|
difference: number | null;
|
|
status: ReconciliationStatus;
|
|
category?: string;
|
|
observation: string;
|
|
source?: ReconciliationSource;
|
|
bankNameFile?: string;
|
|
bankAccountHolder?: string;
|
|
bestBambooCandidate?: BambooCandidate | null;
|
|
ambiguousBambooMatch?: boolean;
|
|
}
|
|
|
|
export interface ReconciliationSummary {
|
|
matches: number;
|
|
discrepancies: number;
|
|
bankWithoutPayroll: number;
|
|
bankWithoutBamboo: number;
|
|
payrollWithoutAccount: number;
|
|
nameDifferences: number;
|
|
possibleWrongAccounts: number;
|
|
totalPending: number;
|
|
totalRows: number;
|
|
totalPayroll?: number;
|
|
totalBank?: number;
|
|
totalDifference?: number;
|
|
}
|
|
|
|
export interface ReconciliationResponse {
|
|
ok: boolean;
|
|
reportKind?: 'nomina' | 'bono14';
|
|
executionId?: string;
|
|
reportUrl?: string;
|
|
summary: ReconciliationSummary;
|
|
rows: ReconciliationRow[];
|
|
message?: string;
|
|
}
|
|
|
|
export interface HistoricalReport {
|
|
id: string;
|
|
country: CountryCode;
|
|
date: string;
|
|
executionDate?: string;
|
|
period: string;
|
|
periodStart?: string;
|
|
periodEnd?: string;
|
|
payrollFile: string;
|
|
bankFiles: string[];
|
|
matches: number;
|
|
discrepancies: number;
|
|
bankWithoutPayroll: number;
|
|
bankWithoutBamboo: number;
|
|
payrollWithoutAccount: number;
|
|
nameDifferences: number;
|
|
totalPending: number;
|
|
totalPayroll?: number;
|
|
totalBank?: number;
|
|
totalDifference?: number;
|
|
status: 'Pendiente revisión' | 'Resuelto';
|
|
reportUrl?: string;
|
|
spreadsheetId?: string;
|
|
executedBy?: string;
|
|
executedByEmail?: string;
|
|
resolvedBy?: string;
|
|
resolvedByEmail?: string;
|
|
resolvedAt?: string;
|
|
resolutionComment?: string;
|
|
}
|
|
|
|
export interface AppUser {
|
|
name: string;
|
|
email: string;
|
|
}
|