{"id":6717,"date":"2026-06-22T17:28:46","date_gmt":"2026-06-22T15:28:46","guid":{"rendered":"https:\/\/www.didactiaweb.com\/?page_id=6717"},"modified":"2026-07-16T13:23:56","modified_gmt":"2026-07-16T11:23:56","slug":"portal-comandes","status":"publish","type":"page","link":"https:\/\/www.didactiaweb.com\/es\/portal-comandes\/","title":{"rendered":"Portal comandes"},"content":{"rendered":"<div class=\"vc_row wpb_row vc_row-fluid\"><div class=\"wpb_column vc_column_container vc_col-sm-12\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\n\t<div class=\"wpb_raw_code wpb_content_element wpb_raw_html\" >\n\t\t<div class=\"wpb_wrapper\">\n\t\t\t<!-- .....................................HTML.................................................. -->\n\n<div id=\"portal-comandes\">\n\n<div class=\"bloc-pas\">\n\n<h2 id=\"titol_pas1\">\u25bc PAS 1 \u00b7 Escola<\/h2>\n\n<div id=\"contingut_pas1\">\n\n<h3>Identificaci\u00f3<\/h3>\n\n<p>\n<p>\n<label>CIF *<\/label>\n <p style=\"margin-top:4px;font-size:12px;color:#666;\">\nFormat: NIF (12345678A), CIF (B12345678) o Organisme p\u00fablic (Q1234567A).\n<\/p>\n<input type=\"text\" id=\"cif\" style=\"width:100%;\">\n<\/p>\n\n<p id=\"estat_recuperacio\"\nstyle=\"display:none;font-weight:bold;color:#005A9C;margin-top:10px;\">\n<\/p>\n\n\n<p id=\"estat_escola\" style=\"display:none;font-weight:bold;\"><\/p>\n\n<p>\n<label>Nom escola *<\/label><br>\n<input type=\"text\" id=\"nom_escola\" style=\"width:100%;\">\n<\/p>\n\n<h3>Contacte<\/h3>\n\n<p>\n<label>Persona de contacte *<\/label><br>\n<input type=\"text\" id=\"contacte\" style=\"width:100%;\">\n<\/p>\n\n<p>\n<label>Correu contacte *<\/label><br>\n<input type=\"email\" id=\"correu_contacte\" style=\"width:100%;\">\n<\/p>\n\n<p id=\"estat_correu_contacte\"\nstyle=\"display:none;font-weight:bold;\"><\/p>\n\n<p>\n<label>Tel\u00e8fon contacte *<\/label><br>\n<input type=\"text\" id=\"telefon_contacte\" style=\"width:100%;\">\n<\/p>\n\n<h3>Entrega<\/h3>\n\n<p>\n<label>Adre\u00e7a entrega *<\/label><br>\n<textarea id=\"adreca_entrega\" style=\"width:100%;\"><\/textarea>\n<\/p>\n\n<p>\n<label>Horari entrega *<\/label><br>\n<input\ntype=\"text\"\nid=\"horari_entrega\"\nplaceholder=\"Ex: 9h a 16:30h\"\nstyle=\"width:100%;\">\n<\/p>\n\n<p>\n<label>Dies festius *<\/label><br>\n<input\ntype=\"text\"\nid=\"dies_festius\"\nplaceholder=\"Ex: 7 i 8 de desembre\"\nstyle=\"width:100%;\">\n<\/p>\n\n<p>\n<label>Observacions entrega *<\/label><br>\n<textarea id=\"observacions_entrega\" style=\"width:100%;\"><\/textarea>\n<\/p>\n\n<h3>Facturaci\u00f3<\/h3>\n\n<p>\n<label>Nom fiscal *<\/label><br>\n<input type=\"text\" id=\"nom_fiscal\" style=\"width:100%;\">\n<\/p>\n\n<p>\n<label>Adre\u00e7a facturaci\u00f3 *<\/label><br>\n<textarea id=\"adreca_facturacio\" style=\"width:100%;\"><\/textarea>\n<\/p>\n\n<p>\n<label>Correu facturaci\u00f3 *<\/label><br>\n<input type=\"email\" id=\"correu_facturacio\" style=\"width:100%;\">\n<\/p>\n\n<p id=\"estat_correu_facturacio\"\nstyle=\"display:none;font-weight:bold;\"><\/p>\n\n<p>\n<label>Tipus factura *<\/label><br>\n\n<label>\n<input type=\"radio\" name=\"tipus_factura\" value=\"PDF\">\nPDF\n<\/label>\n\n<br>\n\n<label>\n<input type=\"radio\" name=\"tipus_factura\" value=\"Electr\u00f2nica\">\nElectr\u00f2nica\n<\/label>\n\n<\/p>\n\n<h3>Comanda<\/h3>\n\n<p>\n<label>Concepte comanda *<\/label><br>\n<input type=\"text\" id=\"concepte_comanda\" style=\"width:100%;\">\n<\/p>\n\n<p>\n<button type=\"button\" id=\"boto_seguent\">\nValidar dades escola\n<\/button>\n<\/p>\n\n<p id=\"missatge_validacio\"\nstyle=\"display:none;font-weight:bold;margin-top:15px;\"><\/p>\n\n<\/div>\n\n<\/div>\n\n<hr>\n\n<div class=\"bloc-pas\">\n\n<h2 id=\"titol_pas2\">\u25b6 PAS 2 \u00b7 Productes<\/h2>\n\n<div id=\"contingut_pas2\" style=\"display:none;\">\n\n<p>\n<label>Cercar producte<\/label><br>\n<input\ntype=\"text\"\nid=\"cerca_producte\"\nplaceholder=\"Refer\u00e8ncia o nom producte\"\nstyle=\"width:100%;\">\n<\/p>\n\n<p id=\"estat_productes\"\nstyle=\"display:none;font-weight:bold;\"><\/p>\n\n<div id=\"resultats_productes\"><\/div>\n\n<div id=\"llista_productes\"><\/div>\n\n<h3>Comanda<\/h3>\n\n<p>\n\u26a0\ufe0f <strong> Recomanem demanar algunes unitats addicionals per previsi\u00f3 de noves matriculacions<\/strong>\n<\/p>\n\n<table\nid=\"taula_comanda\"\nborder=\"1\"\ncellpadding=\"6\"\nstyle=\"width:100%;border-collapse:collapse;\">\n\n<thead>\n<tr>\n<th>Refer\u00e8ncia<\/th>\n<th>Producte<\/th>\n<th>Quantitat<\/th>\n<th>Curs<\/th>\n<th>Preu s\/IVA<\/th>\n<th>Base<\/th>\n<th>IVA<\/th>\n<th>Total<\/th>\n<th><\/th>\n<\/tr>\n<\/thead>\n\n<tbody>\n<\/tbody>\n\n<\/table>\n\n<br>\n\n<div id=\"totals_comanda\">\n\n<p>\nPorts:\n<strong id=\"total_ports\">0,00 \u20ac<\/strong>\n<\/p>\n\n<p\nid=\"missatge_ports\"\nstyle=\"margin-top:-8px;font-size:13px;color:#666;\">\n<\/p>\n\n\n<p>\nBase imposable:\n<strong id=\"total_base\">0,00 \u20ac<\/strong>\n<\/p>\n\n<p>\nIVA (21%):\n<strong id=\"total_iva\">0,00 \u20ac<\/strong>\n<\/p>\n\n<p>\n<strong>\nIMPORT FINAL:\n<span id=\"total_final\">0,00 \u20ac<\/span>\n<\/strong>\n<\/p>\n\n<p>\n<button type=\"button\" id=\"boto_pas3\">\nValidar productes\n<\/button>\n<\/p>\n\n<p id=\"missatge_pas2\"\nstyle=\"display:none;font-weight:bold;margin-top:15px;\"><\/p>\n\n\n<\/div>\n\n<\/div>\n\n<\/div>\n\n<hr>\n\n<div class=\"bloc-pas\">\n\n<h2 id=\"titol_pas3\">\u25b6 PAS 3 \u00b7 Confirmaci\u00f3<\/h2>\n\n<div id=\"contingut_pas3\" style=\"display:none;\">\n\n<p>\nRevisa totes les dades abans de confirmar.\n<\/p>\n\n<p>\nLes dades de l'escola, la facturaci\u00f3 i els productes continuen visibles als apartats anteriors i es poden modificar si \u00e9s necessari.\n<\/p>\n\n<p>\nSi cliques sol\u00b7licitar un <strong> pressupost pdf, aquest el rebr\u00e0s per correu electr\u00f2nic en 24\/48h. <\/strong> Tamb\u00e9 rebr\u00e0s un enlla\u00e7 per poder recuperar el pressupost un altre dia i confirmar-lo si \u00e9s el cas.\n<\/p>\n\n<p>\nUn cop <strong> confirmada la comanda, rebr\u00e0s en un termini de 24\/48 hores la factura al correu electr\u00f2nic<\/strong> indicat.\nA peu del document trobar\u00e0s el n\u00famero de compte on fer el <strong> pagament mitjan\u00e7ant transfer\u00e8ncia <\/strong> banc\u00e0ria.\n<\/p>\n\n<h3> \ud83d\ude9a LES ENTREGUES ES FARAN DE L'1 AL 11 DE DESEMBRE <\/h3>\n\n<br>\n\n<p style=\"display:flex;gap:10px;flex-wrap:wrap;\">\n\n<button\ntype=\"button\"\nid=\"boto_pressupost\">\n\n\ud83d\udcc4 Sol\u00b7licitar pressupost PDF\n\n<\/button>\n\n<button\ntype=\"button\"\nid=\"boto_confirmar\">\n\n\u2705 Confirmar comanda\n\n<\/button>\n\n<\/p>\n<p\nid=\"missatge_pas3\"\nstyle=\"display:none;font-weight:bold;margin-top:20px;\">\n<\/p>\n\n<h3>\ud83d\udce6 POL\u00cdTICA DE CANVIS I DEVOLUCIONS: <\/h3>\n<p>\nEs poden sol\u00b7licitar canvis o devolucions en un termini m\u00e0xim de <strong> 14 dies naturals des del lliurament <\/strong> , sempre que el producte estigui en perfectes condicions. \nLes despeses de devoluci\u00f3 seran a <strong> c\u00e0rrec del client.<\/strong> <br>\nA Didactia no disposem d\u2019estoc immediat. <strong> No podem garantir la disponibilitat immediata <\/strong> de productes substitutius. \n<\/p>\n\n<\/div>\n\n<\/div>\n\n<div id=\"pantalla_carrega\">\n    <div>\n        \u23f3 Recuperant pressupost...\n    <\/div>\n<\/div>\n\n\n<!-- .....................................CSS.................................................. -->\n\n\n<style>\n\n#portal-comandes input,\n#portal-comandes textarea,\n#portal-comandes select{\n    color:#000 !important;\n    opacity:1 !important;\n    box-sizing:border-box !important;\n}\n\n#portal-comandes input::placeholder,\n#portal-comandes textarea::placeholder{\n    color:#999 !important;\n    opacity:1 !important;\n}\n\n\n\/* ---------------- T\u00cdTOLS PAS ---------------- *\/\n\n#portal-comandes h2{\n    cursor:pointer;\n    margin:0 0 18px;\n    padding:12px 16px;\n    background:rgba(99,181,230,.30);\n    border:1px solid #63b5e6;\n    border-radius:4px;\n    font-size:20px;\n    font-weight:600;\n    color:#2272b8;\n}\n\n#portal-comandes h3{\n    margin:26px 0 18px;\n    font-size:18px;\n    font-weight:500;\n    color:#222;\n}\n\n\n\/* ---------------- TAULES ---------------- *\/\n\n#portal-comandes table{\n    font-size:14px;\n}\n\n\n\/* ---------------- TEXTAREA ---------------- *\/\n\n#portal-comandes textarea{\n    min-height:70px;\n    resize:vertical;\n    width:100% !important;\n    max-width:100%;\n    display:block;\n}\n\n\n\/* ---------------- BOTONS AFEGIR ---------------- *\/\n\n#llista_productes button{\n\n    display:inline-flex;\n    align-items:center;\n    justify-content:center;\n\n    height:32px;\n    padding:0 14px;\n\n    background:#fff;\n    color:#2272b8;\n\n    border:1px solid #2272b8;\n    border-radius:4px;\n\n    font-size:13px;\n    font-weight:600;\n\n    cursor:pointer;\n\n}\n\n#llista_productes button:hover{\n\n    background:#2272b8;\n    color:#fff;\n\n}\n\n#llista_productes button:disabled{\n\n    background:#e5e5e5;\n    color:#666;\n    border:1px solid #ccc;\n    cursor:not-allowed;\n\n}\n\n#llista_productes button:disabled:hover{\n\n    background:#e5e5e5;\n    color:#666;\n\n}\n\n\n\/* ---------------- BOT\u00d3 ELIMINAR ---------------- *\/\n\n#taula_comanda .eliminar{\n\n    display:flex;\n    align-items:center;\n    justify-content:center;\n\n    width:30px;\n    height:30px;\n\n    padding:0;\n\n    background:#fff;\n    color:#c0392b;\n\n    border:1px solid #ddd;\n    border-radius:4px;\n\n    font-size:18px;\n    font-weight:600;\n\n    cursor:pointer;\n\n}\n\n#taula_comanda .eliminar:hover{\n\n    background:#c0392b;\n    color:#fff;\n    border-color:#c0392b;\n\n}\n\n\n\/* ---------------- BOTONS PRINCIPALS ---------------- *\/\n\n#boto_seguent,\n#boto_pas3,\n#boto_pressupost,\n#boto_confirmar{\n\n    display:inline-flex;\n    align-items:center;\n    justify-content:center;\n\n    height:42px;\n    padding:0 20px;\n\n    background:#2272b8;\n    color:#fff;\n\n    border:none;\n    border-radius:4px;\n\n    font-size:15px;\n    font-weight:600;\n\n    cursor:pointer;\n\n}\n\n#boto_seguent:hover,\n#boto_pas3:hover,\n#boto_pressupost:hover,\n#boto_confirmar:hover{\n\n    background:#185d97;\n\n}\n\n\n\/* ---------------- PANTALLA C\u00c0RREGA ---------------- *\/\n\n#pantalla_carrega{\n    position:fixed;\n    top:0;\n    left:0;\n    width:100%;\n    height:100%;\n    background:rgba(255,255,255,.85);\n    display:none;\n    z-index:99999;\n}\n\n#pantalla_carrega div{\n    position:absolute;\n    top:50%;\n    left:50%;\n    transform:translate(-50%,-50%);\n    font-size:24px;\n    font-weight:bold;\n    color:#005A9C;\n}\n\n#taula_comanda thead th{\n\n    background:#f3f4f6;\n    border-bottom:2px solid #d9d9d9;\n    font-weight:600;\n\n}\n\n#taula_comanda th,\n#taula_comanda td{\n\n    padding:8px 10px;\n    vertical-align:middle;\n\n}\n\n#taula_comanda th{\n\n    white-space:nowrap;\n\n}\n\n#taula_comanda td.preu,\n#taula_comanda td.base,\n#taula_comanda td.iva,\n#taula_comanda td.total{\n\n    white-space:nowrap;\n    text-align:right;\n\n}\n\n\/* ---------- Amplades taula ---------- *\/\n\n#taula_comanda{\n\n    width:100%;\n    table-layout:auto;\n\n}\n\n#taula_comanda th:nth-child(1),\n#taula_comanda td:nth-child(1){\n\n    white-space:nowrap;\n\n}\n\n#taula_comanda th:nth-child(3),\n#taula_comanda td:nth-child(3){\n\n    width:70px;\n    text-align:center;\n\n}\n\n#taula_comanda td:nth-child(3) input{\n\n    width:55px !important;\n\n}\n\n#taula_comanda th:nth-child(4),\n#taula_comanda td:nth-child(4){\n\n    width:80px;\n\n}\n\n#taula_comanda td:nth-child(4) input{\n\n    width:70px !important;\n\n}\n\n#taula_comanda th:nth-child(5),\n#taula_comanda td:nth-child(5),\n#taula_comanda th:nth-child(6),\n#taula_comanda td:nth-child(6),\n#taula_comanda th:nth-child(7),\n#taula_comanda td:nth-child(7),\n#taula_comanda th:nth-child(8),\n#taula_comanda td:nth-child(8){\n\n    white-space:nowrap;\n    text-align:right;\n\n}\n\n#taula_comanda th:nth-child(9),\n#taula_comanda td:nth-child(9){\n\n    width:36px;\n    text-align:center;\n\n}\n\n<\/style>\n\n\n\n\n<!-- .....................................SCRIPT.................................................. -->\n\n<script>\n\nlet recordIdEscola = '';\n\nlet numeroPressupostOrigen = '';\n\nfunction validarEmail(email) {\n\n    return \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(email);\n\n}\n\nfunction validarCIF(cif) {\n\n    cif = cif.trim();\n\n    return \/^([ABCDEFGHJNPQRSUVW]\\d{7}[0-9A-J]|[XYZ]\\d{7}[A-Z]|\\d{8}[A-Z])$\/.test(cif);\n\n}\n\nfunction bloquejarFormulari(bloquejar) {\n\n    document.querySelectorAll(\n        '#portal-comandes input, #portal-comandes textarea, #portal-comandes select, #portal-comandes button'\n    ).forEach(function(element) {\n\n        if (element.id !== 'cif') {\n            element.disabled = bloquejar;\n        }\n\n    });\n\n}\n\n\nasync function buscarEscola() {\n\nconsole.log('BUSCANT ESCOLA');\n\nconst campCIF = document.getElementById('cif');\nconst cif = campCIF.value.trim().toUpperCase();\n\ncampCIF.value = cif;\n\n    if (!cif) {\n        return;\n    }\n\nif (!validarCIF(cif)) {\n\n    const estat = document.getElementById('estat_escola');\n\n    estat.style.display = 'block';\n    estat.innerHTML = '\u274c El CIF\/NIF no t\u00e9 un format correcte';\n\n    return;\n\n}\n\n    const estat = document.getElementById('estat_escola');\n\n    estat.style.display = 'block';\n    estat.innerHTML = '\ud83d\udd0d Buscant escola...';\nbloquejarFormulari(true);\n\n    try {\n\n        const resposta = await fetch(\n            '\/wp-json\/portal\/v1\/escola?cif=' +\n            encodeURIComponent(cif)\n        );\n\n        const escola = await resposta.json();\n\n\trecordIdEscola = escola.recordId || '';\n\n\n        if (!escola.trobat) {\n\n            estat.innerHTML =\n                '\ud83c\udd95 Escola nova. Introdu\u00efu les dades manualment.';\n\n         recordIdEscola = ''; \nbloquejarFormulari(false); \n\n\t return;\n        }\n\n        document.getElementById('nom_escola').value =\n            escola.escola || '';\n\n        document.getElementById('nom_fiscal').value =\n            escola.nom_fiscal || '';\n\n        document.getElementById('adreca_facturacio').value =\n            escola.adreca_facturacio || '';\n\n      document.getElementById('correu_facturacio').value = '';\n\n        document.getElementById('adreca_entrega').value =\n            escola.adreca_entrega || '';\n\n        document.getElementById('horari_entrega').value =\n            escola.horari_entrega || '';\n\n        if (escola.tipus_factura === 'PDF') {\n\n            document.querySelector(\n                'input[name=\"tipus_factura\"][value=\"PDF\"]'\n            ).checked = true;\n\n        } else if (escola.tipus_factura === 'Electr\u00f2nica') {\n\n            document.querySelector(\n                'input[name=\"tipus_factura\"][value=\"Electr\u00f2nica\"]'\n            ).checked = true;\n        }\n\n        estat.innerHTML = '\u2705 Escola trobada';\nbloquejarFormulari(false);\n\n    } catch (error) {\n\n        console.error(error);\n\n        estat.innerHTML =\n            '\u274c Error en la consulta';\nbloquejarFormulari(false);\n\n\t}\n}\n\ndocument.getElementById('cif').addEventListener('blur', buscarEscola);\n\ndocument.getElementById('correu_contacte').addEventListener('input', function () {\n\n    this.value = this.value.toLowerCase();\n\n});\n\ndocument.getElementById('correu_contacte').addEventListener('blur', function () {\n\n    const correu = this.value.trim();\n\n    const estat = document.getElementById('estat_correu_contacte');\n\n    if (!correu) {\n\n        estat.style.display = 'none';\n        return;\n\n    }\n\n    if (!validarEmail(correu)) {\n\n        estat.style.display = 'block';\n        estat.style.color = '#c62828';\n        estat.innerHTML = '\u274c El correu no t\u00e9 un format correcte';\n\n        return;\n\n    }\n\n    estat.style.display = 'block';\n    estat.style.color = '#2e7d32';\n    estat.innerHTML = '\u2705 Format correcte';\n\n});\n\ndocument.getElementById('correu_facturacio').addEventListener('input', function () {\n\n    this.value = this.value.toLowerCase();\n\n});\n\ndocument.getElementById('correu_facturacio').addEventListener('blur', function () {\n\n    const correu = this.value.trim();\n\n    const estat = document.getElementById('estat_correu_facturacio');\n\n    if (!correu) {\n\n        estat.style.display = 'none';\n        return;\n\n    }\n\n    if (!validarEmail(correu)) {\n\n        estat.style.display = 'block';\n        estat.style.color = '#c62828';\n        estat.innerHTML = '\u274c El correu no t\u00e9 un format correcte';\n\n        return;\n\n    }\n\n    estat.style.display = 'block';\n    estat.style.color = '#2e7d32';\n    estat.innerHTML = '\u2705 Format correcte';\n\n});\n\ndocument.getElementById('boto_seguent').addEventListener('click', function() {\n\n\n    const campsObligatoris = [\n        'cif',\n        'nom_escola',\n        'contacte',\n        'correu_contacte',\n        'telefon_contacte',\n        'adreca_entrega',\n        'horari_entrega',\n        'dies_festius',\n        'observacions_entrega',\n        'nom_fiscal',\n        'adreca_facturacio',\n        'correu_facturacio',\n        'concepte_comanda'\n    ];\n\n    let error = false;\n\n    campsObligatoris.forEach(function(id) {\n\n        const camp = document.getElementById(id);\n\n        if (!camp || !camp.value.trim()) {\n            error = true;\n        }\n\n    });\n\n    const tipusFactura =\n        document.querySelector(\n            'input[name=\"tipus_factura\"]:checked'\n        );\n\n    if (!tipusFactura) {\n        error = true;\n    }\n\nif (!validarEmail(document.getElementById('correu_contacte').value.trim())) {\n    error = true;\n}\n\nif (!validarEmail(document.getElementById('correu_facturacio').value.trim())) {\n    error = true;\n}\n\n    const missatge =\n        document.getElementById('missatge_validacio');\n\n    missatge.style.display = 'block';\n\n    if (error) {\n\n        missatge.innerHTML =\n            ' \u26a0\ufe0f Revisa els camps obligatoris i els formats';\n\n        return;\n    }\n\n    missatge.innerHTML =\n        '\u2705 Dades validades';F\n\n    setTimeout(function() {\n\n        missatge.style.display = 'none';\n\n        document.getElementById('contingut_pas2')\n            .style.display = 'block';\n\n        document.getElementById('titol_pas2')\n            .innerHTML = '\u25bc PAS 2 \u00b7 Productes';\n\n    }, 1000);\n\n});\n\nlet timeoutCercaProducte;\n\ndocument.getElementById('cerca_producte').addEventListener('input', function() {\n\n    clearTimeout(timeoutCercaProducte);\n\n    const q = this.value.trim();\n\n    if (q.length < 2) {\n\n        document.getElementById('estat_productes').style.display = 'none';\n\n        document.getElementById('llista_productes').innerHTML = '';\n\n        return;\n    }\n\n    timeoutCercaProducte = setTimeout(async function() {\n\n        document.getElementById('estat_productes').style.display = 'block';\n\n        document.getElementById('estat_productes').innerHTML =\n            '\ud83d\udd0d Buscant productes...';\n\n        try {\n\n            const resposta = await fetch(\n                '\/wp-json\/portal\/v1\/cercar-productes?q=' +\n                encodeURIComponent(q)\n            );\n\n            const dades = await resposta.json();\n\n\t\tconsole.log(dades);\n\n            const productes =\n                dades.records ? dades.records.slice(0, 10) : [];\n\n            document.getElementById('estat_productes').innerHTML =\n                '\u2705 ' + productes.length + ' productes trobats';\n\n            let html = '';\n\n            productes.forEach(function(producte) {\n\nconst camps = producte.fields || {};\n\nconst recordId = producte.id;\n\nconst referencia =\n    camps['Refer\u00e8ncia'] || '';\n\nconst nom =\n    camps['Nom producte'] || '';\n\nconst preu =\n    Number(camps['Venta'] || 0);\n\nconst estat =\n    camps['Estat'] || '';\n\nif (estat === 'Actiu') {\n\n    html +=\n        '<div style=\"border:1px solid #ddd;padding:10px;margin-bottom:10px;\">' +\n        '<strong>' + referencia + '<\/strong><br>' +\n        nom + '<br>' +\n        preu.toFixed(2) + ' \u20ac s\/IVA<br><br>' +\n        '<button type=\"button\" onclick=\"afegirProducte(\\'' +\n        recordId +\n        '\\',\\'' +\n        referencia.replace(\/'\/g, '') +\n        '\\',\\'' +\n        nom.replace(\/'\/g, '') +\n        '\\',' +\n        preu +\n        ')\">Afegir<\/button>' +\n        '<\/div>';\n\n} else {\n\n    html +=\n        '<div style=\"border:1px solid #ddd;padding:10px;margin-bottom:10px;\">' +\n        '<strong>' + referencia + '<\/strong><br>' +\n        nom + '<br>' +\n        preu.toFixed(2) + ' \u20ac s\/IVA<br><br>' +\n        '<span style=\"color:#c62828;font-weight:bold;\">\u274c Producte no disponible<\/span><br><br>' +\n       '<button type=\"button\" disabled>No disponible<\/button>' +\n        '<\/div>';\n\n}\n\n\n               \n\n            });\n\n            document.getElementById('llista_productes').innerHTML =\n                html;\n\n        } catch(error) {\n\n            document.getElementById('estat_productes').innerHTML =\n                '\u274c Error cercant productes';\n\n        }\n\n    }, 400);\n\n});\n\n\nfunction afegirProducte(recordId, referencia, nom, preu) {\n\n    const tbody =\n        document.querySelector('#taula_comanda tbody');\n\n    const fila = document.createElement('tr');\n\n    fila.dataset.recordId = recordId;\n    fila.dataset.referencia = referencia;\n    fila.dataset.nom = nom;\n    fila.dataset.preu = preu;\n\n   fila.innerHTML =\n    '<td>' + referencia + '<\/td>' +\n    '<td>' + nom + '<\/td>' +\n    '<td><input type=\"number\" value=\"1\" min=\"1\" style=\"width:70px;\"><\/td>' +\n    '<td><input type=\"text\" style=\"width:120px;\"><\/td>' +\n    '<td class=\"preu\">' + preu.toLocaleString('ca-ES',{minimumFractionDigits:2,maximumFractionDigits:2}) + ' \u20ac<\/td>' +\n    '<td class=\"base\">' + preu.toLocaleString('ca-ES',{minimumFractionDigits:2,maximumFractionDigits:2}) + ' \u20ac<\/td>' +\n    '<td class=\"iva\">' + (preu*0.21).toLocaleString('ca-ES',{minimumFractionDigits:2,maximumFractionDigits:2}) + ' \u20ac<\/td>' +\n    '<td class=\"total\">' + (preu*1.21).toLocaleString('ca-ES',{minimumFractionDigits:2,maximumFractionDigits:2}) + ' \u20ac<\/td>' +\n    '<td><button type=\"button\" class=\"eliminar\">\u2715<\/button><\/td>';\n\n    tbody.appendChild(fila);\n\n    const inputQuantitat =\n        fila.querySelector('input[type=\"number\"]');\n\n    inputQuantitat.addEventListener('input', function () {\n\n        const quantitat =\n            parseFloat(this.value) || 0;\n\n        const base =\n            quantitat * preu;\n\n        const iva =\n            base * 0.21;\n\n        const total =\n            base + iva;\n\nfila.querySelector('.base').innerHTML =\n    base.toLocaleString('ca-ES',{minimumFractionDigits:2,maximumFractionDigits:2}) + ' \u20ac';\n\nfila.querySelector('.iva').innerHTML =\n    iva.toLocaleString('ca-ES',{minimumFractionDigits:2,maximumFractionDigits:2}) + ' \u20ac';\n\nfila.querySelector('.total').innerHTML =\n    total.toLocaleString('ca-ES',{minimumFractionDigits:2,maximumFractionDigits:2}) + ' \u20ac';\n\n        recalcularTotals();\n\n    });\n\n    fila.querySelector('.eliminar')\n        .addEventListener('click', function () {\n\n            fila.remove();\n\n            recalcularTotals();\n\n        });\n\n    document.getElementById('cerca_producte').value = '';\n\n    document.getElementById('llista_productes').innerHTML = '';\n\n    document.getElementById('estat_productes').style.display = 'none';\n\n    recalcularTotals();\n\n}\n\n\nfunction recalcularTotals() {\n\n    let baseProductes = 0;\n\n    document.querySelectorAll('#taula_comanda tbody tr')\n        .forEach(function(fila) {\n\n            const base = parseFloat(\n                fila.querySelector('.base')\n                    .innerHTML\n                    .replace(' \u20ac','')\n                    .replace(\/\\.\/g,'')\n                    .replace(',', '.')\n            ) || 0;\n\n            baseProductes += base;\n\n        });\n\n    \/\/ ---------------- PORTS ----------------\n\n    const portsBase = baseProductes >= 150 ? 0 : 8;\n\n    const portsIVA = portsBase * 0.21;\n\n    const baseTotal = baseProductes + portsBase;\n\n    const ivaTotal = (baseProductes * 0.21) + portsIVA;\n\n    const finalTotal = baseTotal + ivaTotal;\n\n    \/\/ ---------------- MOSTRAR TOTALS ----------------\n\n    document.getElementById('total_base').innerHTML =\n        baseTotal.toLocaleString('ca-ES',{\n            minimumFractionDigits:2,\n            maximumFractionDigits:2\n        }) + ' \u20ac';\n\n    if (portsBase === 0){\n\n        document.getElementById('total_ports').innerHTML =\n            '\ud83c\udf81 Gratu\u00efts';\n\n        document.getElementById('missatge_ports').innerHTML =\n            'Enhorabona! Aquesta comanda t\u00e9 l\\'enviament gratu\u00eft.';\n\n    } else {\n\n        document.getElementById('total_ports').innerHTML =\n            portsBase.toLocaleString('ca-ES',{\n                minimumFractionDigits:2,\n                maximumFractionDigits:2\n            }) + ' \u20ac';\n\n        document.getElementById('missatge_ports').innerHTML =\n            '\u2139\ufe0f Les comandes inferiors a 150,00 \u20ac (sense IVA) tenen un cost fix de transport de 8,00 \u20ac + IVA.';\n\n    }\n\n    document.getElementById('total_iva').innerHTML =\n        ivaTotal.toLocaleString('ca-ES',{\n            minimumFractionDigits:2,\n            maximumFractionDigits:2\n        }) + ' \u20ac';\n\n    document.getElementById('total_final').innerHTML =\n        finalTotal.toLocaleString('ca-ES',{\n            minimumFractionDigits:2,\n            maximumFractionDigits:2\n        }) + ' \u20ac';\n\n}\n\n\ndocument.getElementById('boto_pas3')\n.addEventListener('click', function () {\n\n    const linies =\n        document.querySelectorAll(\n            '#taula_comanda tbody tr'\n        );\n\n    const missatge =\n        document.getElementById('missatge_pas2');\n\n    missatge.style.display = 'block';\n\n    if (linies.length === 0) {\n\n        missatge.innerHTML =\n            '\u26a0\ufe0f Cal afegir almenys un producte';\n\n        return;\n\n    }\n\n    missatge.innerHTML =\n        '\u2705 Productes validats';\n\n    setTimeout(function () {\n\n        missatge.style.display = 'none';\n\n        document.getElementById('contingut_pas3')\n            .style.display = 'block';\n\n        document.getElementById('titol_pas3')\n            .innerHTML =\n            '\u25bc PAS 3 \u00b7 Confirmaci\u00f3';\n\n    }, 1000);\n\n});\n\n\nfunction obtenirComanda() {\n\n    const tipusFacturaSeleccionat =\n        document.querySelector(\n            'input[name=\"tipus_factura\"]:checked'\n        );\n\n    const productes = [];\n\n\tconsole.log('recordIdEscola:', recordIdEscola);\n\n    document.querySelectorAll('#taula_comanda tbody tr')\n        .forEach(function (fila) {\n\n            productes.push({\n\n                recordId: fila.dataset.recordId,\n\n                referencia: fila.dataset.referencia,\n\n                nom: fila.dataset.nom,\n\n                quantitat: Number(\n                    fila.querySelector('input[type=\"number\"]').value\n                ),\n\n                curs:\n                    fila.querySelector('input[type=\"text\"]').value,\n\n                preu:\n                    Number(fila.dataset.preu),\n\n               base: parseFloat(\n    fila.querySelector('.base').innerHTML\n        .replace(' \u20ac','')\n        .replace(\/\\.\/g,'')\n        .replace(',', '.')\n),\n\niva: parseFloat(\n    fila.querySelector('.iva').innerHTML\n        .replace(' \u20ac','')\n        .replace(\/\\.\/g,'')\n        .replace(',', '.')\n),\n\ntotal: parseFloat(\n    fila.querySelector('.total').innerHTML\n        .replace(' \u20ac','')\n        .replace(\/\\.\/g,'')\n        .replace(',', '.')\n),\n\n            });\n\n        });\n\n    return {\n\n       escola: {\n\n    recordId: recordIdEscola,\n\n    cif:\n        document.getElementById('cif').value.trim(),\n\n    nom:\n        document.getElementById('nom_escola').value.trim(),\n\n            contacte:\n                document.getElementById('contacte').value.trim(),\n\n            correu:\n                document.getElementById('correu_contacte').value.trim(),\n\n            telefon:\n                document.getElementById('telefon_contacte').value.trim()\n\n        },\n\n        entrega: {\n\n            adreca:\n                document.getElementById('adreca_entrega').value.trim(),\n\n            horari:\n                document.getElementById('horari_entrega').value.trim(),\n\n            festius:\n                document.getElementById('dies_festius').value.trim(),\n\n            observacions:\n                document.getElementById('observacions_entrega').value.trim()\n\n        },\n\n        facturacio: {\n\n            nomFiscal:\n                document.getElementById('nom_fiscal').value.trim(),\n\n            adreca:\n                document.getElementById('adreca_facturacio').value.trim(),\n\n            correu:\n                document.getElementById('correu_facturacio').value.trim(),\n\n            tipus:\n                tipusFacturaSeleccionat\n                    ? tipusFacturaSeleccionat.value\n                    : ''\n\n        },\n\n        comanda: {\n\n    concepte:\n        document.getElementById('concepte_comanda').value.trim(),\n\n    pressupostOrigen:\n        numeroPressupostOrigen\n\n},\n\n        productes: productes,\n\n      totals: {\n\n    portsBase:\n\n        document.getElementById('total_ports').innerHTML.includes('Gratu\u00efts')\n\n        ? 0\n\n        : Number(\n            document.getElementById('total_ports')\n                .innerHTML\n                .replace(' \u20ac','')\n                .replace(\/\\.\/g,'')\n                .replace(',', '.')\n        ),\n\n    base:\n\n        Number(\n            document.getElementById('total_base')\n                .innerHTML\n                .replace(' \u20ac','')\n                .replace(\/\\.\/g,'')\n                .replace(',', '.')\n        ),\n\n    iva:\n\n        Number(\n            document.getElementById('total_iva')\n                .innerHTML\n                .replace(' \u20ac','')\n                .replace(\/\\.\/g,'')\n                .replace(',', '.')\n        ),\n\n    total:\n\n        Number(\n            document.getElementById('total_final')\n                .innerHTML\n                .replace(' \u20ac','')\n                .replace(\/\\.\/g,'')\n                .replace(',', '.')\n        )\n\n}\n\n    };\n\n}\n\nasync function carregarPressupost(token) {\n\n    const estat = document.getElementById('estat_recuperacio');\n\n    estat.style.display = 'block';\n    estat.innerHTML = '\u23f3 Carregant dades del pressupost...';\n\n\n    try {\n\n        const resposta = await fetch(\n            '\/wp-json\/portal\/v1\/recuperar-pressupost?token=' +\n            encodeURIComponent(token)\n        );\n\n        const dades = await resposta.json();\n\n        if (dades.error) {\n            estat.innerHTML = '\u274c No s\\'ha pogut recuperar el pressupost';\n            return;\n        }\n\n       const p = dades.pressupost.fields;\n\n\nnumeroPressupostOrigen = p['N\u00famero pressupost'] || '';\n\ndocument.getElementById('cif').value = p['CIF'] || '';\n\nawait new Promise(resolve => setTimeout(resolve, 100));\n\nawait buscarEscola();\n\n\ndocument.getElementById('cif').value = p['CIF'] || '';\n\n\/\/ Recuperem el recordId de l'escola\n\n\n\ndocument.getElementById('nom_escola').value = p['Escola'] || '';\n\ndocument.getElementById('contacte').value = p['Contacte'] || '';\ndocument.getElementById('correu_contacte').value = p['Correu'] || '';\ndocument.getElementById('telefon_contacte').value = p['Tel\u00e8fon'] || '';\n\ndocument.getElementById('nom_fiscal').value = p['Nom fiscal'] || '';\ndocument.getElementById('adreca_facturacio').value = p['Adre\u00e7a facturaci\u00f3'] || '';\ndocument.getElementById('correu_facturacio').value = p['Correu facturaci\u00f3'] || '';\n\ndocument.getElementById('adreca_entrega').value = p['Adre\u00e7a entrega'] || '';\ndocument.getElementById('horari_entrega').value = p['Horari entrega'] || '';\ndocument.getElementById('dies_festius').value = p['Dies festius'] || '';\ndocument.getElementById('observacions_entrega').value = p['Observacions entrega'] || '';\n\nconst tipusFactura = (p['Tipus factura'] || '').trim();\n\ndocument.querySelectorAll('input[name=\"tipus_factura\"]').forEach(function(radio){\n\n    radio.checked = false;\n\n    if (radio.value === tipusFactura) {\n        radio.click();\n    }\n\n});\n\n\n\ndocument.getElementById('concepte_comanda').value =\n     p['Concepte comanda'] || '';\n\n        document.getElementById('contingut_pas2').style.display = 'block';\n        document.getElementById('titol_pas2').innerHTML = '\u25bc PAS 2 \u00b7 Productes';\n\n        document.querySelector('#taula_comanda tbody').innerHTML = '';\n\n        for (const linia of dades.linies) {\n\n            afegirProducte(\n    linia.fields['Refer\u00e8ncia'][0],\n    linia.fields['Refer\u00e8ncia text'][0],\n    linia.fields['Nom producte'][0],\n    Number(linia.fields['Preu'][0])\n);\n\n            const fila =\n                document.querySelector('#taula_comanda tbody tr:last-child');\n\n            fila.querySelector('input[type=\"number\"]').value =\n                linia.fields['Quantitat'];\n\n            fila.querySelector('input[type=\"text\"]').value =\n                 linia.fields['Curs'] || '';\n\n            fila.querySelector('input[type=\"number\"]')\n                .dispatchEvent(new Event('input'));\n        }\n\n        \/\/ \u2705 \u00c8xit\n      document.getElementById('pantalla_carrega').style.display = 'none';\n\nestat.innerHTML = '\u2705 Pressupost recuperat correctament';\n\nsetTimeout(function () {\n    estat.style.display = 'none';\n}, 3000);\n\n    } catch (e) {\n\n        console.error(e);\n\n\t document.getElementById('pantalla_carrega').style.display = 'none';\n\n        \/\/ \u274c Error\n        estat.innerHTML = '\u274c No s\\'ha pogut recuperar el pressupost';\n\n    }\n\n}\n\n\n\ndocument.getElementById('boto_pressupost')\n.addEventListener('click', async function () {\n\n    const missatge = document.getElementById('missatge_pas3');\n\n    missatge.style.display = 'block';\n    missatge.innerHTML = '\ud83d\udcc4 Sol\u00b7licitant pressupost...';\n\n    try {\n\n        const resposta = await fetch(\n            '\/wp-json\/portal\/v1\/pressupost',\n            {\n                method: 'POST',\n                headers: {\n                    'Content-Type': 'application\/json'\n                },\n                body: JSON.stringify(obtenirComanda())\n            }\n        );\n\nconst resultat = await resposta.json();\n\nconsole.log(resultat);\n\nif (!resposta.ok) {\n\n    console.error(resultat);\n\n    missatge.innerHTML =\n        '\u274c Error creant el pressupost';\n\n    return;\n\n}\n\nmissatge.innerHTML =\n    '\u2705 Pressupost sol\u00b7licitat correctament, el rebr\u00e0s per correu electr\u00f2nic en 24\/48h';\n\n    } catch (error) {\n\n        console.error(error);\n\n        missatge.innerHTML =\n            '\u274c Error de comunicaci\u00f3 amb el servidor';\n\n    }\n\n});\n\ndocument.getElementById('boto_confirmar')\n.addEventListener('click', async function () {\n\n    if (!confirm(\n        'Vols confirmar definitivament aquesta comanda?'\n    )) {\n        return;\n    }\n\n    const missatge =\n        document.getElementById('missatge_pas3');\n\n    missatge.style.display = 'block';\n    missatge.innerHTML =\n        '\ud83d\udce6 Creant comanda...';\n\ntry {\n\n    console.log(obtenirComanda().productes);\n\n    const resposta = await fetch(\n\n        '\/wp-json\/portal\/v1\/confirmar-comanda',\n\n        {\n\n            method: 'POST',\n\n            headers: {\n                'Content-Type': 'application\/json'\n            },\n\n            body: JSON.stringify(\n                obtenirComanda()\n            )\n\n        }\n\n    );\n\n const resultat = await resposta.json();\n\nconsole.log(resposta.status, resultat);\n\nif (resultat.error) {\n\n    missatge.innerHTML =\n        '\u274c Error creant la comanda';\n\n    return;\n\n}\n\nmissatge.innerHTML =\n    '\u2705 Comanda creada correctament, rebr\u00e0s la factura al correu electr\u00f2nic en 24\/48h';       \n\n    } catch (error) {\n\n        console.error(error);\n\n        missatge.innerHTML =\n            '\u274c Error de comunicaci\u00f3 amb el servidor';\n\n    }\n\n});\n\nconst params = new URLSearchParams(window.location.search);\n\nconst token = params.get('token');\n\nif (token) {\n    carregarPressupost(token);\n}\n\n<\/script>\n\n\n<\/div>\n\t\t<\/div>\n\t<\/div>\n<\/div><\/div><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"\u25bc PAS 1 \u00b7 Escola Identificaci\u00f3 CIF * Format: NIF (12345678A), CIF (B12345678) o Organisme p\u00fablic (Q1234567A). Nom escola * Contacte Persona de contacte * Correu contacte * Tel\u00e8fon contacte * Entrega Adre\u00e7a entrega * Horari entrega * Dies festius * Observacions entrega * Facturaci\u00f3 Nom fiscal * Adre\u00e7a facturaci\u00f3 * Correu facturaci\u00f3 * Tipus [...]","protected":false},"author":355,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6717","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Portal comandes - Didactia<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.didactiaweb.com\/es\/portal-comandes\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Portal comandes - Didactia\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.didactiaweb.com\/es\/portal-comandes\/\" \/>\n<meta property=\"og:site_name\" content=\"Didactia\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-16T11:23:56+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.didactiaweb.com\/portal-comandes\/\",\"url\":\"https:\/\/www.didactiaweb.com\/portal-comandes\/\",\"name\":\"Portal comandes - Didactia\",\"isPartOf\":{\"@id\":\"https:\/\/www.didactiaweb.com\/#website\"},\"datePublished\":\"2026-06-22T15:28:46+00:00\",\"dateModified\":\"2026-07-16T11:23:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.didactiaweb.com\/portal-comandes\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.didactiaweb.com\/portal-comandes\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.didactiaweb.com\/portal-comandes\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Inici\",\"item\":\"https:\/\/www.didactiaweb.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Portal comandes\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.didactiaweb.com\/#website\",\"url\":\"https:\/\/www.didactiaweb.com\/\",\"name\":\"Didactia\",\"description\":\"Prove\u00efdor Integral\",\"publisher\":{\"@id\":\"https:\/\/www.didactiaweb.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.didactiaweb.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.didactiaweb.com\/#organization\",\"name\":\"Didactia Proveedor Integral S.L.\",\"url\":\"https:\/\/www.didactiaweb.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\/\/www.didactiaweb.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.didactiaweb.com\/wp-content\/uploads\/2020\/03\/logo.png\",\"contentUrl\":\"https:\/\/www.didactiaweb.com\/wp-content\/uploads\/2020\/03\/logo.png\",\"width\":230,\"height\":63,\"caption\":\"Didactia Proveedor Integral S.L.\"},\"image\":{\"@id\":\"https:\/\/www.didactiaweb.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Portal comandes - Didactia","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.didactiaweb.com\/es\/portal-comandes\/","og_locale":"es_ES","og_type":"article","og_title":"Portal comandes - Didactia","og_url":"https:\/\/www.didactiaweb.com\/es\/portal-comandes\/","og_site_name":"Didactia","article_modified_time":"2026-07-16T11:23:56+00:00","twitter_card":"summary_large_image","twitter_misc":{"Tiempo de lectura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.didactiaweb.com\/portal-comandes\/","url":"https:\/\/www.didactiaweb.com\/portal-comandes\/","name":"Portal comandes - Didactia","isPartOf":{"@id":"https:\/\/www.didactiaweb.com\/#website"},"datePublished":"2026-06-22T15:28:46+00:00","dateModified":"2026-07-16T11:23:56+00:00","breadcrumb":{"@id":"https:\/\/www.didactiaweb.com\/portal-comandes\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.didactiaweb.com\/portal-comandes\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.didactiaweb.com\/portal-comandes\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Inici","item":"https:\/\/www.didactiaweb.com\/"},{"@type":"ListItem","position":2,"name":"Portal comandes"}]},{"@type":"WebSite","@id":"https:\/\/www.didactiaweb.com\/#website","url":"https:\/\/www.didactiaweb.com\/","name":"Didactia","description":"Prove\u00efdor Integral","publisher":{"@id":"https:\/\/www.didactiaweb.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.didactiaweb.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.didactiaweb.com\/#organization","name":"Didactia Proveedor Integral S.L.","url":"https:\/\/www.didactiaweb.com\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.didactiaweb.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.didactiaweb.com\/wp-content\/uploads\/2020\/03\/logo.png","contentUrl":"https:\/\/www.didactiaweb.com\/wp-content\/uploads\/2020\/03\/logo.png","width":230,"height":63,"caption":"Didactia Proveedor Integral S.L."},"image":{"@id":"https:\/\/www.didactiaweb.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/pages\/6717","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/users\/355"}],"replies":[{"embeddable":true,"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/comments?post=6717"}],"version-history":[{"count":144,"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/pages\/6717\/revisions"}],"predecessor-version":[{"id":6867,"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/pages\/6717\/revisions\/6867"}],"wp:attachment":[{"href":"https:\/\/www.didactiaweb.com\/es\/wp-json\/wp\/v2\/media?parent=6717"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}