arca-sdk 1.3.1 → 1.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -222,8 +222,7 @@ declare enum VatCondition {
222
222
  PROVEEDOR_DEL_EXTERIOR = 8,
223
223
  CLIENTE_DEL_EXTERIOR = 9,
224
224
  IVA_LIBERADO_LEY_19640 = 10,
225
- IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION = 11,
226
- MONOTRIBUTISTA_SOCIAL = 13
225
+ IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION = 11
227
226
  }
228
227
  /**
229
228
  * Datos del comprador
@@ -720,6 +719,8 @@ interface Taxpayer {
720
719
  isSocialMonotax: boolean;
721
720
  /** ¿Es exento de IVA? */
722
721
  isVATExempt: boolean;
722
+ /** Condición frente al IVA autocalculada (lista para WSFE/CAEA) */
723
+ vatCondition?: VatCondition;
723
724
  }
724
725
  /**
725
726
  * Respuesta del servicio de Padrón
package/dist/index.d.ts CHANGED
@@ -222,8 +222,7 @@ declare enum VatCondition {
222
222
  PROVEEDOR_DEL_EXTERIOR = 8,
223
223
  CLIENTE_DEL_EXTERIOR = 9,
224
224
  IVA_LIBERADO_LEY_19640 = 10,
225
- IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION = 11,
226
- MONOTRIBUTISTA_SOCIAL = 13
225
+ IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION = 11
227
226
  }
228
227
  /**
229
228
  * Datos del comprador
@@ -720,6 +719,8 @@ interface Taxpayer {
720
719
  isSocialMonotax: boolean;
721
720
  /** ¿Es exento de IVA? */
722
721
  isVATExempt: boolean;
722
+ /** Condición frente al IVA autocalculada (lista para WSFE/CAEA) */
723
+ vatCondition?: VatCondition;
723
724
  }
724
725
  /**
725
726
  * Respuesta del servicio de Padrón
package/dist/index.js CHANGED
@@ -537,7 +537,6 @@ var VatCondition = /* @__PURE__ */ ((VatCondition2) => {
537
537
  VatCondition2[VatCondition2["CLIENTE_DEL_EXTERIOR"] = 9] = "CLIENTE_DEL_EXTERIOR";
538
538
  VatCondition2[VatCondition2["IVA_LIBERADO_LEY_19640"] = 10] = "IVA_LIBERADO_LEY_19640";
539
539
  VatCondition2[VatCondition2["IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION"] = 11] = "IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION";
540
- VatCondition2[VatCondition2["MONOTRIBUTISTA_SOCIAL"] = 13] = "MONOTRIBUTISTA_SOCIAL";
541
540
  return VatCondition2;
542
541
  })(VatCondition || {});
543
542
 
@@ -1445,6 +1444,16 @@ var PadronService = class {
1445
1444
  if (!p) {
1446
1445
  return { error: "CUIT no encontrado" };
1447
1446
  }
1447
+ let vatCondition;
1448
+ if (this.hasTaxId(p, 30)) {
1449
+ vatCondition = 1 /* IVA_RESPONSABLE_INSCRIPTO */;
1450
+ } else if (this.hasTaxId(p, 32)) {
1451
+ vatCondition = 4 /* IVA_SUJETO_EXENTO */;
1452
+ } else if (this.hasTaxId(p, 20) || this.hasTaxId(p, 21) || this.hasTaxId(p, 22) || this.hasTaxId(p, 24)) {
1453
+ vatCondition = 6 /* RESPONSABLE_MONOTRIBUTO */;
1454
+ } else {
1455
+ vatCondition = 5 /* CONSUMIDOR_FINAL */;
1456
+ }
1448
1457
  const taxpayer = {
1449
1458
  taxId: Number(p.idPersona),
1450
1459
  personType: p.tipoPersona,
@@ -1458,12 +1467,13 @@ var PadronService = class {
1458
1467
  mainActivity: p.descripcionActividadPrincipal,
1459
1468
  isVATRegistered: this.hasTaxId(p, 30),
1460
1469
  // 30 = IVA
1461
- isMonotax: this.hasTaxId(p, 20) || this.hasTaxId(p, 24) || this.hasTaxId(p, 21),
1470
+ isMonotax: this.hasTaxId(p, 20) || this.hasTaxId(p, 24) || this.hasTaxId(p, 21) || this.hasTaxId(p, 22),
1462
1471
  // General o Social/Autónomo
1463
1472
  isSocialMonotax: this.hasTaxId(p, 24) || this.hasTaxId(p, 21),
1464
1473
  // 24 = Obra Social / Promovido, 21 = Autónomo
1465
- isVATExempt: this.hasTaxId(p, 32)
1474
+ isVATExempt: this.hasTaxId(p, 32),
1466
1475
  // 32 = IVA Exento
1476
+ vatCondition
1467
1477
  };
1468
1478
  return { taxpayer };
1469
1479
  }