From 68a3da8e3fa3388711f88e0310f5e0fe68cf1cd9 Mon Sep 17 00:00:00 2001 From: Juan Felipe Zapata Moreno Date: Fri, 6 Mar 2026 10:54:17 -0600 Subject: [PATCH] =?UTF-8?q?feat:=20mejorar=20etiquetas=20de=20r=C3=A9gimen?= =?UTF-8?q?=20fiscal=20y=20uso=20de=20CFDI=20utilizando=20opciones=20din?= =?UTF-8?q?=C3=A1micas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/POS/Factura/Index.vue | 6 +++--- src/services/ticketService.js | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pages/POS/Factura/Index.vue b/src/pages/POS/Factura/Index.vue index 523c164..4c8fa14 100644 --- a/src/pages/POS/Factura/Index.vue +++ b/src/pages/POS/Factura/Index.vue @@ -3,6 +3,7 @@ import { ref, onMounted, computed } from 'vue'; import { useRoute } from 'vue-router'; import { apiURL } from '@Services/Api'; import { formatDate, formatCurrency } from '@/utils/formatters'; +import { regimenFiscalOptions, usoCfdiOptions } from '@/utils/fiscalData'; import GoogleIcon from '@Shared/GoogleIcon.vue'; import Loader from '@Shared/Loader.vue'; @@ -70,9 +71,8 @@ const canRequestInvoice = computed(() => { }); /** Helpers */ -const getRegimenFiscalLabel = (value) => value || 'No registrado'; -const getUsoCfdiLabel = (value) => value || 'No registrado'; - +const getRegimenFiscalLabel = (value) => regimenFiscalOptions.find(o => o.value === value)?.label ?? value; +const getUsoCfdiLabel = (value) => usoCfdiOptions.find(o => o.value === value)?.label ?? value; /** Métodos */ const fetchSaleData = () => { loading.value = true; diff --git a/src/services/ticketService.js b/src/services/ticketService.js index ee4ed9a..0d6fe9b 100644 --- a/src/services/ticketService.js +++ b/src/services/ticketService.js @@ -285,8 +285,6 @@ const ticketService = { if (bundlePrice < 0) bundlePrice = 0; } - console.log(`Bundle ${data.bundle_id}: nombre="${bundleName}", precio=${bundlePrice}`); - return { product_name: bundleName, sku: info.sku || '', @@ -553,7 +551,6 @@ const ticketService = { // Abrir diálogo de impresión del navegador await printService.printPDF(pdfBase64); - console.log('Ticket enviado a impresión'); } catch (error) { console.error('Error imprimiendo ticket:', error); window.Notify.warning('No se pudo abrir el diálogo de impresión. Usa el PDF descargado para imprimir.');