function jsaReRelaciones($idsocio)
{
    //Checar compatibilidad numerica entre los dependientes economicos
    $sqlL = new cSQLListas();
    $cBenef = new cTabla($sqlL->getListadoDeRelaciones($idsocio));
    $xTbl = new cHTabla("idtblrels");
    $xHSel = new cHSelect();
    $xChk = new cHCheckBox();
    $xText = new cHText();
    $xText->setDivClass("");
    $xChk->setDivClass("");
    $xBtn = new cHButton();
    $xUl = new cHUl();
    $li = $xUl->getO();
    $li->setT("ul");
    $li->setClass("tags blue");
    $li->add($xBtn->getBasic("TR.Guadar", "jsGuardarReferencia()", $xBtn->ic()->GUARDAR, "idguardar", false, true), "");
    $xTbl->initRow();
    $xTbl->addTD($xText->getDeNombreDePersona());
    $xTbl->addTD($xHSel->getListaDeTiposDeRelaciones("", "")->get(""));
    $xTbl->addTD($xHSel->getListaDeTiposDeParentesco()->get(""));
    $xTbl->addTD($xChk->get("TR.es dependiente_economico", "dependiente"));
    $xTbl->addRaw("<td class='toolbar-24'>" . $xUl->get() . "</td>");
    $xTbl->endRow();
    $cBenef->addTool(1);
    $cBenef->addTool(2);
    $cBenef->setKeyField("idsocios_relaciones");
    return $xTbl->get() . $cBenef->Show();
}
 $app2 = $row["segundoapellido"];
 $noms = $row["nombres"];
 $flTitle = "";
 //generar aka
 $xSoc = new cSocio($id);
 $xSoc->init();
 $xTbl = new cHTabla();
 $xTbl->initRow();
 //score
 $xTbl->addTH($xLng->getT("TR.SDN Numero"));
 switch ($tipo) {
     case "soundlike":
         $flTitle = $xLng->getT("TR.Algoritmo") . " : SQL-SOUNDLIKE";
         //$xTbl->addTH("Algoritmo");
         //$xTbl->addTD("SOUNDLIKE");
         $xTbl->addRaw("<td /><td />");
         break;
     case "jarowinkler":
         $flTitle = $xLng->getT("TR.Algoritmo") . " : JARO-WINKLER";
         $xTbl->addTH($xLng->getT("TR.Coincidencia"));
         $score1 = 0;
         $score2 = 0;
         $score3 = 0;
         if ($nombre != "") {
             $score1 = JaroWinkler($nombre, $noms);
         }
         if ($amaterno != "") {
             $score3 = JaroWinkler($amaterno, $app2);
         }
         if ($apaterno != "") {
             $score2 = JaroWinkler($apaterno, $app1);
         $xChk = new cHCheckBox();
         $xText = new cHText();
         $xText->setDivClass("");
         $xChk->setDivClass("");
         $xBtn = new cHButton();
         $xUl = new cHUl();
         $li = $xUl->getO();
         $li->setT("ul");
         $li->setClass("tags blue");
         $li->add($xBtn->getBasic("TR.Guadar", "jsGuardarReferencia()", $xBtn->ic()->GUARDAR, "idguardar", false, true), "");
         $xTbl->initRow();
         $xTbl->addTD($xText->getDeNombreDePersona());
         $xTbl->addTD($xHSel->getListaDeTiposDeRelaciones("", "")->get(""));
         $xTbl->addTD($xHSel->getListaDeTiposDeParentesco()->get(""));
         $xTbl->addTD($xChk->get("TR.es dependiente_economico", "dependiente"));
         $xTbl->addRaw("<td class='toolbar-24'>" . $xUl->get() . "</td>");
         $xTbl->endRow();
         $xFRM->addHTML("<h2>" . PERSONAS_TITULO_PARTES . "</h2>");
         $xFRM->addHTML($xTbl->get());
         $xFRM->addHTML('<div id="ListaDeRelaciones"></div>');
     }
 }
 if ($agregardom == true and setNoMenorQueCero($persona) > 0) {
     $xSoc->set($persona);
     if ($xSoc->init() == true) {
         $xCol = null;
         $nexterior = parametro("idnumeroexterior");
         $tipo_acceso = parametro("idtipoacceso", "calle", MQL_RAW);
         $ninterior = parametro("idnumerointerior");
         $referencia = parametro("idreferencias");
         $tresidencial = parametro("idtelefono1");
    } elseif ($ryx["afectacion"] == 1) {
        $oes = "<td class='mny'>" . getFMoney($ryx["afectacion_real"]) . "</td>\n\t\t\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t\t\t<td>&nbsp;</td>";
        $depositos += $ryx["afectacion_real"];
    } else {
        $oes = "<td>&nbsp;</td>\n\t\t\t\t\t\t\t<td>&nbsp;</td>\n\t\t\t\t\t\t\t<td class='mny'>" . getFMoney($ryx["afectacion_real"]) . "</td>";
        //$depositos = $depositos + $ryx["afectacion_real"];
        $inversiones += $ryx["afectacion_real"];
    }
    $tr = "<tr>\n\t\t\t<td>" . getFechaMX($fecha) . "</td>\n\t\t\t<td>" . $ryx["recibo_afectado"] . "</td>\n\t\t\t<td>{$tipoop}</td>\n\t\t\t{$oes}\n\n\t\t\t<td class='mny'>" . getFMoney($sdo_al_corte) . "</td>\n\t\t\t<td>{$detallado}</td>\n\t\t\t</tr>";
    //Si Aplica por Fechas
    if ($AppByFechas == 1) {
        if (strtotime($fecha) < strtotime($fecha_inicial) or strtotime($fecha) > strtotime($fecha_final)) {
            $tr = "";
        }
    }
    $xHT->addRaw($tr);
}
$saldo_final = $depositos - $retiros;
$xHT->addRaw("<tr>\n\t\t\t<td>&nbsp;</td>\n\t\t\t<th colspan='2'>SUMATORIA TOTAL DE MOVIMIENTOS</th>\n\t\t\t<th>" . getFMoney($depositos) . "</th>\n\t\t\t<th>" . getFMoney($retiros) . "</th>\n\t\t\t<th>" . getFMoney($inversiones) . "</th>\n\t\t\t<th class='mny'>" . getFMoney($saldo_final) . "</th>\n\t\t\t<td>&nbsp;</td>\n\t\t</tr>");
if (round($saldo, 2) != round($saldo_final, 2)) {
    if (FORCE_CUADRE_EN_OPERACIONES == true) {
        $arrUp = array("saldo_cuenta" => $saldo_final);
        $xCuenta->setUpdate($arrUp);
    }
    if ($out != OUT_EXCEL) {
        $xRPT->addContent("<style>\n\t\t\t\tbody {\n\t\t\t\t\tbackground-image: url(\"../images/error_saldos.png\");\n\t\t\t\t\tbackground-repeat: repeat;\n\t\t\t\t}\n\t\t\t\t</style>");
    }
}
$xRPT->setOut($out);
$xRPT->addContent($xHT->get());
echo $xRPT->render(true);