Skip to main content

Overview

The POS Settings page (/configuracion/pos) provides centralized configuration for:
  • IVA (sales tax) calculation
  • CFDI invoicing (Mexican electronic invoicing)
  • Receipt/ticket printing customization
  • Billing series and folio management
All settings are saved automatically to localStorage and apply immediately.

IVA Configuration

Enable/Disable IVA

1

Navigate to POS Settings

Go to Configuracion > POS y Facturacion
2

Toggle IVA

In the “Configuracion de IVA” section, check or uncheck:
☑ Habilitar IVA (16%)
3

Verify Status

The status indicator will update:
  • IVA habilitado: Tax will be added to all sales
  • IVA deshabilitado: No tax calculation

How IVA Works

IVA Rate
number
default:"16"
Fixed at 16% according to Mexican tax law.
Storage Key
string
pos_aplicar_iva - Stores boolean value (“0” or “1”)
Calculation Example:
const subtotal = 1000.00;
const ivaRate = aplicarIVA ? 0.16 : 0;
const iva = subtotal * ivaRate;  // 160.00
const total = subtotal + iva;    // 1160.00
IVA settings affect both POS calculations and printed tickets. Changes apply immediately to new transactions.

CFDI Invoice Configuration

Basic Settings

enabled
boolean
default:"false"
Enable or disable invoicing functionality
emisionMode
enum
default:"ticket_y_factura"
Invoice emission mode:
  • ticket_y_factura: Print both ticket and invoice
  • factura_bajo_solicitud: Invoice only when requested
  • solo_factura: Invoice only (no ticket)
serie
string
default:"A"
Invoice series (up to 8 characters, uppercase)
folioActual
number
default:"1"
Current folio number (minimum: 1)
autoIncrement
boolean
default:"true"
Automatically increment folio after each invoice

Issuer Information (Emisor)

razonSocial
string
default:"LuisITRepair"
Business legal name
rfcEmisor
string
required
Tax ID (RFC) - 12-13 characters, alphanumericFormat: XAXX010101000
regimenFiscal
enum
default:"626"
Tax regime:
  • 601: General de Ley Personas Morales
  • 612: Personas Fisicas con Actividades Empresariales
  • 626: Regimen Simplificado de Confianza
codigoPostalEmisor
string
required
Fiscal postal code (5 digits)Example: 06000

CFDI Defaults

usoCFDI
enum
default:"G03"
CFDI usage:
  • G03: Gastos en general
  • G01: Adquisicion de mercancias
  • S01: Sin efectos fiscales
metodoPago
enum
default:"PUE"
Payment method:
  • PUE: Pago en una sola exhibicion (single payment)
  • PPD: Pago en parcialidades o diferido (installments)
formaPago
enum
default:"01"
Payment form:
  • 01: Efectivo (cash)
  • 03: Transferencia electronica
  • 04: Tarjeta de credito
  • 28: Tarjeta de debito

Client Requirements

requiereRFCCliente
boolean
default:"true"
Require customer RFC before issuing invoice
requiereCorreoCliente
boolean
default:"false"
Require customer email before issuing invoice

Test Mode

timbradoPruebas
boolean
default:"true"
Enable test mode (no real stamping/timbrado)
Disable this in production to issue valid legal invoices.

Terms and Conditions

terminosFactura
string
Invoice terms and conditions textExample: "Factura valida para deduccion conforme a legislacion vigente."

Configuration Storage

All billing settings are stored in:
localStorage.getItem('pos_facturacion_config_v1')
Structure:
{
  "enabled": true,
  "emisionMode": "ticket_y_factura",
  "serie": "A",
  "folioActual": 1,
  "autoIncrement": true,
  "razonSocial": "LuisITRepair",
  "rfcEmisor": "XAXX010101000",
  "regimenFiscal": "626",
  "codigoPostalEmisor": "06000",
  "usoCFDI": "G03",
  "metodoPago": "PUE",
  "formaPago": "01",
  "requiereRFCCliente": true,
  "requiereCorreoCliente": false,
  "timbradoPruebas": true,
  "terminosFactura": ""
}

Ticket Customization

Header Section

Display business logo at top of ticket
showBusinessData
boolean
default:"true"
Show business name, address, and phone
businessName
string
default:"LuisITRepair"
Business name to display on ticket
businessAddress
string
Business address (e.g., “Calle 5 #123”)
businessPhone
string
Contact phone (e.g., “2711234567”)

Content Options

showUnitPrice
boolean
default:"true"
Show unit price for each item (e.g., “2 x $129.00”)If disabled, only shows quantity (e.g., “2 pza”)
fullDescription
boolean
default:"true"
Print complete product descriptionIf disabled, truncates to 38 characters
showProductMeta
boolean
default:"true"
Show product type label (“Producto” or “Servicio S/N04032601”)

Client Section

showClientSection
boolean
default:"true"
Display client information section
showClientName
boolean
default:"true"
Show customer name (requires showClientSection)
showClientPhone
boolean
default:"true"
Show customer phone (requires showClientSection)

Payment and Status

showPaymentSection
boolean
default:"true"
Display payment method section
showStatusSection
boolean
default:"true"
Show transaction status (Pagado, Pendiente, etc.)

Custom Messages

extraTopLines
string
Additional lines after header (one per line)Example:
Horario: Lun-Vie 9am-7pm
www.example.com
extraBottomLines
string
Additional lines before footer (one per line)
showLegend
boolean
default:"true"
Display return/exchange legend
legendText
string
Return policy text
Footer message

Configuration Storage

Ticket settings are stored in:
localStorage.getItem('pos_ticket_config_v1')
Full Structure:
{
  "showLogo": true,
  "showBusinessData": true,
  "businessName": "LuisITRepair",
  "businessAddress": "",
  "businessPhone": "",
  "showUnitPrice": true,
  "fullDescription": true,
  "showProductMeta": true,
  "showClientSection": true,
  "showClientName": true,
  "showClientPhone": true,
  "showPaymentSection": true,
  "showStatusSection": true,
  "showLegend": true,
  "legendText": "Se aceptan cambios con ticket en producto en buen estado.",
  "footerText": "Gracias por tu preferencia.",
  "extraTopLines": "",
  "extraBottomLines": ""
}

Testing Configuration

Test Ticket Printing

1

Configure Settings

Make your desired changes to ticket configuration.
2

Click Test Print

Click the Probar impresion button in the ticket preview section.
3

Review Output

A test ticket with sample data will be generated:
  • Sample products (Cable HDMI 2m, Servicio mantenimiento laptop)
  • Test customer (Cliente de prueba, 2711234567)
  • Current date and time
  • Calculated totals with IVA (if enabled)

Preview Panel

The right side of the configuration page shows a live preview of your ticket with all current settings applied.

Service Integration

Reading Configuration

import { readTicketConfigStorage } from "../js/services/ticket_config";
import { readFacturacionConfigStorage } from "../js/services/facturacion_config";

const ticketCfg = readTicketConfigStorage();
const factCfg = readFacturacionConfigStorage();

Saving Configuration

import { saveTicketConfigStorage } from "../js/services/ticket_config";
import { saveFacturacionConfigStorage } from "../js/services/facturacion_config";

const success = saveTicketConfigStorage({
  ...ticketCfg,
  businessName: "New Name"
});

const billingSuccess = saveFacturacionConfigStorage({
  ...factCfg,
  serie: "B"
});

Printing Tickets

import { imprimirTicketVenta } from "../components/print_ticket_venta";
import { readTicketConfigStorage } from "../js/services/ticket_config";

imprimirTicketVenta({
  ventaId: "VTA-001",
  fecha: new Date(),
  atendio: "Juan Perez",
  cliente: { nombre: "Cliente", telefono: "2711234567" },
  tipoPago: "efectivo",
  productos: [...],
  estado: "Pagado",
  subtotal: 1000,
  aplicaIVA: true,
  ivaPorcentaje: 0.16,
  iva: 160,
  total: 1160,
  ticketConfig: readTicketConfigStorage()
});

Best Practices

Set up IVA before making sales. Changing it mid-operation can cause confusion with accounting.
Keep timbradoPruebas enabled until you’ve validated your complete invoicing flow.
Ensure your RFC follows the correct format:
  • Personas Fisicas: 13 characters (XAXX010101000)
  • Personas Morales: 12 characters (ABC123456D01)
Periodically export your localStorage to back up settings:
const backup = {
  iva: localStorage.getItem('pos_aplicar_iva'),
  ticket: localStorage.getItem('pos_ticket_config_v1'),
  billing: localStorage.getItem('pos_facturacion_config_v1')
};
console.log(JSON.stringify(backup, null, 2));

Troubleshooting

Check browser console for localStorage errors:
// Test localStorage access
try {
  localStorage.setItem('test', '1');
  localStorage.removeItem('test');
  console.log('localStorage working');
} catch (e) {
  console.error('localStorage blocked:', e);
}
The preview uses useMemo hooks. If it’s not updating:
  1. Check that the state is actually changing
  2. Verify the dependency arrays in the component
  3. Hard refresh the page (Ctrl+Shift+R)
Ensure autoIncrement is enabled in billing configuration. The folio increments automatically after each successful invoice.
This indicates localStorage is not persisting. Check:
  • Browser privacy settings
  • Incognito/private browsing mode (doesn’t persist)
  • Storage quota limits

Next Steps

Appearance Settings

Customize colors, fonts, and visual theme

Billing Configuration

Configure CFDI invoicing and billing

Build docs developers (and LLMs) love