POS: totales y pago en USD con tipo de cambio

- Equivalente USD en totales del ticket (TC configurable)
- Selector MXN/USD al cobrar: recibido en dólares convertido a MXN,
  cambio en ambas monedas, referencia 'USD X @ TC Y' en el pago
- Validación de TC antes de crear la venta (sin ventas huérfanas)
This commit is contained in:
2026-08-14 06:42:18 +00:00
parent 84f34c542f
commit 953cdf1108
3 changed files with 138 additions and 17 deletions

View File

@@ -690,6 +690,7 @@ export interface PosCheckoutPayload {
payment_method?: string;
amount_received?: number;
pay_with_points?: boolean;
currency?: 'MXN' | 'USD';
}
export interface PosCheckoutResult {
@@ -697,6 +698,9 @@ export interface PosCheckoutResult {
sale: Sale;
payment: Payment | null;
cambio: number;
cambio_usd?: number;
rate_used?: number | null;
recibido_usd?: number;
puntos_usados: number;
puntos_ganados: number;
wallet_points: number;