$estatus = parametro("estado", SYS_TODAS);
$frecuencia = parametro("periocidad", SYS_TODAS);
$producto = parametro("convenio", SYS_TODAS);
$producto = parametro("producto", $producto);
$empresa = parametro("empresa", SYS_TODAS);
$out = parametro("out", SYS_DEFAULT);
$FechaInicial = parametro("on", false);
$FechaInicial = parametro("fecha-0", $FechaInicial);
$FechaInicial = $FechaInicial == false ? FECHA_INICIO_OPERACIONES_SISTEMA : $xF->getFechaISO($FechaInicial);
$FechaFinal = parametro("off", false);
$FechaFinal = parametro("fecha-1", $FechaFinal);
$FechaFinal = $FechaFinal == false ? fechasys() : $xF->getFechaISO($FechaFinal);
$jsEvent = $out != OUT_EXCEL ? "initComponents()" : "";
$senders = getEmails($_REQUEST);
$ByConvenio = $producto == SYS_TODAS ? "" : " AND (`creditos_tipoconvenio`.`tipo_en_sistema` = {$producto} ) ";
$sql = $xL->getListadoDeLetrasConCreditos($FechaFinal, false, "", "", $ByConvenio);
$titulo = $xHP->getTitle();
$archivo = "";
$xRPT = new cReportes($titulo . "-" . $xF->getFechaCorta($FechaFinal));
$xRPT->setFile($archivo);
$xRPT->setOut($out);
$xRPT->setSQL($sql);
//============ REPORTE " AND (`creditos_tipoconvenio`.`tipo_en_sistema` =" . CREDITO_PRODUCTO_INDIVIDUAL . ") "
$xT = new cTabla($sql, 2);
$xT->setTipoSalida($out);
$xRPT->addContent($xRPT->getEncabezado("", $FechaInicial, $FechaFinal));
//$xT->setEventKey("jsGoPanel");
//$xT->setKeyField("creditos_solicitud");
$xRPT->addContent($xT->Show($xRPT->getTitle()));
$xRPT->setBodyMail($xHP->getTitle());
//============ Agregar HTML
function jsaGetLetrasAVencer($fecha)
{
    $xD = new cFecha();
    $xL = new cSQLListas();
    $fecha = $xD->getFechaISO($fecha);
    $sql = $xL->getListadoDeLetrasConCreditos($fecha, false, "", "", " AND (`creditos_tipoconvenio`.`tipo_en_sistema` =" . CREDITO_PRODUCTO_INDIVIDUAL . ") ");
    $xT = new cTabla($sql, 2);
    $xT->setEventKey("jsGoPanel");
    return $xT->Show();
}