$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);
$oficial = elusuario($iduser); /** */ $xF = new cFecha(); $estatus = isset($_GET["estado"]) ? $_GET["estado"] : SYS_TODAS; $frecuencia = isset($_GET["periocidad"]) ? $_GET["periocidad"] : SYS_TODAS; $convenio = isset($_GET["convenio"]) ? $_GET["convenio"] : SYS_TODAS; $empresa = isset($_GET["empresa"]) ? $_GET["empresa"] : SYS_TODAS; $out = isset($_GET["out"]) ? $_GET["out"] : SYS_DEFAULT; $fechaInicial = isset($_GET["on"]) ? $xF->getFechaISO($_GET["on"]) : FECHA_INICIO_OPERACIONES_SISTEMA; $fechaFinal = isset($_GET["off"]) ? $xF->getFechaISO($_GET["off"]) : fechasys(); echo $xHP->getHeader(); echo $xHP->setBodyinit("initComponents();"); echo getRawHeader(); $xRPT = new cReportes(); echo $xRPT->getEncabezado($xHP->getTitle()); $sql = "SELECT * FROM personas_documentacion_tipos"; $xTBL = new cTabla($sql); echo $xTBL->Show(); echo getRawFooter(); echo $xHP->setBodyEnd(); ?> <script> <?php ?> function initComponents(){ window.print(); } </script> <?php $xHP->end();
$mx = isset($_GET["mx"]) ? true : false; if ($mx == true) { $fechaInicial = isset($_GET["on"]) ? $xF->getFechaISO($_GET["on"]) : FECHA_INICIO_OPERACIONES_SISTEMA; $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(); }
$fecha_inicial = $xF->getFechaISO($fecha_inicial); } //http://localhost/rptotros/rpt_mvtos_x_tipo_segun_fechas.php //estado=todas //out=default //empresa=todas //convenio=todas //tipodepago=transferenci //usuario=todas $BySucursal = $sucursal == SYS_TODAS ? "" : " AND operaciones_mvtos.sucursal = '{$sucursal}' "; $xmlFile = "report73.nomina"; $ByPersona = $persona == SYS_NINGUNO ? "" : " AND operaciones_mvtos.socio_afectado={$persona} "; $ByOperacion = $operacion == SYS_TODAS ? "" : " AND `operaciones_mvtos`.`tipo_operacion` = {$operacion} "; $ByPago = $forma_de_pago == SYS_TODAS ? "" : " AND operaciones_recibos.tipo_pago ='{$forma_de_pago}' "; $tipo = $operacion; if ($ByOperacion != "") { $cMov = new cOperaciones_tipos(); $cMov->setData($cMov->query()->initByID($tipo)); $tipo = $cMov->descripcion_operacion()->v(); } $setSql = " SELECT\n\t\t\t\toperaciones_mvtos.sucursal,\n\t\t\t\toperaciones_recibos.tipo_pago \t\t\t\tAS 'tipo_de_pago',\n\t\t\t\toperaciones_mvtos.socio_afectado \t\t\tAS 'numero_de_socio',\n\t\t\t\t\n\t\t\t\t`socios`.`nombre` AS `nombre_completo`,\n\t\t\t\t`socios`.`alias_dependencia` AS `empresa`,\n\t\t\t\t\n\t\t\t\toperaciones_tipos.descripcion_operacion \tAS 'tipo_de_operacion',\n\t\t\t\toperaciones_mvtos.fecha_afectacion \t\t\tAS 'fecha',\n\t\t\t\t`operaciones_mvtos`.`idoperaciones_mvtos`\tAS `operacion`,\n\t\t\t\t`operaciones_mvtos`.`recibo_afectado` \tAS `recibo`,\n\t\t\t\t`operaciones_recibos`.`recibo_fiscal` \tAS `fiscal`,\n\t\t\t\toperaciones_mvtos.docto_afectado \t\t\tAS 'documento',\n\t\t\t\toperaciones_mvtos.afectacion_real\t\t\tAS 'monto',\n\t\t\t\toperaciones_mvtos.detalles \t\t\t\t\tAS 'observaciones'\n\t\t\t\tFROM\n\t\t\t\t`operaciones_mvtos` `operaciones_mvtos` \n\t\t\t\t\tINNER JOIN `operaciones_tipos` `operaciones_tipos` \n\t\t\t\t\tON `operaciones_mvtos`.`tipo_operacion` = `operaciones_tipos`.\n\t\t\t\t\t`idoperaciones_tipos` \n\t\t\t\t\t\tINNER JOIN `socios` `socios` \n\t\t\t\t\t\tON `socios`.`codigo` = `operaciones_mvtos`.`socio_afectado` \n\t\t\t\t\t\t\tINNER JOIN `operaciones_recibos` `operaciones_recibos` \n\t\t\t\t\t\t\tON `operaciones_mvtos`.`recibo_afectado` = `operaciones_recibos`\n\t\t\t\t\t\t\t.`idoperaciones_recibos`\n\t\t\t\t\t\t\n\t\t\t\tWHERE\n\t\t\t\toperaciones_mvtos.fecha_afectacion>='{$fecha_inicial}'\n\t\t\t\tAND\n\t\t\t\toperaciones_mvtos.fecha_afectacion<='{$fecha_final}'\n\t\t\t\t\t{$ByPersona}\n\t\t\t\t\t{$BySucursal}\n\t\t\t\t\t{$ByOperacion}\n\t\t\t\t\t{$ByPago}\n\t\t\tORDER BY\n\t\t\t\t`operaciones_mvtos`.`sucursal`,\n\t\t\t\t`operaciones_recibos`.`fecha_operacion`,\n\t\t\t\t`operaciones_recibos`.`idoperaciones_recibos`,\n\t\t\t\t`operaciones_mvtos`.`idoperaciones_mvtos` "; //exit($setSql); $xRPT = new cReportes("TR.Reporte de operaciones - {$tipo}"); $output = $output == SYS_DEFAULT ? OUT_RXML : $output; $xRPT->setOut($output); $xRPT->setSenders($senders); $body = $xRPT->getEncabezado("", $fecha_inicial, $fecha_final); $xRPT->setBodyMail($body); $xRPT->setFile($xmlFile); $xRPT->setSQL($setSql); $xRPT->render(true);
//Numero de Solicitud $id = !isset($_GET["pa"]) ? false : $_GET["pa"]; //Numero de Socio $f15 = !isset($_GET["f15"]) ? false : $_GET["f15"]; $f14 = !isset($_GET["f14"]) ? false : $_GET["f14"]; $f16 = !isset($_GET["f16"]) ? false : $_GET["f16"]; $f18 = !isset($_GET["f18"]) ? false : $_GET["f18"]; //Mostrar Movimiento Especifico $TOperacion = !isset($_GET["f19"]) ? false : $_GET["f19"]; //Codigo de Tipo de Operacion.- Mvto Especifico $fecha_inicial = $_GET["on"]; $fecha_final = $_GET["off"]; $xHP->init("initComponents()"); $xRPT = new cReportes($xHP->getTitle()); echo $xHP->getEncabezado(); echo $xRPT->getEncabezado(); $cCred = new cCredito($idsolicitud); $cCred->init(); //TODO: Modificar echo $cCred->getFicha(true, "", true, true); $sql = "SELECT\n\t`creditos_sdpm_historico`.`idcreditos_sdpm_historico` AS `control`,\n\t`creditos_sdpm_historico`.`numero_de_socio`,\n\t`creditos_sdpm_historico`.`numero_de_credito`,\n\t`creditos_sdpm_historico`.`fecha_anterior`,\n\t`creditos_sdpm_historico`.`fecha_actual`,\n\t`creditos_sdpm_historico`.`dias_transcurridos`,\n\t`creditos_sdpm_historico`.`monto_calculado`,\n\t`creditos_sdpm_historico`.`saldo`,\n\t`creditos_sdpm_historico`.`estatus`,\n\t`creditos_sdpm_historico`.`interes_normal`\nFROM\n\t`creditos_sdpm_historico` `creditos_sdpm_historico` \nWHERE\n\t(`creditos_sdpm_historico`.`numero_de_credito` ={$idsolicitud})\nORDER BY\n\t`creditos_sdpm_historico`.`fecha_anterior` ASC\n\t/*`creditos_sdpm_historico`.`fecha_actual` DESC */"; $cTbl = new cTabla($sql); $cTbl->setTdClassByType(); $cTbl->setWidth(); $cTbl->Show("", false); $TSum = $cTbl->getFieldsSum(); echo " <table width='100%'>\n\t\t<tr>\n\t\t<td />\n\t\t<td />\n\t\t<td />\n\t\t<td />\n\t\t\n\t\t<th class='mny'>" . getFMoney($TSum["dias_transcurridos"]) . "</th>\n\t\t<th class='mny'>" . getFMoney($TSum["monto_calculado"]) . "</th>\n\t\t<th class='mny'>" . getFMoney($TSum["saldo"]) . "</th>\n\t\t<td />\n\t\t<th class='mny'>" . getFMoney($TSum["interes_normal"]) . "</th>\n\t\t</tr>\n\t\t</table "; echo $xHP->getPieDePagina(); ?> </body> <script >
$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); $sucursal = parametro("s", SYS_TODAS); $si_es_por_fecha = ""; $graficos = parametro("graficos", false, MQL_BOOL); $BySuc = $sucursal == SYS_TODAS ? "" : " AND `creditos_solicitud`.`sucursal`= '{$sucursal}'"; $si_es_por_fecha = " AND fecha_ministracion>='{$FechaInicial}' AND fecha_ministracion<='{$FechaFinal}' "; $xF->set($FechaFinal); $ejercicio = $xF->anno(); my_query("SET @ejercicio:={$ejercicio};"); $sql = "\nSELECT\n\t`creditos_tipoconvenio`.`descripcion_tipoconvenio` AS `convenio`,\n\tCOUNT(`creditos_saldo_mensuales`.`numero_solicitud`) AS `creditos`,\n\tSUM(`creditos_saldo_mensuales`.`enero`) AS `enero`,\n\tSUM(`creditos_saldo_mensuales`.`febrero`) AS `febrero`,\n\tSUM(`creditos_saldo_mensuales`.`marzo`) AS `marzo`,\n\tSUM(`creditos_saldo_mensuales`.`abril`) AS `abril`,\n\tSUM(`creditos_saldo_mensuales`.`mayo`) AS `mayo`,\n\tSUM(`creditos_saldo_mensuales`.`junio`) AS `junio`,\n\tSUM(`creditos_saldo_mensuales`.`julio`) AS `julio`,\n\tSUM(`creditos_saldo_mensuales`.`agosto`) AS `agosto`,\n\tSUM(`creditos_saldo_mensuales`.`septiembre`) AS `septiembre`,\n\tSUM(`creditos_saldo_mensuales`.`octubre`) AS `octubre`,\n\tSUM(`creditos_saldo_mensuales`.`noviembre`) AS `noviembre`,\n\tSUM(`creditos_saldo_mensuales`.`diciembre`) AS `diciembre` \n\t\t\nFROM\n\t`creditos_saldo_mensuales` `creditos_saldo_mensuales` \n\t\tINNER JOIN `creditos_tipoconvenio` `creditos_tipoconvenio` \n\t\tON `creditos_saldo_mensuales`.`tipo_convenio` = `creditos_tipoconvenio`.\n\t\t`idcreditos_tipoconvenio`\n\tGROUP BY\n\t\t\n\t\t`creditos_saldo_mensuales`.`tipo_convenio`\n\t\t "; $xT = new cTabla($sql); $xT->setFootSum(array(1 => "creditos", 2 => "enero", 3 => "febrero", 4 => "marzo", 5 => "abril", 6 => "mayo", 7 => "junio", 8 => "julio", 9 => "agosto", 10 => "septiembre", 11 => "octubre", 12 => "noviembre", 13 => "diciembre")); $xRPT->setOut($out); $xRPT->addContent($xRPT->getEncabezado($xHP->getTitle(), $FechaInicial, $FechaFinal)); $xRPT->setSQL($sql); $xT->setTipoSalida($out); $xRPT->addContent($xT->Show()); //$xRPT->addContent("<script>setTimeout('mychart',1500); function mychart() { $('#sqltable').visualize({type: 'bar', width: '450px'}).appendTo('body'); }</script>"); echo $xRPT->render(true);
$FechaFinal = parametro("off", false); $FechaFinal = parametro("fecha-1", $FechaFinal); $FechaFinal = $FechaFinal == false ? fechasys() : $xF->getFechaISO($FechaFinal); $jsEvent = $out != OUT_EXCEL ? "initComponents()" : ""; $senders = getEmails($_REQUEST); $xEmp = new cEmpresas($empresa); $xEmp->init(); $nombre_empresa = $xEmp->getNombre(); $sql = $xL->getListadoDeIncidenciasAhorro($empresa); $titulo = ""; $archivo = ""; $xRPT = new cReportes($titulo); $xRPT->setFile($archivo); $xRPT->setOut($out); $xRPT->setSQL($sql); //$xRPT->setTitle($nombre_empresa. "-". $xHP->getTitle()); //============ Reporte $xT = new cTabla($sql, 2); $xT->setTipoSalida($out); $body = $xRPT->getEncabezado($nombre_empresa . "<br/>" . $xHP->getTitle()); $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);
$tipo_operacion = parametro("f711", SYS_TODAS, MQL_INT); $tipo_operacion = parametro("operacion", $tipo_operacion, MQL_INT); $out = parametro("out", SYS_DEFAULT); $def_type = 110; $sql = "SELECT creditos.convenio AS 'tipo', \n\t\t\tCOUNT(operaciones_mvtos.idoperaciones_mvtos) AS 'numero',\n\n\t\t\t\n\t\t\tSUM(operaciones_mvtos.afectacion_real) AS 'monto',\n\n\t\t\t/*SUM(creditos.monto_autorizado) AS 'monto_original',*/\n\t\t\t(SUM(operaciones_mvtos.afectacion_real) - SUM(creditos.saldo_actual)) AS 'cobros',\n\t\t\tSUM(creditos.saldo_actual) AS 'saldo_de_credito'\n\t\t\t \nFROM\n\t`operaciones_mvtos` `operaciones_mvtos` \n\t\tINNER JOIN `operaciones_recibos` `operaciones_recibos` \n\t\tON `operaciones_mvtos`.`recibo_afectado` = `operaciones_recibos`.\n\t\t`idoperaciones_recibos` \n\t\t\tINNER JOIN `creditos` `creditos` \n\t\t\tON `operaciones_mvtos`.`docto_afectado` = `creditos`.`solicitud` \nWHERE\n\t(`operaciones_recibos`.`tipo_pago` !='" . TESORERIA_COBRO_NINGUNO . "')\n\tAND (operaciones_mvtos.tipo_operacion={$def_type})\n\t{$BySuc}\n\t{$si_es_por_fecha}\nGROUP BY creditos.convenio"; $xHP->setTitle("TR.Reporte de Colocacion"); $titulo = $xHP->getTitle(); $archivo = "{$titulo}.pdf"; $xRPT = new cReportes($titulo); $xRPT->setFile($archivo); $xRPT->setOut($out); $xRPT->setSQL($sql); $xRPT->setTitle($xHP->getTitle()); //============ Reporte $xT = new cTabla($sql, 2); $xT->setTipoSalida($out); $xT->setFootSum(array(1 => "numero", 2 => "monto", 3 => "cobros", 4 => "saldo_de_credito")); $body = $xRPT->getEncabezado($xHP->getTitle(), $fecha_inicial, $fecha_final); $xRPT->setBodyMail($body); $xRPT->addContent($body); $xRPT->addContent("<h1>" . $sucursal . "</h1>"); //$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->addContent("<table>$TR_parent</table>"); $xRPT->setResponse(); $xRPT->setSenders($senders); echo $xRPT->render(true);
$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 //$xRPT->addContent( $xHP->init($jsEvent) ); //$xRPT->addContent( $xHP->end() ); $xRPT->setTitle($xHP->getTitle()); $xRPT->setResponse(); $xRPT->setSenders($senders); echo $xRPT->render(true);
$xF = new cFecha(); $ql = new MQL(); $fecha_inicial = parametro("on", $xF->getDiaInicial(), MQL_DATE); $fecha_final = parametro("off", $xF->getDiaFinal(), MQL_DATE); $cuenta_inicial = parametro("for", 0, MQL_INT); $cuenta_final = parametro("to", 0, MQL_INT); $out = parametro("out", SYS_DEFAULT, MQL_RAW); //---------------- Valuar Tipo de Cuenta ---------------- $tipo_cuentas = parametro("tipo", SYS_TODAS, MQL_RAW); $nivel_cuentas = parametro("nivel", SYS_TODAS, MQL_RAW); $incluir_cuentas = parametro("estado", SYS_TODAS, MQL_RAW); $netoCargoRpt = 0; $netoAbonoRpt = 0; $ByCuentas = ""; $xRPT = new cReportes($xHP->getTitle()); $xRPT->addContent($xRPT->getEncabezado($xHP->getTitle(), $fecha_inicial, $fecha_final)); $InitRecords = parametro("init", 0, MQL_INT); $xRPT->setOut($out); //================================================================================================================= //$xRPT->setToPagination($InitRecords); /** * Paginacion * I.- Parte */ $rowLimit = 900; //4Paginas aprox //marca el Final de los Registros $EndRecords = $InitRecords + $rowLimit; //================================================================================================================= /** * Obtiene Parametros a traves de un GET