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; }
if (!$idrecibo) { exit($msg_rec_warn . $fhtm); } $xRec = new cReciboDeOperacion(false, false, $idrecibo); $xRec->init(); echo $xRec->getFicha(true, "", true); $uri = $xRec->getURI_Formato(); /* ----------------- DATOS --------------- */ // $numeroops = "SELECT COUNT(idoperaciones_mvtos) AS 'obtener' FROM operaciones_mvtos WHERE recibo_afectado=$idrecibo"; // $nopers = mifila($numeroops, "obtener"); $sqlmvto = "SELECT\n\t\t`operaciones_mvtos`.`idoperaciones_mvtos` AS `codigo`,\n\t\t`operaciones_mvtos`.`socio_afectado` AS `socio`,\n\t\t`operaciones_mvtos`.`docto_afectado` AS `documento`,\n\t\t`operaciones_mvtos`.`fecha_operacion` AS `operado`,\n\t\t`operaciones_mvtos`.`fecha_afectacion` AS `afectado`,\n\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\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`.`recibo_afectado` ={$idrecibo})\n\tORDER BY\n\t\t`operaciones_mvtos`.`fecha_operacion`,\n\t\t`operaciones_mvtos`.`socio_afectado`,\n\t\t`operaciones_mvtos`.`docto_afectado`\n\t"; $cEdit = new cTabla($sqlmvto); $cEdit->addTool(1); $cEdit->addTool(2); $cEdit->setKeyField("idoperaciones_mvtos"); $nopers = $cEdit->getRowCount(); $cEdit->Show("", false); echo "<form name='frmgoelim' action='clseliminarrecibos.php' method='POST'>\n\t<hr />\n\t<input type='hidden' name='idrecibo' value='{$idrecibo}'>\n\t<table border='0'>\n\n\t\t<tr>\n\t\t<th><input type='button' name='btsend' value='EDITAR RECIBO' onClick='actualizaRec({$idrecibo});'></th>\n\t\t<th><input type='button' name='btsend' value='ELIMINAR RECIBO Y OPERACIONES' onClick='frmgoelim.submit();'></th>\n\t\t<th><a class=\"button\" onclick=\"ImprimirRecibo();\" > Reimprimir Recibo </a></th>\n\t\t</tr>\n\t</table>\n\t<hr />\n\t</form>\n\t<p class='aviso'>Numero de Operaciones: {$nopers}</p>\n\t</fieldset>"; ?> </body> <script > <?php echo $cEdit->getJSActions(); ?> function actualizaRec(id) { url = "../utils/frm8db7028bdcdf054882ab54f644a9d36b.php?t=operaciones_recibos&f=idoperaciones_recibos=" + id; myurl = window.open(url); myurl.focus(); }
$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"); } //tabla de Cajas Locales. . " WHERE socios_cajalocal.idsocios_cajalocal=$rw[0]" $sqlSoc = "SELECT\n\t\t\t\t\t\t`socios_cajalocal`.*,\n\t\t\t\t\t\t`socios_region`.*,\n\t\t\t\t\t\t`socios_cajalocal`.`idsocios_cajalocal`\n\t\t\t\t\tFROM\n\t\t\t\t\t\t`socios_cajalocal` `socios_cajalocal`\n\t\t\t\t\t\t\tINNER JOIN `socios_region` `socios_region`\n\t\t\t\t\t\t\tON `socios_cajalocal`.`region` = `socios_region`.`idsocios_region`\n\t\t\t\t\t{$ByCL}\n\t\t\t\t\t"; $rs = mysql_query($sqlSoc, cnnGeneral()); while ($rw = mysql_fetch_array($rs)) { $cl = new cCajaLocal($rw["idsocios_cajalocal"]); $cl->init($rw); echo $cl->getFicha($fieldset); $cajalocal = $rw["idsocios_cajalocal"]; $sqlComplete = "SELECT SQL_CACHE\n\t\t\t\t\t\t\t\t\t`socios_general`.`codigo`,\n\n\t\t\t\t\t\t\t\t\t`socios_general`.`apellidopaterno` AS\n\t\t\t\t\t\t\t\t\t`apellido_paterno`,\n\t\t\t\t\t\t\t\t\t`socios_general`.`apellidomaterno` AS\n\t\t\t\t\t\t\t\t\t`apellido_materno`,\n\n\t\t\t\t\t\t\t\t\t`socios_general`.`nombrecompleto` AS `nombre`,\n\n\t\t\t\t\t\t\t\t\t`socios_general`.`curp`,\n\t\t\t\t\t\t\t\t\t`socios_genero`.`descripcion_genero` AS `genero`,\n\t\t\t\t\t\t\t\t\t`socios_aeconomica_dependencias`.`descripcion_dependencia` AS `dependencia`,\n\t\t\t\t\t\t\t\t\t`socios_estatus`.`nombre_estatus` AS `estatus`,\n\t\t\t\t\t\t\t\t\t`socios_estadocivil`.`descripcion_estadocivil` AS `estado_civil`\n\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\t\t`socios_grupossolidarios`.`nombre_gruposolidario` AS\n\t\t\t\t\t\t\t\t\t`grupo_solidario`\n\n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t`socios_general` `socios_general`\n\t\t\t\t\t\t\t\t\t\tLEFT OUTER JOIN `socios_grupossolidarios` `socios_grupossolidarios`\n\t\t\t\t\t\t\t\t\t\tON `socios_general`.`grupo_solidario` = `socios_grupossolidarios`.\n\t\t\t\t\t\t\t\t\t\t`idsocios_grupossolidarios`\n\t\t\t\t\t\t\t\t\t\t\tLEFT OUTER JOIN `socios_genero` `socios_genero`\n\t\t\t\t\t\t\t\t\t\t\tON `socios_general`.`genero` = `socios_genero`.`idsocios_genero`\n\t\t\t\t\t\t\t\t\t\t\t\tLEFT OUTER JOIN `socios_estadocivil` `socios_estadocivil`\n\t\t\t\t\t\t\t\t\t\t\t\tON `socios_general`.`estadocivil` = `socios_estadocivil`.\n\t\t\t\t\t\t\t\t\t\t\t\t`idsocios_estadocivil`\n\t\t\t\t\t\t\t\t\t\t\t\t\tLEFT OUTER JOIN `socios_aeconomica_dependencias`\n\t\t\t\t\t\t\t\t\t\t\t\t\t`socios_aeconomica_dependencias`\n\t\t\t\t\t\t\t\t\t\t\t\t\tON `socios_general`.`dependencia` =\n\t\t\t\t\t\t\t\t\t\t\t\t\t`socios_aeconomica_dependencias`.\n\t\t\t\t\t\t\t\t\t\t\t\t\t`idsocios_aeconomica_dependencias`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tLEFT OUTER JOIN `socios_estatus` `socios_estatus`\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tON `socios_general`.`estatusactual` = `socios_estatus`.\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t`tipo_estatus`\n\t\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\t(`socios_general`.`cajalocal` = {$cajalocal} )\n\t\t\t\t\t\t\t\t\t\t{$ByEstatus}\n\t\t\t\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t\t\t\t`socios_general`.`cajalocal`,\n\t\t\t\t\t\t\t\t\t\t`socios_general`.`codigo`\n\t\t\t\t\t\t\t\t\t\t"; $ctbl = new cTabla($sqlComplete, 0); $ctbl->setTdClassByType(); $ctbl->Show("", false); //$sumSoc = $ctbl->getFieldsSum(); $regs = $ctbl->getRowCount(); echo "<table width='100%'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>CLAVE DE PERSONAS</th>\n\t\t\t\t\t\t<th>{$regs}</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n\t\t\t\t"; } if ($out != OUT_EXCEL) { echo getRawFooter(); ?> </body> </html> <?php }
$xFRM->OButton("TR.Generar Poliza", "jsaSetGenerarPolizaPorRecibo()", "poliza", "cmdGo4"); $xFRM->OButton("TR.Generar Pre-Poliza", "jsaRegenerarPrepoliza()", $xFRM->ic()->EJECUTAR); } $xFRM->addHTML($xRec->getFicha(true, "", true)); //echo ; $uri = $xRec->getURI_Formato(); $xTabs = new cHTabs(); /* ----------------- DATOS --------------- */ $cEdit = new cTabla($xSQL->getListadoDeOperaciones("", "", $idrecibo)); $cEdit->addTool(SYS_UNO); $cEdit->addTool(SYS_DOS); $cEdit->setEventKey("jsEditClick"); $cEdit->setTdClassByType(); $cEdit->setKeyField("idoperaciones_mvtos"); $xTabs->addTab("TR.OPERACIONES", $cEdit->Show()); $NumOpers = $cEdit->getRowCount(); $cBan = new cTabla($xSQL->getListadoDeOperacionesBancarias("", "", "", false, false, " AND `bancos_operaciones`.`recibo_relacionado` = {$idrecibo} ")); //$cBan->setEventKey("idcontrol"); $cBan->setKeyField("idcontrol"); $cBan->addTool(SYS_UNO); $cBan->addTool(SYS_DOS); $cBan->setFootSum(array(7 => "monto")); $xTabs->addTab("TR.BANCOS", $cBan->Show()); //Operaciones de Tesorería $cTes = new cTabla($xSQL->getListadoDeOperacionesDeTesoreria("", "", $idrecibo)); $cTes->addTool(SYS_UNO); $cTes->addTool(SYS_DOS); $xTabs->addTab("TR.TESORERIA", $cTes->Show()); //agregar contable if (getEsModuloMostrado(USUARIO_TIPO_CONTABLE) == true) { $xTbl = new cTabla("SELECT * FROM `contable_polizas_proforma` WHERE `numero_de_recibo`={$idrecibo}");