feat: mejorar etiquetas de régimen fiscal y uso de CFDI utilizando opciones dinámicas
This commit is contained in:
parent
0f622f5620
commit
68a3da8e3f
@ -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;
|
||||
|
||||
@ -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.');
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user