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/README.md +5 -0
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -314,6 +314,11 @@ Con la eliminación total de la Factura Clase "M", ARCA instruyó el uso de Fact
|
|
|
314
314
|
* **Pago en CBU Informada:**
|
|
315
315
|
De igual modo, si te corresponde emitir con la leyenda de obligatoriedad de CBU, se adjunta el opcional correspondiente declarando tu cuenta bancaria asociada.
|
|
316
316
|
|
|
317
|
+
### 🤝 Monotributo Social y Regímenes Especiales
|
|
318
|
+
Para el Web Service de Facturación Electrónica (WSFE), la AFIP exige que todo contribuyente bajo el régimen de Monotributo (sea estándar, social o promovido) se declare bajo la Condición de IVA de **Responsable Monotributo (Código 6)**. El Código de IVA 13 (Monotributista Social) suele ser rechazado en producción.
|
|
319
|
+
|
|
320
|
+
Por esta razón, el SDK detecta automáticamente si el contribuyente tiene activos los impuestos de recaudación de monotributo (impuestos 20, 21, 22 o 24) en su perfil y mapea de forma segura su propiedad `vatCondition` al Código 6, previniendo errores de autorización de AFIP ("Computador no autorizado") de forma automática.
|
|
321
|
+
|
|
317
322
|
---
|
|
318
323
|
|
|
319
324
|
### Manejo de errores
|
package/dist/index.cjs
CHANGED
|
@@ -585,7 +585,6 @@ var VatCondition = /* @__PURE__ */ ((VatCondition2) => {
|
|
|
585
585
|
VatCondition2[VatCondition2["CLIENTE_DEL_EXTERIOR"] = 9] = "CLIENTE_DEL_EXTERIOR";
|
|
586
586
|
VatCondition2[VatCondition2["IVA_LIBERADO_LEY_19640"] = 10] = "IVA_LIBERADO_LEY_19640";
|
|
587
587
|
VatCondition2[VatCondition2["IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION"] = 11] = "IVA_RESPONSABLE_INSCRIPTO_AGENTE_PERCEPCION";
|
|
588
|
-
VatCondition2[VatCondition2["MONOTRIBUTISTA_SOCIAL"] = 13] = "MONOTRIBUTISTA_SOCIAL";
|
|
589
588
|
return VatCondition2;
|
|
590
589
|
})(VatCondition || {});
|
|
591
590
|
|
|
@@ -1493,6 +1492,16 @@ var PadronService = class {
|
|
|
1493
1492
|
if (!p) {
|
|
1494
1493
|
return { error: "CUIT no encontrado" };
|
|
1495
1494
|
}
|
|
1495
|
+
let vatCondition;
|
|
1496
|
+
if (this.hasTaxId(p, 30)) {
|
|
1497
|
+
vatCondition = 1 /* IVA_RESPONSABLE_INSCRIPTO */;
|
|
1498
|
+
} else if (this.hasTaxId(p, 32)) {
|
|
1499
|
+
vatCondition = 4 /* IVA_SUJETO_EXENTO */;
|
|
1500
|
+
} else if (this.hasTaxId(p, 20) || this.hasTaxId(p, 21) || this.hasTaxId(p, 22) || this.hasTaxId(p, 24)) {
|
|
1501
|
+
vatCondition = 6 /* RESPONSABLE_MONOTRIBUTO */;
|
|
1502
|
+
} else {
|
|
1503
|
+
vatCondition = 5 /* CONSUMIDOR_FINAL */;
|
|
1504
|
+
}
|
|
1496
1505
|
const taxpayer = {
|
|
1497
1506
|
taxId: Number(p.idPersona),
|
|
1498
1507
|
personType: p.tipoPersona,
|
|
@@ -1506,12 +1515,13 @@ var PadronService = class {
|
|
|
1506
1515
|
mainActivity: p.descripcionActividadPrincipal,
|
|
1507
1516
|
isVATRegistered: this.hasTaxId(p, 30),
|
|
1508
1517
|
// 30 = IVA
|
|
1509
|
-
isMonotax: this.hasTaxId(p, 20) || this.hasTaxId(p, 24) || this.hasTaxId(p, 21),
|
|
1518
|
+
isMonotax: this.hasTaxId(p, 20) || this.hasTaxId(p, 24) || this.hasTaxId(p, 21) || this.hasTaxId(p, 22),
|
|
1510
1519
|
// General o Social/Autónomo
|
|
1511
1520
|
isSocialMonotax: this.hasTaxId(p, 24) || this.hasTaxId(p, 21),
|
|
1512
1521
|
// 24 = Obra Social / Promovido, 21 = Autónomo
|
|
1513
|
-
isVATExempt: this.hasTaxId(p, 32)
|
|
1522
|
+
isVATExempt: this.hasTaxId(p, 32),
|
|
1514
1523
|
// 32 = IVA Exento
|
|
1524
|
+
vatCondition
|
|
1515
1525
|
};
|
|
1516
1526
|
return { taxpayer };
|
|
1517
1527
|
}
|