Multi-currency with a fixed exchange rate
By default, LX CloudPos uses BCCR’s official exchange rate for the day. If the business applies a fixed exchange rate (set at the start of the day, negotiated with the customer, etc.), it must be indicated explicitly in the tipoCambio field:
const TIPO_CAMBIO_DIA = 670.50; // calculated at the start of the day
async function emitirEnDolares(idCliente, lineas) {
return await emitirFactura({
tipo: 'FacturaElectronica',
idUsuario: 7,
cliente: { idCliente },
condicionVenta: '01',
medioPago: '04',
moneda: 'USD',
tipoCambio: TIPO_CAMBIO_DIA, // ← fixed
lineas
});
}If
tipoCambiois omitted andmonedaisn’tCRC, LX CloudPos calculates it automatically using BCCR’s rate for the day.