function jsaGetGrupos($txt)
{
    $nombre = $txt;
    $xLi = new cSQLListas();
    $ByNombre = $nombre != "" ? " AND (`nombre_gruposolidario` LIKE '%{$nombre}%' OR `representante_nombrecompleto` LIKE '%{$nombre}%' OR `vocalvigilancia_nombrecompleto` LIKE '%{$nombre}%') " : "";
    $sql = $xLi->getListadoDeGrupos() . "\n\t{$ByNombre}\n\tORDER BY\n\t`nombre_gruposolidario`\n\tLIMIT 0,10 ";
    $xT = new cTabla($sql);
    return $xT->Show();
}
function jsaGuardarPerfil($persona, $tipo, $pais, $monto, $numero, $observaciones)
{
    $xAP = new cAMLPersonas($persona);
    $xAP->init();
    $xAP->setGuardarPerfilTransaccional($tipo, $pais, $monto, $numero, $observaciones);
    $QL = new cSQLListas();
    $xT = new cTabla($QL->getListadoDePerfil($persona));
    $xT->addTool(SYS_DOS);
    return $xT->Show() . $xAP->getMessages(OUT_HTML);
}
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 jsaGetPolizas($fecha, $tipo)
{
    $xF = new cFecha();
    $fecha = $xF->getFechaISO($fecha);
    $xQL = new cSQLListas();
    $xT = new cTabla($xQL->getListadoDePolizasContables($fecha, $tipo), 7);
    $xBtn = new cHImg();
    $xT->setKeyField("codigo");
    $xT->OButton("TR.Modificar", "jsAgregarMovimientos('" . HP_REPLACE_ID . "')\"", $xT->ODicIcons()->AGREGAR);
    $xT->OButton("TR.Imprimir", "jsImprimirPoliza('" . HP_REPLACE_ID . "')\"", $xT->ODicIcons()->IMPRIMIR);
    $xT->OButton("TR.Eliminar", "jsEliminarPoliza('" . HP_REPLACE_ID . "')\"", $xT->ODicIcons()->ELIMINAR);
    return $xT->Show();
}
function jsaGetCreditos($convenio, $estatus, $periocidad, $oficial)
{
    $xLi = new cSQLListas();
    $ByOficial = CREDITO_USAR_OFICIAL_SEGUIMIENTO == true ? "\tAND\t(`creditos_solicitud`.`oficial_seguimiento` != {$oficial}) " : "\tAND\t(`creditos_solicitud`.`oficial_credito` != {$oficial}) ";
    //saveError( 22, $_SESSION["SN_b80bb7740288fda1f201890375a60c8f"], "$oficial Ingreso al Modulo de Asignacion de Oficiales");
    $sqlCred = CREDITO_USAR_OFICIAL_SEGUIMIENTO == true ? $xLi->getListadoDeCreditosConOficialSeguimiento(false, $estatus, $periocidad, $convenio, $ByOficial) : $xLi->getListadoDeCreditosConOficial(false, $estatus, $periocidad, $convenio, $ByOficial);
    $xTbl = new cTabla($sqlCred, 2);
    $xChk = new cHCheckBox();
    $xTbl->setTdClassByType();
    $xTbl->addEspTool($xChk->get("", "chk" . STD_LITERAL_DIVISOR . "_REPLACE_ID_"));
    $xTbl->setWidth();
    return $xTbl->Show();
    //return $sqlCred;
}
function jsaGetLetras($idcredito, $idfecha)
{
    $xCred = new cCredito($idcredito);
    $xCred->init();
    //$xPlas	= $xCred->getPlanDePago();
    $xF = new cFecha();
    $idfecha = $xF->getFechaISO($idfecha);
    $xQL = new MQL();
    //$xQL->setRawQuery("SET @fecha_de_corte:='$idfecha';");
    my_query("SET @fecha_de_corte:='{$idfecha}';");
    $sql = "SELECT\r\n\t`letras`.`socio_afectado` AS `persona`,\r\n\t`letras`.`docto_afectado` AS `credito`,\r\n\t`letras`.`periodo_socio`  AS `parcialidad`,\r\n\t`letras`.`fecha_de_pago`,\r\n\r\n\t`letras`.`capital`,\r\n\t`letras`.`interes`,\r\n\t`letras`.`iva`,\r\n\t`letras`.`ahorro`,\r\n\t`letras`.`otros`,\r\n\t`letras`.`letra`,\t\r\n\t\r\n\t(`creditos_solicitud`.`tasa_moratorio`*100) AS `tasa_de_mora`,\r\n\t(`creditos_solicitud`.`tasa_interes`*100)   AS `tasa_de_interes` ,\r\n\tDATEDIFF(getFechaDeCorte(), fecha_de_pago) AS 'dias',\r\n\t ((letras.capital * DATEDIFF(getFechaDeCorte(), fecha_de_pago) * (`creditos_solicitud`.`tasa_moratorio` + `creditos_solicitud`.`tasa_interes`))/getDivisorDeInteres()) AS 'mora'\r\n\tFROM\r\n\t\t`creditos_solicitud` `creditos_solicitud` \r\n\t\t\tINNER JOIN `letras` `letras` \r\n\t\t\tON `creditos_solicitud`.`numero_solicitud` = `letras`.`docto_afectado`\r\n\t\r\n\t WHERE capital >0 AND docto_afectado={$idcredito} AND fecha_de_pago <= getFechaDeCorte()";
    $xT = new cTabla($sql);
    $xT->setFootSum(array(4 => "capital", 5 => "interes", 6 => "iva", 7 => "ahorro", 8 => "otros", 9 => "letra", 13 => "mora"));
    return $xT->Show();
}
function mostrar_notificaciones($finicial, $ffinal, $estatus)
{
    $sql = "SELECT\n\t`seguimiento_notificaciones`.`idseguimiento_notificaciones` AS `codigo`,\n\t`seguimiento_notificaciones`.`socio_notificado` AS 'socio',\n\t`socios`.`nombre`,\n\t`seguimiento_notificaciones`.`numero_solicitud` AS 'solicitud',\n\t`seguimiento_notificaciones`.`numero_notificacion` AS 'num',\n\t`seguimiento_notificaciones`.`fecha_notificacion`,\n\t/*`oficiales`.`nombre_completo` AS \t`oficial_a_cargo`,*/\n\t/*`seguimiento_notificaciones`.`fecha_vencimiento`,*/\n\t`seguimiento_notificaciones`.`capital`,\n\t`seguimiento_notificaciones`.`interes`,\n\t`seguimiento_notificaciones`.`moratorio`,\n\t`seguimiento_notificaciones`.`otros_cargos`,\n\t`seguimiento_notificaciones`.`total` \nFROM\n\t`seguimiento_notificaciones` `seguimiento_notificaciones` \n\t\tINNER JOIN `socios` `socios` \n\t\tON `seguimiento_notificaciones`.`socio_notificado` = `socios`.`codigo` \n\t\t\tINNER JOIN `oficiales` `oficiales` \n\t\t\tON `seguimiento_notificaciones`.`oficial_de_seguimiento` = `oficiales`\n\t\t\t.`id` \nWHERE\n\t(`seguimiento_notificaciones`.`estatus_notificacion` ='{$estatus}')\n\t\tORDER BY\n\t\t\t`seguimiento_notificaciones`.`idseguimiento_notificaciones`";
    //$cmdCancel = new cCmdByOrder("common/exit.png", "Cumplir Notificacion", "jsSetCumplido(event);", "cmd@_REPLACE_ID_");
    $cmdOk = "<label for='cmd@_REPLACE_ID_'><input type='checkbox' id='cmd@_REPLACE_ID_' /></label>";
    $cTbl = new cTabla($sql);
    $cTbl->setWidth();
    $cTbl->addTool(2);
    $cTbl->addTool(1);
    //$cTbl->addEspTool($cmdCancel->show());
    $cTbl->addEspTool($cmdOk);
    //$cTbl->addTool(2);
    $cTbl->setTdClassByType();
    $cTbl->setKeyField("idseguimiento_notificaciones");
    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 jsaGetListadoDeAvisos($tipo, $fecha_inicial, $fecha_final)
{
    $tipo = $tipo == SYS_TODAS ? false : $tipo;
    $xF = new cFecha();
    $xAl = new cAml_alerts();
    $xlistas = new cSQLListas();
    $xBtn = new cHButton();
    $xImg = new cHImg();
    $fecha_inicial = $xF->getFechaISO($fecha_inicial);
    $fecha_final = $xF->getFechaISO($fecha_final);
    $sql = $xlistas->getListadoDeRiesgosConfirmados($fecha_inicial, $fecha_final, $tipo);
    // getListadoDeAlertas($tipo, $fecha_inicial, $fecha_final, false, " AND `estado_en_sistema`= " . SYS_UNO);
    $xT = new cTabla($sql);
    $xT->addEspTool($xImg->get24("check", " onclick=\"jsConfirmRiesgo(_REPLACE_ID_)\" "));
    $xT->addEspTool($xImg->get24("delete", " onclick=\"jsDescartarRiesgo(_REPLACE_ID_)\" "));
    $xT->setKeyField($xAl->getKey());
    $xT->setKeyTable($xAl->get());
    return $xT->Show();
}
function jsaGetListadoDeAvisos($tipo, $fecha_inicial, $fecha_final)
{
    $tipo = $tipo == SYS_TODAS ? false : $tipo;
    $xF = new cFecha();
    $xAl = new cAml_risk_register();
    $xlistas = new cSQLListas();
    $xBtn = new cHButton();
    $xImg = new cHImg();
    $fecha_inicial = $xF->getFechaISO($fecha_inicial);
    $fecha_final = $xF->getFechaISO($fecha_final);
    $sql = $xlistas->getListadoDeRiesgosConfirmados(false, false, false, $tipo, false, " AND (`aml_risk_register`.`estado_de_envio` =0) AND (`aml_risk_register`.`fecha_de_checking` =0) ");
    $xT = new cTabla($sql);
    //setLog($sql);
    $xT->OButton("TR.Dictaminar", "jsModificarEstatus(_REPLACE_ID_)", $xT->ODicIcons()->REPORTE);
    $xT->OButton("TR.Modificar", "jsEditarRiesgo(_REPLACE_ID_)", $xT->ODicIcons()->EDITAR);
    //$xT->addTool(1);
    $xT->setKeyField($xAl->getKey());
    $xT->setKeyTable($xAl->get());
    return $xT->Show();
}
function jsaGetListadoDeAvisos($tipo, $fecha_inicial, $fecha_final, $todas)
{
    $tipo = $tipo == SYS_TODAS ? false : $tipo;
    $xT = new cTipos();
    $xF = new cFecha();
    $xAl = new cAml_alerts();
    $xlistas = new cSQLListas();
    $xBtn = new cHButton();
    $xImg = new cHImg();
    //
    $ByEstado = $xT->cBool($todas) == true ? "" : " AND `estado_en_sistema`= " . SYS_UNO;
    $ByEstado .= setNoMenorQueCero($tipo) <= 0 ? "" : "  AND (`aml_risk_catalog`.`tipo_de_riesgo` ={$tipo}) ";
    $fecha_inicial = $xF->getFechaISO($fecha_inicial);
    $fecha_final = $xF->getFechaISO($fecha_final);
    $sql = $xlistas->getListadoDeAlertas(false, false, false, false, $ByEstado);
    $xT = new cTabla($sql);
    $xT->setWithMetaData();
    $xT->OButton("TR.Dictaminar", "jsModificarEstatus(_REPLACE_ID_)", $xT->ODicIcons()->REPORTE);
    $xT->OButton("TR.Panel", "jsToPanel(_REPLACE_ID_)", $xT->ODicIcons()->EJECUTAR);
    $xT->setKeyField($xAl->getKey());
    $xT->setKeyTable($xAl->get());
    return $xT->Show();
}
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();
}
function jsaGetListadoCierres($fecha)
{
    $xLi = new cSQLListas();
    $xF = new cFecha();
    $fecha = $xF->getFechaISO($fecha);
    $sqlList = $xLi->getListadoDeRecibos(12, "", "", $fecha);
    $xTab = new cTabla($sqlList);
    $xTab->OButton("TR.Reporte", "var xR = new RecGen(); xR.reporte(" . HP_REPLACE_ID . ")", $xTab->ODicIcons()->REPORTE);
    $xTab->OButton("TR.Panel", "var xR = new RecGen(); xR.panel(" . HP_REPLACE_ID . ")", $xTab->ODicIcons()->CONTROL);
    $xBtn = new cHButton();
    $xSel = new cHSelect();
    $xCA = $xSel->getListaDeCajasAbiertas();
    $T2 = new cTabla($xCA->getSQL() . " AND `tesoreria_cajas`.`fecha_inicio` = '{$fecha}' ");
    $T2->addEspTool($xBtn->getBasic("", "jsToCerrarCorte('{$fecha}')", "bloquear", "idcerrar", true));
    $html = $xTab->Show("TR.LISTADO DE CIERRES");
    if (MODULO_CAJA_ACTIVADO == true) {
        $html .= $T2->Show("TR.Cajas Abiertas");
        $itemsAbier = $T2->getRowCount();
        $html .= "<input type='hidden' id='idabiertas' value='{$itemsAbier}' />";
    } else {
        $html .= "<input type='hidden' id='idabiertas' value='0' />";
    }
    return $html;
}
	</table>
	<input type="submit" value="Enviar">
</form>
<?php 
$description = $_POST["descripcion"];
$id = $_POST["id"];
$sqlp = "SELECT idcreditos_destinos AS 'Identificador', descripcion_destinos AS 'Descripcion' FROM creditos_destinos";
if ($description) {
    $sql = "INSERT INTO creditos_destinos(idcreditos_destinos, descripcion_destinos, destino_credito) VALUES ({$id}, '{$description}', {$id})";
    my_query($sql);
    echo "<p class='aviso'>EL REGISTRO SE EFECTUO CORRECTAMENTE</p><hr></hr>";
}
$mtbl = new cTabla($sqlp);
$mtbl->addTool(1);
$mtbl->addTool(2);
echo $mtbl->Show();
?>
</body>
<script  >
	function actualizame(id) {
	url = "../utils/frm8db7028bdcdf054882ab54f644a9d36b.php?t=creditos_destinos&f=idcreditos_destinos=" + id;
			myurl = window.open(url);
			myurl.focus();

	}
	function eliminame(id) {
		var sURL = "../utils/frm9d23d795f8170f495de9a2c3b251a4cd.php?t=creditos_destinos&f=idcreditos_destinos=" + id;
	delme = window.open( sURL, "window", "width=300,height=300,scrollbars=yes,dependent");
	delme.focus();

	}
include_once "../core/core.fechas.inc.php";
include_once "../libs/sql.inc.php";
$oficial = elusuario($iduser);
$cuenta_inicial = $_GET["ci"];
$cuenta_final = $_GET["cf"];
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title></title>
</head>
<link href="../css/reporte.css" rel="stylesheet" type="text/css">
<body onLoad="javascript:window.print();">
<!-- -->
<?php 
echo getRawHeader();
//diario
$sqlsdo = "SELECT\n\t`contable_catalogo`.`numero`,\n\t/*`contable_catalogo`.`nombre`, */\n\t`contable_saldos`.`ejercicio`,\n\t`contable_saldos`.`tipo`,\n\t`contable_saldos`.`saldo_inicial`,\n\t`contable_saldos`.`imp1`,\n\t`contable_saldos`.`imp2`,\n\t`contable_saldos`.`imp3`,\n\t`contable_saldos`.`imp5`,\n\t`contable_saldos`.`imp6`,\n\t`contable_saldos`.`imp7`,\n\t`contable_saldos`.`imp8`,\n\t`contable_saldos`.`imp9`,\n\t`contable_saldos`.`imp10`,\n\t`contable_saldos`.`imp11`,\n\t`contable_saldos`.`imp12` \nFROM\n\t`contable_catalogo` `contable_catalogo` \n\t\tINNER JOIN `contable_saldos` `contable_saldos` \n\t\tON `contable_catalogo`.`numero` = `contable_saldos`.`cuenta` \nWHERE \n\t`contable_saldos`.cuenta = {$cuenta_inicial}";
$tbl = new cTabla($sqlsdo);
echo $tbl->Show();
echo " <br />\n<br />\n<br />\n<br />\n<br /> ";
echo $tbl->getValorCampo("nombre");
/* $rs = mysql_query($sqlsdo);
while($rw = mysql_fetch_array($rs)){
	
} */
echo getRawFooter();
?>
</body>
</html>
    $fechaFinal = isset($_GET["off"]) ? $xF->getFechaISO($_GET["off"]) : fechasys();
} else {
    $fechaInicial = isset($_GET["on"]) ? $_GET["on"] : FECHA_INICIO_OPERACIONES_SISTEMA;
    $fechaFinal = isset($_GET["off"]) ? $_GET["off"] : fechasys();
}
$ByConvenio = $convenio == SYS_TODAS ? "" : " AND\t(`listado_de_ingresos`.`producto` ={$convenio}) ";
$ByEmpresa = $empresa == SYS_TODAS ? "" : " AND (`listado_de_ingresos`.`clave_empresa` = {$empresa}) ";
$ByFecha = "";
echo $xHP->getHeader();
echo $xHP->setBodyinit("initComponents();");
echo getRawHeader();
$xRpt = new cReportes();
echo $xRpt->getEncabezado($xHP->getTitle(), $fechaInicial, $fechaFinal, $oficial);
$sql = "SELECT * FROM listado_de_ingresos WHERE (`listado_de_ingresos`.`fecha` >='{$fechaInicial}')\r\nAND (`listado_de_ingresos`.`fecha` <='{$fechaFinal}') {$ByConvenio} {$ByEmpresa}\r\nAND tipo_de_pago !='" . TESORERIA_COBRO_NINGUNO . "'\r\n";
//echo $sql;
$xTBL = new cTabla($sql);
$xTBL->setTdClassByType();
$xTBL->setFootSum(array(9 => "capital", 10 => "interes_normal", 11 => "interes_moratorio", 12 => "iva", 13 => "otros"));
echo $xTBL->Show();
echo getRawFooter();
echo $xHP->setBodyEnd();
?>
<script language="javascript">
<?php 
?>
function initComponents(){
	window.print();
}
</script>
<?php 
$xHP->end();
    }
    // avales
    if ($siavales == "yes") {
        $sqlavales = $xList->getListadoDeAvales($idsolicitud, $idsocio);
        $xTblAv = new cTabla($sqlavales);
        $xTblAv->Show("TR.Relacion de Avales presentados por la persona", false);
    }
    if ($sihistorial == "yes") {
        $xTblH = new cTabla($sqlDic->getListadoDeNotas($idsocio, $idsolicitud));
        $xTblH->Show("TR.Historial Moral del Socio", false);
    }
    if ($mod_del_conv == 3) {
        echo "<fieldset>\n\t\t\t<legend>[ Integrantes del Grupo Solidario ]</legend>";
        $sqltb = "SELECT\n\t\t\t\t`socios_general`.`codigo`,\n\t\t\t\tCONCAT(`socios_general`.`nombrecompleto`, ' ',\n\t\t\t\t`socios_general`.`apellidopaterno`, ' ',\n\t\t\t\t`socios_general`.`apellidomaterno`) AS 'nombre'\n\t\t\tFROM\n\t\t\t\t`socios_general` `socios_general`\n\t\t\tWHERE\n\t\t\t\t`socios_general`.`grupo_solidario`= {$grupo_assoc}\n\t\t\t\t/* Filtrar el Grupo Global */\n\t\t\t\tAND\n\t\t\t\t`socios_general`.`grupo_solidario`!= " . DEFAULT_GRUPO . "\n\t\t\t\t/* Excluir a la Representante */\n\t\t\t\tAND\n\t\t\t\t`socios_general`.`codigo` !={$idsocio}\n\t\t\tLIMIT 0,50";
        $cGrupo = new cTabla($sqltb);
        $xtbl = $cGrupo->Show();
        echo $xtbl;
        echo "</fieldset>";
    }
    echo "<hr /><table >\n\t<tr>\n\t<td><h4>PROTESTA DE VERDAD</h4></td>\n\t<td><center>Recibe la Solicitud</center></td>\n\t</tr>\n\t\n\t<tr>\n\t<td style=\"width: 50%;\">\n\t\t<p>Bajo protesta de decir la verdad, los firmantes manifiestan que los datos son ver&iacute;dicos\n\t\ty que las firmas que calzan este documento son las que usan en todos sus documentos\n\t\tp&uacute;blicos y privados, y que con su firma autorizan asimismo a MAE DEL GOLFO, S.A. DE C.V. SOFOM ENR para que traten los datos contenidos en este documento para cualquier fin comercial o de otra naturaleza que estimen conveniente.</p>\n\t\t<br />\n\t\t<br />\n\t</td>\n\t</tr>\n\t<tr>\n\t<td><center>{$mynom}\n\t<br />\n\tFecha en que Debe Presentarse:  ___/________/_____</center></td>\n\t\t<td><center>{$oficial}</center></td>\n\t</tr>\n\t</table>";
    ?>
<table      >
	<tbody>
		<tr>
			<td colspan="0">
			<fieldset>
				<legend>[&nbsp;&nbsp;DICTAMEN DEL COMIT&Eacute; DE CR&Eacute;DITO&nbsp;&nbsp;]</legend>
				<br />
				<hr />
				<br />
				<hr />
$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 != "") {
        echo "if(msrc == null){} else { msrc.{$OtherEvent};}";
    }
$fecha_inicial = parametro("on", $fecha_inicial);
$fecha_final = parametro("idfecha-1", false);
$fecha_final = parametro("off", $fecha_final);
echo $xHP->getHeader();
echo $xHP->setBodyinit("initComponents();");
$ByFecha = ($fecha_final == false or $fecha_inicial == false) ? "" : " AND\t(`empresas_operaciones`.`fecha_de_operacion` >='" . $xF->getFechaISO($fecha_inicial) . "') AND\t(`empresas_operaciones`.`fecha_de_operacion` <='" . $xF->getFechaISO($fecha_final) . "') ";
$ByPeriodo = $periodo == SYS_TODAS ? "" : "AND ( `periodo_marcado` = {$periodo}) ";
$xRPT = new cReportes();
echo $xRPT->getHInicial("TR.Estado de cuenta de Empresas", $fecha_inicial, $fecha_final);
//TODO: Acabar
$lt = new cSQLListas();
$sql = $lt->getListadoDeOperacionesDeEmpresas($empresa, $periocidad, $ByFecha . $ByPeriodo);
$xT = new cTabla($sql);
$xEmp = new cEmpresas($empresa);
echo $xEmp->getFicha();
$xT->getFieldsSum("monto");
$xT->setTdClassByType();
$xT->setFootSum(array(6 => "envios", 7 => "cobros"));
echo $xT->Show();
echo getRawFooter();
echo $xHP->setBodyEnd();
?>
<script>
<?php 
?>
function initComponents(){
	window.print();
}
</script>
<?php 
$xHP->end();
     if ($xCred->getSaldoActual() == $xCred->getMontoAutorizado() or $xCred->getEsAfectable() == false) {
         $arrUpdate["ultimo_periodo_afectado"] = SYS_CERO;
     }
     //Pagos de solo interes
     if ($xCred->getPagosSinCapital() == true) {
         $arrUpdate["ultimo_periodo_afectado"] = $ultima_parcialidad;
     }
     $xCred->setUpdate($arrUpdate);
     // -------------------------------------------- Actualiza el Saldo del Recibo
     $xCred->init();
     $xFRM->addHTML($xCred->getFicha(true, "", false, true));
     $xFRM->addHTML($xPlan->getFicha());
     $sqlparc = "SELECT periodo_socio AS 'parcialidad', MAX(fecha_afectacion) AS 'fecha_de_pago', SUM((afectacion_real * valor_afectacion)) AS 'total_parcialidad',\n\t\t\t\t\t MAX(saldo_anterior) AS 'saldo_anterior_', MIN(saldo_actual) AS 'saldo_actual_' FROM operaciones_mvtos\n\t\t\t\tWHERE recibo_afectado={$idrecibo} GROUP BY periodo_socio ORDER BY periodo_socio";
     $cTMvtos = new cTabla($sqlparc);
     $cTMvtos->setWidth();
     $xFRM->addHTML($cTMvtos->Show());
     $urctr = $xCred->getPathDelContrato();
     $urlsend = $DProducto->getPathPagare($solicitud);
     $xFRM->addAviso("Dias Totales: {$dias_netos} -- Vence: {$fecha_de_vencimiento}");
     $xFRM->addToolbar($xBtn->getBasic($xFRM->lang("imprimir", "plan de pagos"), "jsImprimirPlanPagos({$idrecibo})", "lista", "cm1", false));
     $xFRM->addToolbar($xBtn->getBasic($xFRM->lang("imprimir", "orden de desembolso"), "jsImprimirOrdenDesembolso()", "lista", "cm2", false));
     $xFRM->addToolbar($xBtn->getBasic($xFRM->lang(array("imprimir", "CONTRATO de", "credito")), "jsImprimirContrato()", "lista", "cm3", false));
     $xFRM->addToolbar($xBtn->getBasic($xFRM->lang("imprimir", "recibo"), "jsImprimirReciboDePrestamo()", "lista", "cm4", false));
     $xFRM->addToolbar($xBtn->getBasic($xFRM->lang("imprimir", "mandato"), "jsImprimirMandato()", "lista", "cm5", false));
     $xFRM->addToolbar($xBtn->getBasic($xFRM->lang("imprimir", "pagare"), "jsImprimirPagare()", "lista", "cm6", false));
     $xFRM->addHElem("<div class='tx4'><label for='idNoAvales'>No Mostrar Avales</label><input name=\"noAvales\" id=\"idNoAvales\" type=\"checkbox\" onchange=\"setNoAvales()\" /></div>");
 }
 //Graba los Mensages del LOG y cierra el Archivo
 $msg .= $xPlan->getMessages();
 $msg .= $msgM;
 $msg .= $msgC;
function jsaCumplimiento($idsocio)
{
    $xAl = new cAml_alerts();
    $xlistas = new cSQLListas();
    $sql = $xlistas->getListadoDeAlertas(false, false, false, $idsocio);
    $xT = new cTabla($sql);
    $xT->setKeyField($xAl->getKey());
    $xT->setKeyTable($xAl->get());
    return $xT->Show();
}
    $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>
    								<input type='button' name='cmd_edit' value='Editar Datos del Contrato' onClick='feditar_cuenta();'>
$input = $_GET["out"];
if (!$input) {
    $input = "default";
}
$setSql = " SELECT\n\t`oficiales`.`id` AS 'oficial',\n\t`oficiales`.`nombre_completo`,\n\t`oficiales`.`puesto`,\n\t`oficiales`.`sucursal`,\n\n\n\t`seguimiento_compromisos`.`socio_comprometido`,\n\t`socios`.`nombre`,\n\n\t`seguimiento_compromisos`.`credito_comprometido`,\n\t`seguimiento_compromisos`.`idseguimiento_compromisos` AS 'clave',\n\t`seguimiento_compromisos`.`fecha_vencimiento`,\n\t`seguimiento_compromisos`.`hora_vencimiento`,\n\t`seguimiento_compromisos`.`tipo_compromiso`,\n\t`seguimiento_compromisos`.`anotacion`,\n\t`seguimiento_compromisos`.`estatus_compromiso`\n\nFROM\n\t`seguimiento_compromisos` `seguimiento_compromisos`\n\t\tINNER JOIN `socios` `socios`\n\t\tON `seguimiento_compromisos`.`socio_comprometido` = `socios`.`codigo`\n\t\t\tINNER JOIN `oficiales` `oficiales`\n\t\t\tON `seguimiento_compromisos`.`oficial_de_seguimiento` = `oficiales`.\n\t\t\t`id`\nWHERE\n\t{$compFecha}\nORDER BY\n\t`oficiales`.`id`,\n\t`seguimiento_compromisos`.`fecha_vencimiento`,\n\t`seguimiento_compromisos`.`hora_vencimiento`,\n\t`seguimiento_compromisos`.`tipo_compromiso`";
//exit($setSql);
if ($input != OUT_EXCEL) {
    $oRpt = new PHPReportMaker();
    $oRpt->setDatabase(MY_DB_IN);
    $oRpt->setUser(RPT_USR_DB);
    $oRpt->setPassword(RPT_PWD_DB);
    $oRpt->setSQL($setSql);
    $oRpt->setXML("../repository/report72.xml");
    $oOut = $oRpt->createOutputPlugin($input);
    $oRpt->setOutputPlugin($oOut);
    $oRpt->run();
    //	*/
} else {
    $filename = $_SERVER['SCRIPT_NAME'];
    $filename = str_replace(".php", "", $filename);
    $filename = str_replace("rpt", "", $filename);
    $filename = str_replace("-", "", $filename);
    $filename = "{$filename}-" . date("YmdHi") . "-from-" . $iduser . ".xls";
    header("Content-type: application/x-msdownload");
    header("Content-Disposition: attachment; filename={$filename}");
    header("Pragma: no-cache");
    header("Expires: 0");
    $cTbl = new cTabla($setSql);
    $cTbl->setWidth();
    $cTbl->Show("", false);
}
$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);
$sql = "SELECT\r\n\t`tesoreria_tipos_de_pago`.`tipo_de_pago`,\r\n\t`tesoreria_tipos_de_pago`.`descripcion` \r\nFROM\r\n\t`tesoreria_tipos_de_pago` `tesoreria_tipos_de_pago`";
$titulo = "";
$archivo = "";
$xRPT = new cReportes($titulo);
$xRPT->setFile($archivo);
$xRPT->setOut($out);
$xRPT->setSQL($sql);
$xRPT->setTitle($xHP->getTitle());
//============ Reporte
$xT = new cTabla($sql, 0);
$xT->setTipoSalida($out);
$body = $xRPT->getEncabezado($xHP->getTitle(), $FechaInicial, $FechaFinal);
$xRPT->setBodyMail($body);
$xRPT->addContent($body);
//$xT->setEventKey("jsGoPanel");
//$xT->setKeyField("creditos_solicitud");
$xRPT->addContent($xT->Show($xHP->getTitle()));
//============ Agregar HTML
//$xRPT->addContent( $xHP->init($jsEvent) );
//$xRPT->addContent( $xHP->end() );
$xRPT->setResponse();
$xRPT->setSenders($senders);
echo $xRPT->render(true);
$xRPT->setFile($archivo);
$xRPT->setOut($out);
//$xRPT->setSQL($sql);
$xRPT->setTitle($xHP->getTitle());
//============ Reporte
$xSoc = new cSocio($persona);
$xSoc->init();
$body = $xRPT->getEncabezado($xHP->getTitle(), $FechaInicial, $FechaFinal);
$xRPT->setBodyMail($body);
$xRPT->addContent($body);
$xRPT->addContent($xSoc->getFicha(true));
//Bajo revision
$xAl = new cAml_alerts();
$xlistas = new cSQLListas();
$sql = $xlistas->getListadoDeAlertas(false, false, false, $persona, " AND `estado_en_sistema` =" . SYS_UNO);
$xT = new cTabla($sql);
$xRPT->addContent($xT->Show("TR.Alertas pendientes de verificar"));
//Descartados
$sql = $xlistas->getListadoDeAlertas(false, false, false, $persona, " AND `estado_en_sistema` =" . SYS_CERO);
$xT = new cTabla($sql);
$xRPT->addContent($xT->Show("TR.Alertas ignoradas"));
//Riesgos para reportar
$sql = $xlistas->getListadoDeRiesgosConfirmados(false, false, false, false, $persona, " AND `estado_de_envio`= " . SYS_CERO);
$xT = new cTabla($sql);
$xRPT->addContent($xT->Show("TR.Alertas pendientes de reportar"));
$sql = $xlistas->getListadoDeRiesgosConfirmados(false, false, false, false, $persona, " AND `estado_de_envio`= " . SYS_UNO);
$xT = new cTabla($sql);
$xRPT->addContent($xT->Show("TR.Alertas reportadas"));
$xRPT->setResponse();
$xRPT->setSenders($senders);
echo $xRPT->render(true);
</td>
			<td>Descripcion Corta</td><td><input disabled name='nombrecuenta' type='text' value='' size="40"></td>
		</tr>
	</table>
	<input type='button' name='btsend' value='ENVIAR DATOS'onClick='frmSubmit();'>
</form>
<?php 
$iddocto = $_POST["idcuenta"];
if (!$iddocto) {
    exit($msg_rec_warn . $fhtm);
}
$cCap = new cCuentaDeCaptacion($iddocto);
$cCap->init();
echo $cCap->getFicha(true);
$sqlmvto = "SELECT\n\t\t`operaciones_mvtos`.`idoperaciones_mvtos`   AS `codigo`,\n\t\t`operaciones_mvtos`.`fecha_operacion`       AS `operado`,\n\t\t`operaciones_mvtos`.`fecha_afectacion`      AS `afectado`,\n\t\t`operaciones_mvtos`.`recibo_afectado`       AS `recibo`,\n\t\t`operaciones_mvtos`.`tipo_operacion`        AS `operacion`,\n\t\t`operaciones_tipos`.`descripcion_operacion` AS `descripcion`,\n\t\t`operaciones_mvtos`.`afectacion_real`       AS `monto`,\n\t\t`operaciones_mvtos`.`docto_afectado`\n\tFROM\n\t\t`operaciones_mvtos` `operaciones_mvtos`\n\t\t\tINNER JOIN `operaciones_tipos` `operaciones_tipos`\n\t\t\tON `operaciones_mvtos`.`tipo_operacion` = `operaciones_tipos`.\n\t\t\t`idoperaciones_tipos`\n\tWHERE\n\t\t(`operaciones_mvtos`.`docto_afectado` ={$iddocto})\n\tORDER BY\n\t\t`operaciones_mvtos`.`fecha_operacion`\n\t";
$cEdit = new cTabla($sqlmvto);
$cEdit->addTool(1);
$cEdit->addTool(2);
$cEdit->setKeyField("idoperaciones_mvtos");
$cEdit->Show("", false);
?>
</fieldset>
</body>
<script   >
	<?php 
echo $cEdit->getJSActions();
?>

</script>
</html>
$xPage = new cHPage(HP_FORM, "Admitir Socios");
echo $xPage->getHeader();
?>
<body>
<fieldset>
	<legend>SOCIO(S) NO ADMITIDO(S)</legend>
<form name="frmAdmitir" action="frmadmitirsocios.php" method="post">


<?php 
$sqlSNA = "SELECT\n\t`socios_general`.`codigo`,\n\t`socios_general`.`nombrecompleto` AS 'nombre',\n\t`socios_general`.`apellidopaterno` AS 'apellido_paterno',\n\t`socios_general`.`apellidomaterno` AS 'apellido_materno',\n\t`socios_general`.`fechaentrevista` AS 'fecha_de_entrevista',\n\t`socios_general`.`sucursal` \nFROM\n\t`socios_general` `socios_general` \nWHERE\n\t(`socios_general`.`estatusactual` =99)\nORDER BY\n\t`socios_general`.`fechaentrevista` DESC\nLIMIT 0,20\t";
$tSoc = new cTabla($sqlSNA);
$tSoc->setWidth();
$tSoc->addEspTool("<input type=\"checkbox\"  id=\"chk" . STD_LITERAL_DIVISOR . "_REPLACE_ID_\" />");
$tSoc->setTdClassByType();
$tSoc->Show("", false);
?>
<input type="button" name="sendmme" value="GUARDAR AUTORIZACION" onClick="jsSetAdmision();" />
</form>
</fieldset>

</body>
<script language='javascript' src='../js/jsrsClient.js'></script>
<script  >

var Frm 					= document.frmAdmitir;
var jsrCommon				= "../js/general.common.js.php";
var divLiteral				= "<?php 
echo STD_LITERAL_DIVISOR;
?>
";
            $xHTabs->addTab("TR.Otros Datos", $xTbOD->Show());
            if ($xCred->getPeriocidadDePago() != CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) {
                $oFrm->addToolbar($xBtn->getBasic("TR.GENERAR PLAN_DE_PAGOS", "regenerarPlanDePagos()", "reporte", "generar-plan", false));
                $xHTabs->addTab("TR.Plan_De_pagos", $xCred->getPlanDePago(OUT_HTML, false, true));
            }
            if (MODO_DEBUG == true) {
                $xHTabs->addTab("TR.Sistema", $xCred->getMessages(OUT_HTML));
                $sql = $mSQL->getListadoDeOperaciones("", $idsolicitud);
                $cEdit = new cTabla($sql);
                $cEdit->addTool(SYS_UNO);
                $cEdit->addTool(SYS_DOS);
                $cEdit->setTdClassByType();
                $cEdit->setKeyField("idoperaciones_mvtos");
                $xHTabs->addTab("TR.Operaciones", $cEdit->Show());
                $cMovs = new cTabla($mSQL->getListadoDeSDPMCredito($idsolicitud));
                $xHTabs->addTab("TR.Historial", $cMovs->Show());
            }
            $oFrm->addHTML($xHTabs->get());
        }
        $oFrm->OButton("TR.Castigos", "jsCastigos({$idsolicitud})", "error");
        $pathContrato = $xCred->getPathDelContrato();
        $pathPagare = $xOPdto->getPathPagare($idsolicitud);
    }
    echo $oFrm->get();
    ?>
<script >
	var siAvales	= "si";
	var idCredito	= <?php 
    echo $idsolicitud;
    ?>
;
$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);
$xODat = new cPersonasCatalogoOtrosDatos();
$sql = "SELECT\r\n\t`socios`.`codigo`,\r\n\t`socios`.`nombre`,\r\n\t`socios_otros_parametros`.`clave_del_parametro` \r\nFROM\r\n\t`socios_otros_parametros` `socios_otros_parametros` \r\n\t\tINNER JOIN `socios` `socios` \r\n\t\tON `socios_otros_parametros`.`clave_de_persona` = `socios`.`codigo` \r\nWHERE\r\n\t(`socios_otros_parametros`.`clave_del_parametro` ='" . $xODat->AML_PEP_PRINCIPAL . "')\r\n\t\t\tOR\r\n\t(`socios_otros_parametros`.`clave_del_parametro` ='" . $xODat->AML_PEP_AFINIDAD . "')\t\t\t\r\n\tOR\r\n(`socios_otros_parametros`.`clave_del_parametro` ='" . $xODat->AML_PEP_CONSANGUINIDAD . "')\t\t\t\r\n\t\tOR\r\n(`socios_otros_parametros`.`clave_del_parametro` ='" . $xODat->AML_PEP_VINCULO_ECONOM . "')\t";
$titulo = "";
$archivo = "";
$xRPT = new cReportes($titulo);
$xRPT->setFile($archivo);
$xRPT->setOut($out);
$xRPT->setSQL($sql);
$xRPT->setTitle($xHP->getTitle());
//============ Reporte
$xT = new cTabla($sql, 1);
$xT->setTipoSalida($out);
$body = $xRPT->getEncabezado($xHP->getTitle(), $FechaInicial, $FechaFinal);
$xRPT->setBodyMail($body);
$xRPT->addContent($body);
//$xT->setEventKey("jsGoPanel");
//$xT->setKeyField("creditos_solicitud");
$xRPT->addContent($xT->Show());
//============ Agregar HTML
//$xRPT->addContent( $xHP->init($jsEvent) );
//$xRPT->addContent( $xHP->end() );
$xRPT->setResponse();
$xRPT->setSenders($senders);
echo $xRPT->render(true);
 function getResumenDeCaja()
 {
     $xF = new cFecha();
     $xSQL = new cSQLListas();
     $xTxt = new cHText();
     $xLn = new cLang();
     $xTbl = new cHTabla();
     $this->mSumaRecibos = 0;
     $this->mSumaCobros = 0;
     $resumen = "";
     $fecha_inicial = $this->mFecha;
     $fecha_final = $this->mFecha;
     $cajero = $this->mCajero;
     //==================================================================== TOTAL CORTE
     $resumen .= "<h3>" . $xLn->getT("TR.Resumen de caja") . "</h3>";
     $sqlTi = $xSQL->getListadoResumenTesoreria($cajero, $fecha_inicial, $fecha_final);
     $xT = new cTabla($sqlTi);
     $xT->setTdClassByType();
     $xT->setFootSum(array(2 => "operacion", 3 => "recibido", 4 => "cambio"));
     $resumen .= $xT->Show("TR.Resumen");
     $resumen .= "<input type='hidden' id='idsumacaja' value='" . $xT->getFieldsSum("recibido") . "' />";
     $resumen .= "<h3>" . $xLn->getT("TR.Efectivo") . "</h3>";
     //==================================================================== EFECTIVO
     $sqlTE = $xSQL->getListadoResumenOperaciones($fecha_inicial, $fecha_final, $cajero, TESORERIA_COBRO_EFECTIVO);
     $xTE = new cTabla($sqlTE);
     $xTE->setTdClassByType();
     $xTE->setFootSum(array(5 => "total"));
     $resumen .= $xTE->Show("TR.Cobros por Efectivo");
     $this->mSumaRecibos += $xTE->getFieldsSum("total");
     $resumen .= "<h3>" . $xLn->getT("TR.Documentos") . "</h3>";
     $sqlArq = "SELECT\r\n\t\t\t\t`tesoreria_caja_arqueos`.`fecha_de_arqueo`,\r\n\t\t\t\t`tesoreria_caja_arqueos`.`documento`,\r\n\t\t\t\t`tesoreria_caja_arqueos`.`monto_total_arqueado`,\r\n\t\t\t\t`tesoreria_caja_arqueos`.`observaciones` \r\n\t\t\tFROM\r\n\t\t\t\t`tesoreria_caja_arqueos` `tesoreria_caja_arqueos` \r\n\t\t\tWHERE\r\n\t\t\t\t(`tesoreria_caja_arqueos`.`codigo_de_caja` ='" . $this->getKey() . "')";
     $xTArq = new cTabla($sqlArq);
     $xTArq->setTdClassByType();
     $xTArq->setFootSum(array(2 => "monto_total_arqueado"));
     $resumen .= $xTArq->Show("TR.Arqueo");
     $this->mSumaCobros += $xTArq->getFieldsSum("monto_total_arqueado");
     //==================================================================== CHEQUES Y DOCUMENTOS
     $sqlLC = $xSQL->getListadoDeTesoreria($cajero, $fecha_inicial, $fecha_final, TESORERIA_COBRO_CHEQUE);
     $xT2 = new cTabla($sqlLC);
     $xT2->setTdClassByType();
     $xT2->setFootSum(array(5 => "operacion"));
     $resumen .= $xT2->Show("TR.Operaciones en Cheque");
     $this->mSumaCobros += $xT2->getFieldsSum("operacion");
     $sqlTD = $xSQL->getListadoResumenOperaciones($fecha_inicial, $fecha_final, $cajero, TESORERIA_COBRO_CHEQUE);
     $xTD = new cTabla($sqlTD);
     $xTD->setTdClassByType();
     $xTD->setFootSum(array(5 => "total"));
     $resumen .= $xTD->Show("TR.Cobros por Cheque");
     $this->mSumaRecibos += $xTD->getFieldsSum("total");
     $resumen .= "<h3>" . $xLn->getT("TR.Bancos") . "</h3>";
     //==================================================================== TRANFERENCIAS
     $sqlTO = $xSQL->getListadoDeCajaEnBanco(BANCOS_OPERACION_DEPOSITO, "", $cajero, $fecha_inicial, $fecha_final);
     $xT = new cTabla($sqlTO);
     $xT->setTdClassByType();
     $xT->setFootSum(array(4 => "monto"));
     $resumen .= $xT->Show("TR.Operaciones Bancarias");
     $this->mSumaCobros += $xT->getFieldsSum("monto");
     //-------------------------------------------
     $sqlT = $xSQL->getListadoResumenOperaciones($fecha_inicial, $fecha_final, $cajero, TESORERIA_COBRO_TRANSFERENCIA);
     $xT = new cTabla($sqlT);
     $xT->setTdClassByType();
     $xT->setFootSum(array(5 => "total"));
     $resumen .= $xT->Show("TR.Cobros por Transferencia");
     $this->mSumaRecibos += $xT->getFieldsSum("total");
     //====================================================================
     $xTbl->initRow();
     $xTbl->addTH("TR.Suma de Recibos");
     $xTbl->addTD(getFMoney($this->mSumaRecibos));
     $xTbl->endRow();
     $xTbl->initRow();
     $xTbl->addTH("TR.Suma de Cobranza");
     $xTbl->addTD(getFMoney($this->mSumaCobros));
     $xTbl->endRow();
     $resumen .= $xTbl->get();
     $resumen .= "<input type='hidden' id='idsumaoperaciones' value='" . $this->mSumaRecibos . "' />";
     $resumen .= "<input type='hidden' id='idsumacobros' value='" . $this->mSumaCobros . "' />";
     $this->mArqueoInit = true;
     return $resumen;
 }