@devlas/dte-sii 2.12.19 → 2.12.20
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/SiiCertificacion.js +7 -0
- package/package.json +1 -1
package/SiiCertificacion.js
CHANGED
|
@@ -1281,6 +1281,13 @@ class SiiCertificacion {
|
|
|
1281
1281
|
const formAction = SiiSession.extractFormAction(body);
|
|
1282
1282
|
if (formAction && formAction.includes('pe_avance9')) {
|
|
1283
1283
|
const hiddenPaso3 = SiiSession.extractInputValues(body);
|
|
1284
|
+
// El HTML tiene DOS botones (CONFIRMAR="Confirmar Declaración" y Salir="No Confirmar",
|
|
1285
|
+
// este último con TYPE=button). extractInputValues lee <input> sin distinguir el type,
|
|
1286
|
+
// así que Salir queda en hiddenPaso3 con valor "No Confirmar". Un browser real solo
|
|
1287
|
+
// envía el par name/value del botón que el usuario clickeó — nunca ambos. Si se manda
|
|
1288
|
+
// Salir=No Confirmar junto con CONFIRMAR, el SII podría interpretar la presencia de ese
|
|
1289
|
+
// campo como "el usuario canceló", pisando la confirmación real.
|
|
1290
|
+
delete hiddenPaso3.Salir;
|
|
1284
1291
|
const opcFields = {};
|
|
1285
1292
|
for (const key of Object.keys(hiddenPaso3)) {
|
|
1286
1293
|
if (/^OPC\d+$/.test(key)) opcFields[key] = 'S';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devlas/dte-sii",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.20",
|
|
4
4
|
"description": "Facturación y boletas electrónicas para el SII de Chile. Genera, timbra, firma y envía DTEs, libros electrónicos y automatiza la certificación.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "dte-sii.d.ts",
|