/*
 * ICYLAB OS v9.0.1
 * Habilita únicamente la factura electrónica afecta emitida en el catálogo.
 * Los gates de private_config.php, permisos y allowlists siguen siendo
 * obligatorios y autoritativos.
 */
START TRANSACTION;

UPDATE billing_document_types
SET is_active = 1,
    enabled_production = 1,
    updated_at = CURRENT_TIMESTAMP
WHERE direction = 'issued'
  AND document_key = 'invoice_electronic';

COMMIT;

SELECT document_key,
       document_label,
       enabled_sandbox,
       enabled_production,
       is_active
FROM billing_document_types
WHERE direction = 'issued'
  AND document_key = 'invoice_electronic';

