From a5411a6318faf76e661a797e356d428f2f86a20a Mon Sep 17 00:00:00 2001 From: Juan Felipe Zapata Moreno Date: Sat, 14 Mar 2026 09:15:27 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20actualizar=20nombre=20del=20negocio=20y?= =?UTF-8?q?=20eliminar=20referencia=20a=20d=C3=ADas=20de=20vigencia=20en?= =?UTF-8?q?=20cotizaciones=20y=20tickets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/services/quoteService.js | 8 +------- src/services/ticketService.js | 3 +-- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/services/quoteService.js b/src/services/quoteService.js index 843a4e0..fb3a6fb 100644 --- a/src/services/quoteService.js +++ b/src/services/quoteService.js @@ -11,11 +11,10 @@ const quoteService = { */ getBusinessInfo() { return { - name: import.meta.env.VITE_APP_NAME || 'GOLSCONTROL', + name: import.meta.env.VITE_APP_NAME || 'HIKVISION DISTRIBUIDOR', city: import.meta.env.VITE_BUSINESS_CITY || 'Villahermosa', state: import.meta.env.VITE_BUSINESS_STATE || 'Tabasco', country: import.meta.env.VITE_BUSINESS_COUNTRY || 'México', - phone: import.meta.env.VITE_BUSINESS_PHONE || 'Tel: (52) 0000-0000' }; }, @@ -35,21 +34,17 @@ const quoteService = { * @param {Object} totals - { subtotal, tax, total } * @param {Object} options * @param {string} options.businessName - Nombre del negocio (fallback a env) - * @param {number} options.validDays - Días de vigencia (default 30) * @param {boolean} options.autoDownload - Descargar PDF automáticamente (default true) */ async generate(cartItems, totals, options = {}) { const business = this.getBusinessInfo(); const { businessName = business.name, - validDays = 30, autoDownload = true } = options; const folio = this.generateFolio(); const now = new Date(); - const expiry = new Date(now); - expiry.setDate(expiry.getDate() + validDays); const doc = new jsPDF({ orientation: 'portrait', @@ -203,7 +198,6 @@ const quoteService = { doc.setTextColor(...LIGHT_GRAY); doc.text('Esta cotización no constituye una venta.', center, y, { align: 'center' }); y += 3; - doc.text(`Precios válidos por ${validDays} días a partir de la fecha de emisión.`, center, y, { align: 'center' }); if (autoDownload) { doc.save(`${folio}.pdf`); diff --git a/src/services/ticketService.js b/src/services/ticketService.js index 0d6fe9b..86c8f83 100644 --- a/src/services/ticketService.js +++ b/src/services/ticketService.js @@ -17,7 +17,6 @@ const ticketService = { city: import.meta.env.VITE_BUSINESS_CITY || 'Villahermosa', state: import.meta.env.VITE_BUSINESS_STATE || 'Tabasco', country: import.meta.env.VITE_BUSINESS_COUNTRY || 'México', - phone: import.meta.env.VITE_BUSINESS_PHONE || 'Tel: (52) 0000-0000' }; }, @@ -161,7 +160,7 @@ const ticketService = { hour: '2-digit', minute: '2-digit' }); - doc.text(`Hora: ${formattedTime} p.m.`, leftMargin, yPosition); + doc.text(`Hora: ${formattedTime}`, leftMargin, yPosition); yPosition += 4; // Cajero