- i18n.js with 130+ translation keys for es/en, loaded in all 11 templates
- sidebar.js uses t() for all nav labels, adds MX/US language toggle
- app-init.js role labels use i18n
- currency.py service with convert() and format_currency()
- config.py adds DEFAULT_CURRENCY and EXCHANGE_RATE_USD_MXN settings
- config_bp.py adds GET/PUT /pos/api/config/currency endpoints
- config.html adds currency/exchange-rate section (Section 8)
- config.js adds loadCurrency/saveCurrency with localStorage sync
- pos.js fmt() reads pos_currency from localStorage for USD/MXN display
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Gunicorn production server with auto-scaled workers, run.sh, updated systemd service
- Marketplace B2B: cross-tenant inventory search, ordering, seller management with full UI
- Subscription billing: plan limits enforced on products/employees/branches, billing API + upgrade flow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add thermal_printer.py service generating raw ESC/POS bytes for 58mm/80mm printers
- Add /pos/api/sales/<id>/print endpoint (escpos_raw or browser mode)
- Add printer.js with WebUSB and Web Serial support for direct browser-to-printer
- Add thermal print button in ticket modal with connect/print workflow
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Chat now fetches tenant inventory summary (brands, counts, low-stock)
and injects it into the AI system prompt so responses prioritize local
stock. VIN decoder uses free NHTSA vPIC API to decode 17-char VINs and
auto-fills the vehicle selector dropdowns when a catalog match is found.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Spanish translations for TecDoc catalog (translations.py) applied to
catalog_service.py and dashboard server.py endpoints
2. Printable quotation HTML endpoint (/pos/api/quotations/<id>/pdf) with
@media print CSS for clean browser-to-PDF output
3. Web Push notifications to owner/admin on sale cancellation, stock zero,
and cash register differences > $500. Includes service worker, VAPID
key management, and subscription endpoints.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Auto dark mode: detect system prefers-color-scheme, auto-switch industrial/modern theme
2. Email quotation endpoint: POST /quotations/:id/email sends HTML email via SMTP
3. Camera barcode scanner: BarcodeDetector API with getUserMedia overlay in catalog
4. Returns with warranty: POST /returns endpoint with stock restoration and sale status tracking
5. Partial offline catalog: cache top 500 parts in IndexedDB, search when offline
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1. Symptom diagnosis: AI now detects vehicle symptoms and suggests probable parts
2. Smart quotations: "cotizame frenos completos" returns multiple search_queries (pipe-separated), backend searches each term and deduplicates
3. Photo identification: camera button in chat widget uploads image and sends placeholder prompt (ready for vision model)
4. Multilanguage: AI detects user language and responds accordingly, search_query always in English
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Build debug APK (8.3MB) con Capacitor + Android SDK 34.
Carga desde nexus.consultoria-as.com/pos con PWA offline.
Incluye plugins: camera, push notifications, haptics, status bar.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Set up Capacitor to wrap the Nexus POS web app as a native mobile app.
The app loads from the remote server URL so no bundling is needed.
Includes native-bridge.js for camera, push notifications, haptics,
and status bar integration when running inside the native shell.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add full fleet management (Feature 13): database migration for fleet_vehicles,
fleet_maintenance_schedules, and fleet_maintenance_logs tables; REST API blueprint
with CRUD, scheduling, logging, alerts, and stats endpoints; frontend with tabbed
UI (vehicles grid, maintenance schedules, history, overdue alerts); sidebar nav entry.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add full WhatsApp Cloud API integration for Nexus POS:
- Service layer (whatsapp_service.py): send text, templates, quotations,
order confirmations, stock alerts; process incoming webhooks with AI auto-reply
- Blueprint (whatsapp_bp.py): public webhook endpoints for Meta verification +
incoming messages; authenticated endpoints for send, send-quote, conversations
- Conversation UI (whatsapp.html + whatsapp.js): split-panel messenger with
conversation list, chat bubbles, send input, quote sending; both themes
- Migration v1.4: whatsapp_messages table with phone/direction/status indexes
- Config: WHATSAPP_TOKEN, WHATSAPP_PHONE_ID, WHATSAPP_VERIFY_TOKEN env vars
- Sidebar: WhatsApp nav item under Gestion with message-bubble icon
- Ready for Meta Business credentials (infrastructure complete, no API keys needed)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add POST/DELETE /items/{id}/image endpoints with Pillow processing (resize 800px, thumbnail 300px, JPEG 85%)
- Validate file type (jpg/png/webp) and size (max 5MB)
- Show image in product detail modal with upload/delete buttons
- Enrich catalog parts list with local inventory image when available
- Image directory created automatically on first upload (pos/static/images/parts/)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace static demo data with live API calls across all four report tabs:
- Ventas: sales by period/employee/payment method with date filters
- Inventario: valuation, ABC classification, low stock, no movement
- Clientes: accounts receivable aging report
- Financieros: income statement, balance sheet, trial balance, register history
All tabs use lazy loading (fetch on first visit) and JWT auth.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace all hardcoded/demo data with live API calls:
- KPIs from /pos/api/register/daily-summary (ventas, tickets, promedio, cajas)
- Inventory alerts from /pos/api/inventory/alerts (zero, low, over stock)
- Top products aggregated from /pos/api/sales detail items
- Weekly bar chart from 7-day daily summaries
- Recent sales table with real items from sale detail endpoint
- Auto-refresh every 2 minutes, manual refresh button
- Dynamic greeting with time-of-day and JWT user name
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace hardcoded demo data in the config page with real API calls.
Branches and employees now load from /pos/api/config/* endpoints,
with create modals for both. Business data tab reads tenant_config
(read-only). Theme selector was already working and is preserved.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Proxy was using resp.raw.headers (urllib3) which could miss Content-Type;
switched to resp.headers. SW now skips /pos/api/auth/ to prevent stale
token caching, scopes fetch to /pos/ only, and bumps cache to v2.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3 reintentos con espera 5s/10s/15s. Si agota reintentos,
muestra mensaje amigable en vez de error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Manejo de historial con pushState/popState. Cada nivel de navegacion
se registra en el historial del navegador. El boton atras regresa al
nivel anterior en vez de salir del catalogo.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remueve codigos de generacion, numeros romanos, tipos de carroceria.
Deduplica por display_name. Toyota: 236 → 73 modelos limpios.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- catalog.js: state → nav (variable correcta del catalogo)
- vsClearAll: resetea nav en vez de state inexistente
- favicon.ico: sirve icon-192.png del PWA
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Al seleccionar ano, solo muestra marcas/modelos disponibles para ese ano.
Toyota 2020: 92 modelos vs 625 sin filtro.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Validacion _validate_model() verifica que el modelo termine en ':free'.
Si alguien cambia MODEL a uno de pago, el chatbot lanza error en vez
de generar costos. Alternativas documentadas en comentario.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Barra de 4 dropdowns arriba del catalogo que se habilitan en cascada.
Al completar los 4, muestra categorias y partes para ese vehiculo.
Boton de limpiar para resetear. Endpoint /years-all para cargar anos.
Estilos con design system tokens (ambos temas).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
El chatbot ahora busca primero en el inventario local del tenant
y luego en el catalogo TecDoc. Resultados muestran badge:
- Verde "MI INVENTARIO" para partes locales
- Azul "CATALOGO" para partes del catalogo TecDoc
Busqueda local funciona en español e inglés.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Al abrir el detalle de un producto, se cargan automaticamente:
- Disponibilidad en bodegas (stock + precio)
- Partes equivalentes aftermarket (cross-references del catalogo TecDoc)
Usa catalog_part_id o busqueda por part_number contra el catalogo central.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- System prompt: SIEMPRE devuelve search_query en ingles
- Diccionario de traducciones (balatas→Brake Pad, etc.)
- Busca directo sin preguntar mas info
- Fallback: extrae keywords si AI no da search_query
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- FAB movido a bottom:140px (arriba del carrito)
- Panel a bottom:200px
- Fondo usa --color-bg-elevated (opaco, no transparente)
- Bubbles usan --color-surface-2 con fallback
- Variables CSS inexistentes reemplazadas con equivalentes de tokens.css
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Subdominio desconocido ya no redirige a dominio externo. En su lugar,
continua sin tenant y el login pide el tenant manualmente.
Agregados 'nexus', 'pos', 'app', 'dashboard' a subdominios reservados.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Nginx wildcard config: *.nexusautoparts.com routes to POS app with X-Tenant-Subdomain header
- middleware_tenant.py: resolves subdomain -> tenant_id via nexus_master.tenants.subdomain
- auth_bp: login and employee list endpoints accept tenant from subdomain, URL param, or body
- login.html: auto-detects tenant from subdomain, shows business name, falls back to ?tenant=ID
- tenant_manager: generates subdomain slug from business name on provision_tenant()
- Migration v1.2: adds subdomain column + unique index to tenants table
- setup-nginx.sh: one-command install script for the nginx config
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Contabilidad: Nueva Poliza modal + Exportar placeholder
- Facturacion: Nueva Factura modal (sale_id input) + Nota Credito placeholder
- Inventario: click en producto abre detalle con historial
- Dashboard: Ver Detalles navega a paginas relevantes, campana a alertas
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Eliminadas marcas de otros mercados (China, Australia, etc.)
Solo se muestran las relevantes para Norteamerica.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
vehicle_parts tiene 14B+ rows. Las queries de brands, models, years,
engines ahora solo usan model_year_engine (mucho mas rapido).
vehicle_parts solo se consulta para categories/groups/parts donde
se filtra por un mye_id especifico.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Chips de filtro se cargan desde API /catalog/brands
- Muestran marcas reales (Bosch, KYB, NGK...) con conteo
- Boton 'Todos' para quitar filtro
- Filtrado por brand via API en vez de category_id
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reescrito sidebar.js para coincidir exactamente con el design system:
- Logo NA con clip-path en tema industrial, border-radius en moderno
- Secciones: Principal, Gestion, Sistema
- SVG icons de Feather (mismo trazo 1.75px)
- Border-left accent en item activo
- Toggle de tema con iconos luna/sol
- Footer con avatar, nombre, rol, y boton logout
- 260px width, colapsa a 56px en mobile
- Usa CSS variables del tokens.css
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Script inline en <head> aplica el tema guardado ANTES de que
el CSS se renderice. Elimina el flash blanco→oscuro o viceversa.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- app-init.js: aplica tema guardado en localStorage, oculta theme-bars
que tapaban contenido (position:fixed), sobrescribe setTheme() de
cada pagina para usar version persistente
- sidebar.js: toggle de tema (sol/luna) integrado en el sidebar
- Tema se mantiene al navegar entre paginas
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Nuevo sidebar.js compartido que reemplaza el sidebar de cada pagina
con una version consistente:
- Misma estructura y orden de links en todas las paginas
- Nombre y rol del empleado real (de POS_USER)
- Link activo resaltado segun pagina actual
- Boton de logout
- Responsive (colapsa a iconos en <768px)
- Elimina inconsistencias de estilo entre paginas
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>