{"id":15296,"date":"2026-09-11T17:16:52","date_gmt":"2026-09-11T23:16:52","guid":{"rendered":"https:\/\/www.bullet.mx\/?page_id=15296"},"modified":"2026-09-11T23:40:16","modified_gmt":"2026-09-12T05:40:16","slug":"facturas","status":"publish","type":"page","link":"https:\/\/www.bullet.mx\/en\/facturas\/","title":{"rendered":"Facturas"},"content":{"rendered":"<div id=\"bullet-facturas-app\" style=\"font-family:sans-serif;max-width:1100px;margin:0 auto;\">\n      <style>\n        #bullet-facturas-app table { width:100%; border-collapse:collapse; margin-top:16px; }\n        #bullet-facturas-app th, #bullet-facturas-app td { padding:8px 10px; border-bottom:1px solid #ddd; text-align:left; font-size:14px; }\n        #bullet-facturas-app th { background:#0b0b0c; color:#fff; }\n        #bullet-facturas-app .bf-filtros { display:flex; flex-wrap:wrap; gap:10px; align-items:end; }\n        #bullet-facturas-app .bf-filtros label { display:block; font-size:12px; color:#555; margin-bottom:4px; }\n        #bullet-facturas-app .bf-filtros input { padding:6px 8px; border:1px solid #ccc; border-radius:4px; }\n        #bullet-facturas-app button { padding:8px 16px; background:#0b0b0c; color:#fff; border:none; border-radius:4px; cursor:pointer; }\n        #bullet-facturas-app .bf-total { text-align:right; font-weight:bold; margin-top:10px; }\n        #bullet-facturas-app .bf-loading { padding:20px; text-align:center; color:#777; }\n      <\/style>\n      <div class=\"bf-filtros\">\n        <div><label>Desde<\/label><input type=\"date\" id=\"bf-desde\"><\/div>\n        <div><label>Hasta<\/label><input type=\"date\" id=\"bf-hasta\"><\/div>\n        <div><label>Proveedor<\/label><input type=\"text\" id=\"bf-proveedor\" placeholder=\"Proveedor\"><\/div>\n        <div><label>Marca<\/label><input type=\"text\" id=\"bf-marca\" placeholder=\"Marca\"><\/div>\n        <div><label>L\u00ednea<\/label><input type=\"text\" id=\"bf-linea\" placeholder=\"L\u00ednea\"><\/div>\n        <div><button id=\"bf-buscar\">Filtrar<\/button><\/div>\n      <\/div>\n      <div id=\"bf-resultados\"><div class=\"bf-loading\">Cargando...<\/div><\/div>\n    <\/div>\n    <script>\n    (function() {\n      const ajaxUrl = 'https:\/\/www.bullet.mx\/wp-admin\/admin-ajax.php';\n      const nonce = '86843c3466';\n      const resultados = document.getElementById('bf-resultados');\n\n      function money(n) {\n        n = parseFloat(n) || 0;\n        return '$' + n.toLocaleString('es-MX', {minimumFractionDigits:2, maximumFractionDigits:2});\n      }\n\n      function cargar() {\n        resultados.innerHTML = '<div class=\"bf-loading\">Cargando...<\/div>';\n        const body = new URLSearchParams();\n        body.append('action', 'bullet_facturas_lista');\n        body.append('nonce', nonce);\n        body.append('desde', document.getElementById('bf-desde').value);\n        body.append('hasta', document.getElementById('bf-hasta').value);\n        body.append('proveedor', document.getElementById('bf-proveedor').value);\n        body.append('marca', document.getElementById('bf-marca').value);\n        body.append('linea', document.getElementById('bf-linea').value);\n\n        fetch(ajaxUrl, { method: 'POST', body })\n          .then(r => r.json())\n          .then(res => {\n            if (!res.success) {\n              resultados.innerHTML = '<div class=\"bf-loading\">Error: ' + (res.data || 'desconocido') + '<\/div>';\n              return;\n            }\n            const rows = res.data || [];\n            if (!rows.length) {\n              resultados.innerHTML = '<div class=\"bf-loading\">Sin resultados.<\/div>';\n              return;\n            }\n            let totalGeneral = 0;\n            let html = '<table><thead><tr><th>Fecha<\/th><th>Proveedor<\/th><th>Folio<\/th><th>Marca<\/th><th>L\u00ednea<\/th><th>Subtotal<\/th><th>IVA<\/th><th>Total<\/th><\/tr><\/thead><tbody>';\n            rows.forEach(f => {\n              totalGeneral += parseFloat(f.total) || 0;\n              html += '<tr>' +\n                '<td>' + (f.fecha || '') + '<\/td>' +\n                '<td>' + (f.proveedor || '') + '<\/td>' +\n                '<td>' + (f.folio || '') + '<\/td>' +\n                '<td>' + (f.marca || '') + '<\/td>' +\n                '<td>' + (f.linea || '') + '<\/td>' +\n                '<td>' + money(f.subtotal) + '<\/td>' +\n                '<td>' + money(f.iva) + '<\/td>' +\n                '<td>' + money(f.total) + '<\/td>' +\n                '<\/tr>';\n            });\n            html += '<\/tbody><\/table>';\n            html += '<div class=\"bf-total\">Total del periodo: ' + money(totalGeneral) + '<\/div>';\n            resultados.innerHTML = html;\n          })\n          .catch(() => {\n            resultados.innerHTML = '<div class=\"bf-loading\">Error de conexi\u00f3n.<\/div>';\n          });\n      }\n\n      document.getElementById('bf-buscar').addEventListener('click', cargar);\n      cargar();\n    })();\n    <\/script>","protected":false},"excerpt":{"rendered":"","protected":false},"author":11,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-15296","page","type-page","status-publish"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Facturas - B U L L E T . m x<\/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.bullet.mx\/en\/facturas\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Facturas - B U L L E T . m x\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.bullet.mx\/en\/facturas\/\" \/>\n<meta property=\"og:site_name\" content=\"B U L L E T . m x\" \/>\n<meta property=\"article:modified_time\" content=\"2026-09-12T05:40:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.bullet.mx\/wp-content\/uploads\/2017\/06\/OG-IMAGE-01-scaled.png\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Facturas - B U L L E T . m x","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.bullet.mx\/en\/facturas\/","og_locale":"en_US","og_type":"article","og_title":"Facturas - B U L L E T . m x","og_url":"https:\/\/www.bullet.mx\/en\/facturas\/","og_site_name":"B U L L E T . m x","article_modified_time":"2026-09-12T05:40:16+00:00","og_image":[{"url":"https:\/\/www.bullet.mx\/wp-content\/uploads\/2017\/06\/OG-IMAGE-01-scaled.png","type":"","width":"","height":""}],"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.bullet.mx\/facturas\/","url":"https:\/\/www.bullet.mx\/facturas\/","name":"Facturas - B U L L E T . m x","isPartOf":{"@id":"https:\/\/www.bullet.mx\/#website"},"datePublished":"2026-09-11T23:16:52+00:00","dateModified":"2026-09-12T05:40:16+00:00","breadcrumb":{"@id":"https:\/\/www.bullet.mx\/facturas\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.bullet.mx\/facturas\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.bullet.mx\/facturas\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.bullet.mx\/"},{"@type":"ListItem","position":2,"name":"Facturas"}]},{"@type":"WebSite","@id":"https:\/\/www.bullet.mx\/#website","url":"https:\/\/www.bullet.mx\/","name":"B U L L E T . m x","description":"est. 2012 | XIII Aniversario","publisher":{"@id":"https:\/\/www.bullet.mx\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.bullet.mx\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.bullet.mx\/#organization","name":"BULLET Hairdressing Club","url":"https:\/\/www.bullet.mx\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.bullet.mx\/#\/schema\/logo\/image\/","url":"https:\/\/www.bullet.mx\/wp-content\/uploads\/2025\/06\/monograma_mini_2025-01.webp","contentUrl":"https:\/\/www.bullet.mx\/wp-content\/uploads\/2025\/06\/monograma_mini_2025-01.webp","width":834,"height":834,"caption":"BULLET Hairdressing Club"},"image":{"@id":"https:\/\/www.bullet.mx\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/pages\/15296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/comments?post=15296"}],"version-history":[{"count":1,"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/pages\/15296\/revisions"}],"predecessor-version":[{"id":15297,"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/pages\/15296\/revisions\/15297"}],"wp:attachment":[{"href":"https:\/\/www.bullet.mx\/en\/wp-json\/wp\/v2\/media?parent=15296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}