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