function taRetMenuChilds($iparent)
{
    $sql = "SELECT\n\t\t\t\t`general_menu`.`idgeneral_menu` AS 'codigo',\n\t\t\t\t`general_menu`.`menu_title` AS 'titulo',\n\t\t\t\t`general_menu`.`menu_rules` AS 'permisos'\n\t\t\tFROM\n\t\t\t\t`general_menu` `general_menu`\n\t\t\tWHERE menu_parent='{$iparent}'";
    $tMenu = new cTabla($sql);
    $tMenu->setEventKey("returnMenuNode");
    $xTbl = $tMenu->show();
    return $xTbl;
}
function getListRecibos($tipo, $socio)
{
    $sql = new cSQLListas();
    $cTbl = new cTabla($sql->getListadoDeRecibos($tipo, $socio));
    $xImg = new cHImg();
    $cTbl->setKeyField("idoperaciones_recibos");
    $cTbl->setTdClassByType();
    $cTbl->OButton("TR.Reporte", "jsGetReporteRecibo(" . HP_REPLACE_ID . ")", $cTbl->ODicIcons()->REPORTE);
    $cTbl->OButton("TR.Panel", "var xRec = new RecGen(); xRec.panel(" . HP_REPLACE_ID . ")", $cTbl->ODicIcons()->EJECUTAR);
    $cTbl->setEventKey("setRecibo");
    return $cTbl->Show();
}
function jsShowGrupos($nombre_del_grupo)
{
    settype($nombre_del_grupo, "string");
    $rst = "";
    if ($nombre_del_grupo) {
        $nombre_del_grupo = substr($nombre_del_grupo, 0, 6);
        /**
         * 							Sql
         */
        $sql_grupos = "SELECT \r\n\t`socios_grupossolidarios`.`idsocios_grupossolidarios`  AS 'numero',\r\n\t`socios_grupossolidarios`.`nombre_gruposolidario`          \r\n\tAS `nombre`,\r\n\t`socios_grupossolidarios`.`colonia_gruposolidario`         \r\n\tAS `colonia`,\r\n\t`socios_grupossolidarios`.`representante_nombrecompleto`   \r\n\tAS `representante`\r\n\t\r\n\t\t\tFROM socios_grupossolidarios \r\n\t\t\tWHERE nombre_gruposolidario LIKE '%{$nombre_del_grupo}%'\r\n\t\t\t\t\tAND sucursal = '" . getSucursal() . "'\r\n\t\t\tLIMIT 0,10";
        $ctb = new cTabla($sql_grupos);
        $ctb->setEventKey("setGrupo");
        $ctb->setWidth();
        $rst = $ctb->Show();
    }
    return $rst;
}
function jsaGetCobranza($empresa, $idperiodo)
{
    $xL = new cSQLListas();
    $xF = new cFecha();
    $sql = $xL->getListadoDeCobranza($idperiodo, SYS_UNO);
    //setLog($sql);
    //fecha de ministracion anterior al
    $xT = new cTabla($sql);
    $xT->setKeyField("numero_solicitud");
    $xT->setKey(2);
    $xT->setWidthTool("180px");
    $xT->setKeyTable("creditos_solicitud");
    $xT->setEventKey("jsGetRecibosByCredito");
    $xT->addEspTool("<div class='coolCheck'><input type='checkbox' id='chk_REPLACE_ID_' onclick='jsSetAlimentarCobros(this, _REPLACE_ID_)' /><label for='chk_REPLACE_ID_'></label></div>");
    $xT->addEspTool("<img src='../images/order.png' class='x24' onclick='getEstadoDeCuenta(_REPLACE_ID_)' />");
    $xT->addEspTool("<img src='../images/calendar.png' class='x24' onclick='getPlanDePagos(_REPLACE_ID_)' />");
    $xT->addEspTool("<img src='../images/view.png' class='x24' onclick='setOcultar(_REPLACE_ID_)' />");
    /*$subSQL		= "SELECT CONCAT(`socios_memo`.`fecha_memo`, '|',	`socios_memo`.`texto_memo`) AS 'memo' FROM `socios_memo` WHERE (`socios_memo`.`numero_solicitud` =" . HP_REPLACE_ID . ") AND (`socios_memo`.`tipo_memo` =11) ORDER BY `socios_memo`.`fecha_memo` ";
    	$xT->addSubQuery($subSQL);*/
    $xT->setWithMetaData();
    $xT->setFootSum(array(3 => "letra", 6 => "monto"));
    return $xT->Show();
}
$credito = parametro("credito", DEFAULT_CREDITO, MQL_INT);
$credito = parametro("idsolicitud", $credito, MQL_INT);
$credito = parametro("solicitud", $credito, MQL_INT);
$cuenta = parametro("cuenta", DEFAULT_CUENTA_CORRIENTE, MQL_INT);
$cuenta = parametro("idcuenta", $cuenta, MQL_INT);
$jscallback = parametro("callback");
$tiny = parametro("tiny");
$form = parametro("form");
$action = parametro("action", SYS_NINGUNO);
$persona = parametro("i", $persona, MQL_INT);
$xHP->init();
$xFRM = new cHForm("frm", "./");
$msg = "";
$ssql = $xL->getListadoDeCuentasDeCapt($persona, false, $tipo, $subtipo);
$tb = new cTabla($ssql);
$tb->setEventKey("setCuenta");
//$tb->
$xFRM->addHTML($tb->Show());
$xFRM->addCerrar();
echo $xFRM->get();
//$jxc ->drawJavaScript(false, true);
?>
<script  >
function setCuenta(id){
	msrc	= null;
	if (window.parent){ msrc = window.parent.document; }
	if (opener){ msrc = opener.document; }
<?php 
if ($f != false) {
    echo "\n\t\t\tif(msrc == null){} else {\n\t\t\t\tmsrc.{$f}.{$c}.value \t= id;\n\t\t\t\tmsrc.{$f}.{$c}.focus();\n\t\t\t\tmsrc.{$f}.{$c}.select();\n\t\t\t\t//if(typeof msrc.jsGetDescCredito != \"undefined\"){ msrc.jsGetDescCredito();\t}\n\t\t\t}";
    if ($OtherEvent != "") {
     $jsTabs .= ",\n selected: 6\n";
     $xT = new cTabla($xql->getListadoDePerfil($idsocio));
     $xT->addTool(SYS_DOS);
     $xHTabs->addTab("TR.perfil_transaccional", $xT->Show());
     //tab6
 }
 if ($xSoc->getEsEmpresaConConvenio(true) == true) {
     $xT2 = new cHTabs("idcomoempresa");
     $idempresa = $xSoc->getOEmpresa()->getClaveDeEmpresa();
     $oFrm->addEmpresaComandos($idempresa);
     $xTCreds = new cTabla($xql->getListadoDeCreditos(false, false, false, false, " AND (`creditos_solicitud`.`persona_asociada` = {$idempresa}) ", false), 2);
     $xTPers = new cTabla($xql->getListadoDeSocios(" (`socios_general`.`dependencia` = {$idempresa})  "));
     $xTAhorro = new cTabla($xql->getListadoDeIncidenciasAhorro($idempresa));
     $xTPeriodo = new cTabla($xql->getListadoDePeriodoPorEmpresa($idempresa));
     $xTPeriodo->setTdClassByType();
     $xTPeriodo->setEventKey("var xG = new EmpGen(); xG.getOrdenDeCobranza");
     $xTCreds->setTdClassByType();
     $xTPers->setTdClassByType();
     $xTAhorro->setTdClassByType();
     $xModAhorro = "<input type=\"number\" id=\"id" . HP_REPLACE_ID . "\" onblur=\"jsModificarAhorro(this," . HP_REPLACE_ID . ")\" />";
     $xTPers->addEspTool($xModAhorro);
     $xT2->addTab("TR.Trabajadores", $xTPers->Show());
     $xTCreds->setFootSum(array(8 => "saldo"));
     $xT2->addTab("TR.Creditos por empresa", $xTCreds->Show());
     //Ahorro por Empresa
     $xT2->addTab("TR.Ahorro por empresa", $xTAhorro->Show());
     $xT2->addTab("TR.Periodos de Empresa", $xTPeriodo->Show());
     $xHTabs->addTab("TR.empresa {$idempresa}", $xT2->get());
     //tab4
     $oFrm->OButton("TR.Cedula de Incidencias de Ahorro", "jsGetCedulaDeAhorro()", "deposito");
     $oFrm->OButton("TR.Actualizar Empresa", "jsaActualizarEmpresa()", $oFrm->ic()->EJECUTAR);
    $xFRM->addJsBasico(iDE_CAPTACION);
    $xFRM->addCuentaCaptacionBasico(true);
    $xFRM->addSubmit();
} else {
    $xCta = new cCuentaDeCaptacion($cuenta);
    $xCta->init();
    $xFRM->addHTML($xCta->getFicha(true, "", true));
    $xFRM->addSubmit();
    //$xFRM->addToolbar( $xBtn->getBasic("TR.refrescar", "jsRecargar()", "refrescar", "refrescar", false ) );
    //$xFRM->addToolbar( $xBtn->getBasic("TR.imprimir contrato", "jsRecargar()", "refrescar", "refrescar", false ) );
    $xFRM->addCaptacionComandos($cuenta);
    $xHTabs = new cHTabs();
    $cTblx = new cTabla($mSQL->getListadoDeRecibos("", $xCta->getClaveDePersona(), $xCta->getNumeroDeCuenta()));
    $cTblx->setKeyField("idoperaciones_recibos");
    $cTblx->setTdClassByType();
    $cTblx->setEventKey("jsGoPanelRecibos");
    $xHTabs->addTab("TR.RECIBOS", $cTblx->Show());
    $xFRM->addHTML($xHTabs->get());
    $xFRM->OHidden("idcuentacaptacion", $cuenta);
    /*
    	 * <fieldset>
    				<legend>Barra de Acciones</legened>
    					<table  align='center'>
    						<tr>
    							<td>
    								<input type='button' name='printcontrato' value='IMPRIMIR CONTRATO DE CAPTACION' onClick='printrec();'>
    							</td>
    							<td>
    								<input type='button' name='command' value='Ver/Guardar Firmas' onClick='captura_firmas();'>
    							</td>
    							<td>
	<tr>
		<td><input type='button' name='sendme' value='CONSULTAR MOVIMIENTOS' onClick='frmdelrecibos.submit();' /></td>
	</tr>
</table>
</fieldset>
</form>
<?php 
} else {
    $xSoc = new cSocio($socio, true);
    echo $xSoc->getFicha(true);
    /* ----------------- DATOS --------------- */
    //$numeroops = "SELECT COUNT(idoperaciones_mvtos) AS 'obtener' FROM operaciones_mvtos WHERE recibo_afectado=$idrecibo";
    //$nopers = mifila($numeroops, "obtener");
    $sqlmvto = "SELECT\n\t\t\t`operaciones_mvtos`.`idoperaciones_mvtos`   AS `codigo`,\n\t\t\t`operaciones_mvtos`.`docto_afectado`       AS `documento`,\n\t\t\t`operaciones_mvtos`.`recibo_afectado`       AS `recibo`,\n\t\t\t`operaciones_mvtos`.`fecha_operacion`       AS `operado`,\n\t\t\t`operaciones_mvtos`.`fecha_afectacion`      AS `afectado`,\n\t\n\t\t\t`operaciones_mvtos`.`tipo_operacion`        AS `operacion`,\n\t\t\t`operaciones_tipos`.`descripcion_operacion` AS `descripcion`,\n\t\t\t`operaciones_mvtos`.`afectacion_real`       AS `monto`\n\t\tFROM\n\t\t\t`operaciones_mvtos` `operaciones_mvtos`\n\t\t\t\tINNER JOIN `operaciones_tipos` `operaciones_tipos`\n\t\t\t\tON `operaciones_mvtos`.`tipo_operacion` = `operaciones_tipos`.\n\t\t\t\t`idoperaciones_tipos`\n\t\tWHERE\n\t\t\t(`operaciones_mvtos`.`socio_afectado` ={$socio})\n\t\tORDER BY\n\t\t\t`operaciones_mvtos`.`fecha_operacion`,\n\t\t\t`operaciones_mvtos`.`docto_afectado`,\n\t\t\t`operaciones_mvtos`.`tipo_operacion`\n\t\t";
    $cEdit = new cTabla($sqlmvto);
    $cEdit->setEventKey("jsEditClick");
    //$cEdit->addTool(1);
    $cEdit->addTool(2);
    $cEdit->setKeyField("idoperaciones_mvtos");
    $cEdit->Show("", false);
}
?>
</body>
<script   >
	<?php 
echo $cEdit->getJSActions();
?>
function jsEditClick(id){
	jsUp('operaciones_mvtos','idoperaciones_mvtos', id);
}
</script>
				<input type="button" value="Agregar un Periodo Nuevo" onClick="addPeriodo();;" >
				<input type="button" name="sendme" value="SALIR" onClick="setTerminar();">			
			</th>
		</tr>
	</table>

</form>
<p class="aviso"><?php 
echo $aviso;
?>
</p>

<?php 
$sqlp = $sqlb11 . " ORDER BY fecha_reunion DESC";
$tbl = new cTabla($sqlp);
$tbl->setEventKey("setPeriodo");
$tbl->Show("", false);
$per = isset($_POST["cPeriodo"]) ? $_POST["cPeriodo"] : EACP_PER_SOLICITUDES;
if ($per != EACP_PER_SOLICITUDES) {
    $xP = new cPeriodoDeCredito($per);
    $xHT = new cHTMLObject();
    echo $xHT->setInHTML($xP->setCambiar($per));
}
?>
</fieldset>
</body>
<script  >
	function setPeriodo(Id){
		document.frmupdateperiodo.cPeriodo.value = Id;
	}
	function setTerminar(){
function jsaGetLetrasAVencerTodas($fecha)
{
    $xD = new cFecha();
    $xL = new cSQLListas();
    $fecha = $xD->getFechaISO($fecha);
    $sql = $xL->getListadoDeLetrasConCreditos_Simple($fecha, false, "", "", "", true);
    //, false, "", "", " AND (`creditos_tipoconvenio`.`tipo_en_sistema` =$producto) ");
    $xT = new cTabla($sql, 2);
    $xT->setWithMetaData(true);
    //$xT->setClassT("")
    $xT->setEventKey("jsCargarCredito");
    return $xT->Show();
}
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="<?php 
echo CSS_GENERAL_FILE;
?>
" rel="stylesheet" type="text/css">
</head>
<?php 
//$jsb	= new jsBasicForm("", iDE_CAPTACION);
//$jsb->show();
//$jxc ->drawJavaScript(false, true);
?>
<body  onload='initComponents();'>
	<?php 
$sqlT = "SELECT\n\t\t\t\t\t`socios`.`codigo`,\n\t\t\t\t\t`socios`.`nombre` \n\t\t\t\tFROM\n\t\t\t\t\t`socios` `socios`\n\t\t\t\tWHERE\n\t\t\t\t\t(`socios`.`numero_caja_local` = {$i} ) \n\t\t\t\tORDER BY\n\t\t\t\t\t`socios`.`codigo` DESC\n\t\t\t\tLIMIT 0,20 ";
$cTbl = new cTabla($sqlT);
$cTbl->setEventKey("setSocio");
$cTbl->setRowCSS("codigo", "center");
$cTbl->Show("SOCIOS QUE COINCIDEN CON LA BUSQUEDA", false);
?>

</body>
<script  >

function setSocio(id){
<?php 
if (isset($f)) {
    echo "\n\t\topener.document.{$f}.idsocio.value = id;\n\t\topener.document.{$f}.idsocio.focus();\n\t\t{$OtherEvent}\n\t\twindow.close();\n\t\t";
}
?>
}
function initComponents(){
$estadisticos = parametro("estadisticos", false, MQL_BOOL);
if ($estadisticos == true) {
    $ByTipoDePago .= " AND tipo_de_pago !='" . TESORERIA_COBRO_NINGUNO . "' ";
}
if ($ByTipoDePago == "") {
    $GByTipoPago = ", `listado_de_ingresos`.`tipo_de_pago`";
}
$xRPT->setOut($out);
//============ Reporte
$body = $xRPT->getEncabezado($xHP->getTitle(), $FechaInicial, $FechaFinal);
$xRPT->setBodyMail($body);
//============ Agregar HTML
//$xRPT->addContent( $xHP->init($jsEvent) );
$xRPT->addContent($body);
//$xT->setEventKey("jsGoPanel");
//$xT->setKeyField("creditos_solicitud");
$xRPT->setTitle($xHP->getTitle());
$sql = "\r\nSELECT\r\n\t{$mrkEmpresa}\r\n\t`listado_de_ingresos`.`codigo`,\r\n\t`listado_de_ingresos`.`nombre`,\r\n\t`listado_de_ingresos`.`fecha`,\r\n\tSUM(`listado_de_ingresos`.`capital`)            AS `capital`,\r\n\tSUM(`listado_de_ingresos`.`interes_normal`)    \tAS `interes`,\r\n\tSUM(`listado_de_ingresos`.`interes_moratorio`) \tAS `moratorios`,\r\n\tSUM(`listado_de_ingresos`.`iva`)               \tAS `iva`,\r\n\tSUM(`listado_de_ingresos`.`otros`)             \tAS `otros` ,\r\n\tSUM(`capital`+ `interes_normal`+`interes_moratorio`+`iva`+`otros`) AS 'total',\r\n\tMAX(`listado_de_ingresos`.`parcialidad`)      \tAS `parcialidad`,\r\n\tMAX(`listado_de_ingresos`.`periocidad`)\t\t\tAS `periocidad`,\r\n\tMAX(`listado_de_ingresos`.`banco`)\t\t\t\tAS `banco`\r\n\t{$CampoTipoPago}\r\nFROM\r\n\t`listado_de_ingresos` `listado_de_ingresos`\r\nWHERE\r\n\t(`listado_de_ingresos`.`fecha` >='{$FechaInicial}') AND (`listado_de_ingresos`.`fecha` <='{$FechaFinal}') {$ByConvenio} {$ByEmpresa} {$ByBanco} {$ByTipoDePago}\r\nGROUP BY\r\n\t`listado_de_ingresos`.`clave_empresa`,\r\n\t`listado_de_ingresos`.`codigo`,\r\n\t`listado_de_ingresos`.`fecha`,\r\n\t`listado_de_ingresos`.`banco`\r\n\t{$GByTipoPago}\r\nORDER BY\r\n\t`listado_de_ingresos`.`fecha`,\r\n\t`listado_de_ingresos`.`clave_empresa`,\r\n\t`listado_de_ingresos`.`periocidad`,\r\n\t`listado_de_ingresos`.`nombre`\r\n\t";
//exit( $sql);
$xTBL = new cTabla($sql);
$xTBL->setEventKey("jsGoEstadoDeCuentaDeCreditosPorPersona");
$xTBL->setKeyField("codigo");
$xTBL->setTdClassByType();
$xTBL->setTipoSalida($out);
$arrCSumas = $empresa != DEFAULT_EMPRESA ? array(5 => "capital", 6 => "interes", 7 => "moratorios", 8 => "iva", 9 => "otros", 10 => "total") : array(3 => "capital", 4 => "interes", 5 => "moratorios", 6 => "iva", 7 => "otros", 8 => "total");
$xTBL->setFootSum($arrCSumas);
$xRPT->setSQL($sql);
$xRPT->addContent($xTBL->Show());
$xRPT->setResponse();
$xRPT->setSenders($senders);
echo $xRPT->render(true);
function jsaGetRecibosEmitidos($fecha)
{
    $xF = new cFecha();
    $fecha = $xF->getFechaISO($fecha);
    $xL = new cSQLListas();
    $sql = $xL->getListadoDeRecibos("", "", "", $fecha);
    $xT = new cTabla($sql);
    $xT->setEventKey("jsGetPanelRecibo");
    return $xT->Show();
}
$a = isset($_GET["a"]) ? $_GET["a"] : "";
$tipos = isset($_GET["tipo"]) ? $_GET["tipo"] : SYS_TODAS;
$tipos = $tipos == "todos" ? SYS_TODAS : $tipos;
$OtherEvent = isset($_GET["ev"]) ? $_GET["ev"] : "";
//Otro Evento Desatado
$tiny = isset($_GET["tinybox"]) ? true : false;
$slimit = "";
if ($a == "") {
    $slimit = " LIMIT 0,20";
}
echo $xHP->getHeader();
$lsql = new cSQLListas();
$sql = $lsql->getListadoDeCreditos($persona, true, $tipos, false, "", true);
$xFRM = new cHForm("frmlistacreditos");
$xT = new cTabla($sql);
$xT->setEventKey("setCredito");
$xFRM->addHTML($xT->Show($xHP->getTitle()));
//$xFRM->addHTML("<code>$sql</code>");
$xFRM->addSubmit("TR.aceptar", "jsEnd()");
echo $xHP->setBodyinit();
echo $xFRM->get();
echo $xHP->setBodyEnd();
?>
<script>
var msrc		= null;

function setCredito(id){
	var mopts	= {};
	if (window.parent){ msrc = window.parent.document; }
	if (opener){ msrc = opener.document; }
<?php 
$cuenta = parametro("idcuenta", $cuenta, MQL_INT);
$jscallback = parametro("callback");
$tiny = parametro("tiny");
$form = parametro("form");
$action = parametro("action", SYS_NINGUNO);
$xHP->init();
$xFRM = new cHForm("frm", "./");
$msg = "";
$FechaInit = $xF->getDiaInicial();
$FechaFin = $xF->getDiaFinal();
$otros = " AND (`operaciones_recibostipo`.`tipo_poliza_generada` != 999) AND `operaciones_recibos`.`total_operacion` > 0 ";
$xTbl = new cTabla($xLi->getListadoDeRecibos("", "", "", $FechaInit, $FechaFin, $otros));
//$xTbl->addEspTool();
$xTbl->OButton("TR.Poliza", "jsBuscarPoliza(" . HP_REPLACE_ID . ")", $xTbl->ODicIcons()->CONTABLE);
$xTbl->OButton("TR.Factura", "jsBuscarFactura(" . HP_REPLACE_ID . ")", $xTbl->ODicIcons()->REPORTE);
$xTbl->setEventKey("jsGetPanel");
//$table_s->addEspTool("\$xS=new cSocio(_REPLACE_ID_,true);\$D=\$xS->getTotalColocacionActual();PHP::(\$D[SYS_NUMERO]>0) ? \"<div class='noticon'><i class='fa fa-credit-card fa-lg'></i><span class='noticount'>\" . \$D[SYS_NUMERO] . \"</span></div>\":\"\";");
$xFRM->addHTML($xTbl->Show());
//$xFRM->addJsBasico();
//$xFRM->addCreditBasico();
//$xFRM->addSubmit();
$xFRM->OHidden("idclaveactual", 0, "");
$xFRM->addAviso("");
echo $xFRM->get();
$jxc->drawJavaScript(false, true);
?>
<script>
var xRec	= new RecGen();
var xG		= new Gen();
function jsBuscarPoliza(idrecibo){
	$("#idclaveactual").val(idrecibo);
function jsShowSocios($texto, $tipo_de_busqueda)
{
    $strTbls = "";
    $ByForm = false;
    $MostrarGars = true;
    $MostrarPartes = true;
    $sqlL = new cSQLListas();
    $WSoc = " `socios_general`.`codigo` != " . DEFAULT_SOCIO . "";
    $WPrel = "";
    $xIc = new cHImg();
    if ($tipo_de_busqueda == "nc") {
        $ByForm = true;
    }
    if (!isset($texto) or trim($texto) == "" or $texto == DEFAULT_SOCIO or $texto == "0") {
        $sqllike = $sqlL->getListadoDeSocios(" tipoingreso != " . TIPO_INGRESO_SDN);
        $table_s = new cTabla($sqllike);
        $table_s->setEventKey("setSocio");
        $table_s->setRowCSS("codigo", "center");
        $table_s->addEspTool("\$xS=new cSocio(_REPLACE_ID_,true);\$D=\$xS->getTotalColocacionActual();PHP::(\$D[SYS_NUMERO]>0) ? \"<div class='noticon'><i class='fa fa-credit-card fa-lg'></i><span class='noticount'>\" . \$D[SYS_NUMERO] . \"</span></div>\":\"\";");
        $strTbls .= $table_s->Show("TR.ULTIMOS REGISTROS");
    } else {
        $texto = trim($texto);
        $texto = strtoupper($texto);
        $completo = explode(" ", $texto);
        $str = fmt_string($completo[0]);
        $marked = false;
        switch ($tipo_de_busqueda) {
            //CURP
            case "c":
                $str = trim(substr($completo[0], 0, 7));
                $WSoc = " (curp LIKE '{$str}%') ";
                break;
                //NUMERO DE SOCIO
            //NUMERO DE SOCIO
            case "s":
                $str = trim(substr($completo[0], 0, 6));
                $WSoc = " (codigo LIKE '{$str}%') ";
                break;
                //NUMERO DEempresa
            //NUMERO DEempresa
            case "e":
                $WSoc = " (dependencia = {$texto}) ";
                break;
                //DEAFULT:
            //DEAFULT:
            default:
                //balam gon lui
                if (isset($completo[1])) {
                    $str = fmt_string($completo[1]);
                    $WSoc .= $str != "*" ? " AND (apellidomaterno LIKE '{$str}%') " : "";
                }
                if (isset($completo[2])) {
                    $str = fmt_string($completo[2]);
                    $WSoc .= $str != "*" ? " AND (nombrecompleto LIKE '{$str}%') " : "";
                }
                if (isset($completo[0])) {
                    $str = fmt_string($completo[0]);
                    $WSoc .= " AND ((apellidopaterno LIKE '{$str}%') OR (nombrecompleto LIKE '%{$str}%') )";
                }
                break;
        }
        if ($tipo_de_busqueda == "pp") {
            $sqllike = "SELECT\n\t\t\t\t\t`creditos_solicitud`.`numero_solicitud`        AS `credito`,\n\t\t\t\t\t`socios`.`codigo`,\n\t\t\t\t\t`socios`.`nombre`,\n\t\t\t\t\t`creditos_solicitud`.`pagos_autorizados`       AS `pagos`,\n\t\t\t\t\t(`creditos_solicitud`.`ultimo_periodo_afectado`+1) AS `periodo`,\n\t\t\t\t\t`creditos_solicitud`.`saldo_actual`            AS `saldo`,\n\t\t\t\t\t`creditos_solicitud`.`monto_parcialidad`       AS `parcialidad` \n\t\t\t\tFROM\n\t\t\t\t\t`creditos_solicitud` `creditos_solicitud` \n\t\t\t\t\t\tINNER JOIN `socios` `socios` \n\t\t\t\t\t\tON `creditos_solicitud`.`numero_socio` = `socios`.`codigo` \n\t\t\t\tWHERE\n\t\t\t\t\t(`creditos_solicitud`.`saldo_actual` >0.99)\n\t\t\t\t\tAND\n\t\t\t\t\t(`creditos_solicitud`.`tipo_convenio` ={$texto}) ORDER BY\t`socios`.`nombre` ";
            $table_s = new cTabla($sqllike);
            $table_s->setEventKey("jsGoRecibo");
            $table_s->setRowCSS("credito", "center");
            $table_s->setKeyField("credito");
            $table_s->setWithMetaData();
            $strTbls .= $table_s->Show("TR.CREDITOS");
        } else {
            $sqllike = $sqlL->getListadoDeSocios($WSoc . " AND tipoingreso != " . TIPO_INGRESO_SDN);
            $table_s = new cTabla($sqllike);
            $table_s->setEventKey("setSocio");
            $table_s->setRowCSS("codigo", "center");
            $table_s->addEspTool($xIc->get24("settings.png", "onclick='jsToPanel(_REPLACE_ID_)'"));
            //$table_s->addSubQuery("SELECT CONCAT(`creditos_solicitud`.`numero_solicitud`, '|', `creditos_solicitud`.`numero_pagos`, '|',`creditos_solicitud`.`periocidad_de_pago`,'|',`creditos_solicitud`.`saldo_actual` ) FROM creditos_solicitud WHERE numero_socio = _REPLACE_ID_", 1);
            $table_s->addEspTool("\$xS=new cSocio(_REPLACE_ID_,true);\$D=\$xS->getTotalColocacionActual();PHP::(\$D[SYS_NUMERO]>0) ? \"<div class='noticon'><i class='fa fa-credit-card fa-lg'></i><span class='noticount'>\" . \$D[SYS_NUMERO] . \"</span></div>\":\"\";");
            $strTbls .= $table_s->Show("TR.PERSONAS QUE COINCIDEN CON LA BUSQUEDA");
        }
    }
    return $strTbls;
}