{"id":418,"date":"2026-08-15T22:15:31","date_gmt":"2026-08-15T22:15:31","guid":{"rendered":"https:\/\/www.informestecnicos.com\/?page_id=418"},"modified":"2026-08-15T22:50:22","modified_gmt":"2026-08-15T22:50:22","slug":"validacion-de-documentos-tecnicos","status":"publish","type":"page","link":"https:\/\/www.informestecnicos.com\/?page_id=418","title":{"rendered":"Validaci\u00f3n de documentos t\u00e9cnicos"},"content":{"rendered":"\n<div>\n    <h2>Validaci\u00f3n de documento<\/h2>\n\n    <p>Ingrese el c\u00f3digo de validaci\u00f3n:<\/p>\n\n    <input type=\"text\" id=\"codigo_validacion\" placeholder=\"Ej: DOC-001\">\n\n    <button type=\"button\" id=\"buscar_documento\">\n        Validar documento\n    <\/button>\n\n    <div id=\"resultado_validacion\" style=\"margin-top:20px;\"><\/div>\n<\/div>\n\n<script>\ndocument.getElementById('buscar_documento').addEventListener('click', function() {\n\n    const codigo = document.getElementById('codigo_validacion').value.trim();\n    const resultado = document.getElementById('resultado_validacion');\n\n    if (!codigo) {\n        resultado.innerHTML = '<p>Ingrese un c\u00f3digo de validaci\u00f3n.<\/p>';\n        return;\n    }\n\n    resultado.innerHTML = '<p>Buscando documento...<\/p>';\n\n    const datos = new FormData();\n    datos.append('action', 'validar_documento');\n    datos.append('codigo', codigo);\n\n    fetch('\/wp-admin\/admin-ajax.php', {\n        method: 'POST',\n        body: datos\n    })\n    .then(response => response.json())\n    .then(data => {\n\n        if (!data.success) {\n            resultado.innerHTML =\n                '<p><strong>\u274c Documento no encontrado.<\/strong><\/p>';\n            return;\n        }\n\n        resultado.innerHTML = `\n            <h3>\u2705 Documento v\u00e1lido<\/h3>\n            <p><strong>C\u00f3digo:<\/strong> ${data.data.codigo}<\/p>\n            <p><strong>Cliente:<\/strong> ${data.data.cliente}<\/p>\n            <p><strong>Tipo de documento:<\/strong> ${data.data.tipo}<\/p>\n            <p><strong>Fecha de emisi\u00f3n:<\/strong> ${data.data.fecha}<\/p>\n        `;\n    })\n    .catch(error => {\n        resultado.innerHTML =\n            '<p>Ocurri\u00f3 un error al validar el documento.<\/p>';\n    });\n\n});\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>Validaci\u00f3n de documento Ingrese el c\u00f3digo de validaci\u00f3n: Validar documento<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-418","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=\/wp\/v2\/pages\/418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=418"}],"version-history":[{"count":7,"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=\/wp\/v2\/pages\/418\/revisions"}],"predecessor-version":[{"id":429,"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=\/wp\/v2\/pages\/418\/revisions\/429"}],"wp:attachment":[{"href":"https:\/\/www.informestecnicos.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}