refactor(declaraciones): renombrar SUELDOS→ISN, agregar ISH

- Cambia la opción 'SUELDOS' por 'ISN' (Impuesto Sobre Nómina)
- Agrega nueva opción 'ISH' (Impuesto Sobre Hospedaje)
- ISH no cierra alertas ni obligaciones (aún no hay flujo definido)
- ISN mantiene keywords de sueldos/salarios/nómina + agrega 'isn'
- Migración 047: actualiza declaraciones históricas SUELDOS→ISN en BD
This commit is contained in:
Horux Dev
2026-05-25 02:35:16 +00:00
parent e35eae2a72
commit cbefaa2bf7
5 changed files with 19 additions and 7 deletions

View File

@@ -9,7 +9,8 @@ const IMPUESTO_A_OBLIGACION_KEYWORDS: Record<string, { include: string[]; exclud
IVA: { include: ['iva'], exclude: ['diot', 'proveedores de iva', 'informativa'] },
ISR: { include: ['isr'], exclude: ['retenciones', 'asimilados a salarios'] },
IEPS: { include: ['ieps'], exclude: [] },
SUELDOS: { include: ['sueldos', 'salarios', 'nómina'], exclude: [] },
ISN: { include: ['isn', 'sueldos', 'salarios', 'nómina'], exclude: [] },
ISH: { include: [], exclude: [] },
DIOT: { include: ['diot', 'proveedores de iva'], exclude: [] },
OTRO: { include: [], exclude: [] },
};
@@ -93,7 +94,7 @@ async function completarObligacionesPorDeclaracion(
* adicional, no reemplaza.
*/
export type Impuesto = 'IVA' | 'ISR' | 'IEPS' | 'SUELDOS' | 'DIOT' | 'OTRO';
export type Impuesto = 'IVA' | 'ISR' | 'IEPS' | 'ISN' | 'DIOT' | 'OTRO' | 'ISH';
export type Periodicidad = 'mensual' | 'bimestral' | 'trimestral' | 'semestral' | 'anual';
@@ -123,17 +124,19 @@ const IMPUESTO_A_PREFIJO_DECL: Record<string, string[]> = {
IVA: ['decl-iva'],
ISR: ['decl-isr'],
IEPS: ['decl-ieps'],
SUELDOS: ['decl-sueldos'],
ISN: ['decl-isn'],
DIOT: ['diot'],
OTRO: [],
ISH: [],
};
const IMPUESTO_A_PREFIJO_PAGO: Record<string, string[]> = {
IVA: ['pago-iva'],
ISR: ['pago-isr'],
IEPS: ['pago-ieps'],
SUELDOS: [], // sueldos solo es declaración informativa, no tiene pago provisional
ISN: [], // ISN solo es declaración informativa, no tiene pago provisional
DIOT: [],
OTRO: [],
ISH: [],
};
/**