fix: actualizar nombre del negocio y eliminar referencia a días de vigencia en cotizaciones y tickets

This commit is contained in:
Juan Felipe Zapata Moreno 2026-03-14 09:15:27 -06:00
parent 71ac03309d
commit a5411a6318
2 changed files with 2 additions and 9 deletions

View File

@ -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`);

View File

@ -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