function save_mvto($keymvto, $cuenta, $cargo, $abono, $referencia, $concepto, $mfecha, $form) { if (isset($cuenta) and ($cargo > 0 or $abono > 0)) { $dkeys = explode("@", $keymvto); $nejercicio = $dkeys[1]; $nperiodo = $dkeys[2]; $npoliza = $dkeys[3]; $ntipo = $dkeys[4]; $nmvto = $dkeys[5]; //Valores de los proximos Movimientos $ProxMCargo = 0; $ProxMAbono = 0; $tmvto = 1; $monto = 0; $fecha = getFechaUS($mfecha); //Conservar $diario = 999; $cuenta = getCuentaCompleta($cuenta); /** * verificar la Fecha */ $valFecha = validarFechaUS($fecha); if ($valFecha = false) { $fecha = $mfecha; $valFecha = validarFechaUS($mfecha); } if ($valFecha = false) { $fecha = fechasys(); } /** * Agrega el Movimiento * */ if ($cargo > 0) { $tmvto = TM_CARGO; $monto = $cargo; } else { $tmvto = TM_ABONO; $monto = $abono; } $ProxMAbono = $cargo; $ProxMCargo = $abono; //------------------------------------------------------------------------------------------------------- $sqldcta = "SELECT\n\t\t`contable_catalogo`.`numero`,\n\t\t(`contable_catalogotipos`.`naturaleza` * `contable_catalogotipos`.`naturaleza_del_sector`) AS 'factor'\n\tFROM\n\t\t`contable_catalogotipos` `contable_catalogotipos`\n\t\t\tINNER JOIN `contable_catalogo` `contable_catalogo`\n\t\t\tON `contable_catalogotipos`.\n\t\t\t`idcontable_catalogotipos` = `contable_catalogo`.\n\t\t\t`tipo`\n\tWHERE `contable_catalogo`.`numero`= {$cuenta} LIMIT 0,1"; $dcuenta = getFilas($sqldcta); //var_dump($dcuenta); $naturaleza = $dcuenta["factor"]; //variables de mensajes $afect1 = ""; $afect2 = ""; //1=CARGO //2=ABONO //3=SALDO setAfectarSaldo($cuenta, $nperiodo, $nejercicio, $naturaleza, $tmvto, $monto); $referencia = trim($referencia); $concepto = trim($concepto); //------------------------------------------------------------------------------------------------------- $sqli_mvto = "INSERT INTO contable_movimientos(ejercicio, periodo, tipopoliza, numeropoliza, numeromovimiento,\n\tnumerocuenta, tipomovimiento, referencia, importe, diario, moneda, concepto, fecha, cargo, abono)\n\t VALUES({$nejercicio}, {$nperiodo},\n\t {$ntipo}, {$npoliza},\n\t {$nmvto}, {$cuenta},\n\t '{$tmvto}', '{$referencia}',\n\t {$monto}, {$diario}, 1,\n\t '{$concepto}', '{$fecha}',\n\t {$cargo}, {$abono})"; my_query($sqli_mvto); $notes = ""; $nmvto = $nmvto + 1; $nk_mvto = "i@{$nejercicio}@{$nperiodo}@{$npoliza}@{$ntipo}@{$nmvto}"; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior('idkeymvto', $nk_mvto)); $tab->add(TabSetValue::getBehavior('idfecha', $fecha)); $tab->add(TabSetValue::getBehavior('idd_concepto', $concepto)); $tab->add(TabSetValue::getBehavior('idcuenta', $cuenta)); if (PREDICT_MOVIMIENTO == true) { $tab->add(TabSetValue::getBehavior('idcargo', $ProxMCargo)); $tab->add(TabSetValue::getBehavior('idabono', $ProxMAbono)); } if ($referencia != "") { $tab->add(TabSetValue::getBehavior('idreferencia', $referencia)); } if ($concepto != "") { $tab->add(TabSetValue::getBehavior('idconcepto', $concepto)); } $tab->add(TabSetValue::getBehavior('icontarrows', $nmvto)); return $tab->getString(); } // en if }
function jsaNewRecibo($observaciones, $cheque) { $fecha = fechasys(); setFoliosAlMaximo(); $xRec = setNuevorecibo(DEFAULT_SOCIO, DEFAULT_CREDITO, $fecha, 1, 200, $observaciones, $cheque, "foraneo", DEFAULT_RECIBO_FISCAL, DEFAULT_GRUPO); if (isset($_SESSION["recibo_en_proceso"])) { unset($_SESSION["recibo_en_proceso"]); unset($_SESSION["total_recibo_en_proceso"]); } $_SESSION["recibo_en_proceso"] = $xRec; $_SESSION["total_recibo_en_proceso"] = 0; }
function jsaGetCuotasDeDefuncion($socio) { $cuota_pagada = 0; $fecha_a_tolerar = restardias(fechasys(), DIAS_A_ROTAR_FONDO_DE_DEFUNCION); $cuota_a_pagar = 100; $sql = "SELECT SUM(afectacion_real) AS 'monto',\n\t\t\tMAX(fecha_operacion) AS 'fecha_pago'\n\t\t\tFROM operaciones_mvtos\n\t\t\tWHERE tipo_operacion=902\n\t\t\tAND socio_afectado={$socio}\n\t\t\tAND fecha_operacion>='{$fecha_a_tolerar}'\n\t\t"; $cuota_pagada = mifila($sql, "monto"); if ($cuota_pagada < 0) { $cuota_pagada = 0; } $cuota_a_pagar = $cuota_a_pagar - $cuota_pagada; //TODO: Terminar $tab = new TinyAjaxBehavior(); $tab->add(TabSetvalue::getBehavior('idmonto', $cuota_a_pagar)); return $tab->getString(); }
function Common_c8581154ac4e27cb0e122d71341dd7d8($strCmd) { $DPar = explode(STD_LITERAL_DIVISOR, $strCmd); $xTip = new cTipos(); // $socio = $xTip->cInt($DPar[0]); $cuenta = $xTip->cInt($DPar[1]); $deposito = $xTip->cFloat($DPar[2]); $retiro = $xTip->cFloat($DPar[3]); $nota = $xTip->cChar($DPar[4]); $numero = $xTip->cInt($DPar[5]); $limit = $xTip->cInt($DPar[6]); if (isset($_SESSION["recibo_en_proceso"])) { $recibo = $_SESSION["recibo_en_proceso"]; $fecha = fechasys(); $_SESSION["total_recibo_en_proceso"] += $deposito - $retiro; $xRec = new cReciboDeOperacion(200, false, $recibo); $xRec->setNumeroDeRecibo($recibo, true); $DRec = $xRec->getDatosInArray(); $cheque = $DRec["cheque_afectador"]; $tipopago = $DRec["tipo_pago"]; $recibofiscal = $DRec["recibo_fiscal"]; if ($deposito > 0 or $retiro > 0) { $xC = new cCuentaALaVista($cuenta); $grupo = DEFAULT_GRUPO; $xC->setSocioTitular($socio); $xC->setReciboDeOperacion($recibo); if ($deposito > 0) { $xC->setDeposito($deposito, $cheque, $tipopago, $recibofiscal, $nota, $grupo, $fecha, $recibo); } if ($retiro > 0) { $xC->setRetiro($retiro, $cheque, $tipopago, $recibofiscal, $nota, $grupo, $fecha, $recibo); } } if ($numero == $limit) { $xRec->setForceUpdateSaldos(); $xRec->setFinalizarRecibo(true); //$MsgEnd .= "**** proceso terminado ****"; } } //retorna el id del control de origen para neutralizar return "-{$numero}"; }
function setFechaVencimiento($fecha = false) { if ($fecha == false) { $fecha = fechasys(); } $this->mFechaDeVcto = $fecha; }
} /** *composicion del estado laboral por consulta **/ $estado_laboral = 99; //Obtener la informaci�n laboral $xSoc = new cSocio($socio); $xSoc->init($rw); $DLab = $xSoc->getDatosActividadEconomica(); $estado_laboral = $arrELaboral[$DLab["tipo_aeconomica"]]; //corrige valores vacios if (!isset($estado_laboral)) { $estado_laboral = 99; } //corrige la edad en a�os y asigna, si es menor de edad $edad = floor(restarfechas(fechasys(), $rw["fechanacimiento"]) / 365); if ($edad < 18) { $estado_laboral = "07"; } $tr .= "\t<tr>\n\t\t\t\t<td>{$socio}</td>\n\t\t\t\t<td>{$ife}</td>\n\t\t\t\t<td>{$nombre}</td>\n\t\t\t\t<td>{$apellidopaterno}</td>\n\t\t\t\t<td>{$apellidomaterno}</td>\n\t\t\t\t<td>{$genero}</td>\n\t\t\t\t<td>01</td>\n\t\t\t\t<td>412</td>\n\t\t\t\t<td>{$sucursal}</td>\n\t\t\t\t<td>{$fecha_de_alta}</td>\n\t\t\t\t<td>{$estado_civil}</td>\n\t\t\t\t<td>{$regimen_matrimonial}</td>\n\t\t\t\t<td>{$estado_laboral}</td>\n\t\t\t\t<td>{$fecha_nacimiento}</td>\n\t\t\t\t<td>412</td>\n\t\t\t\t<td>{$hijos}</td>\n\t\t\t\t<td> </td>\n\t\t\t\t<td>{$rfc}</td>\n\t\t\t\t<td>{$curp}</td>\n\t\t\t</tr>"; } echo "<table width='100%' >\n\t<tr>\n\t\t<th>Socio</th>\n\t\t<th>IFE</th>\n\t\t<th>Nombre</th>\n\t\t<th>Apellido Paterno</th>\n\t\t<th>Apellido Materno</th>\n\t\t<th>Sexo</th>\n\t\t<th>Idioma</th>\n\t\t<th>Nacionalidad</th>\n\t\t<th>Sucursal</th>\n\t\t<th>Fecha de Alta</th>\n\t\t<th>Estado Civil</th>\n\t\t<th>Regimen Matrimonial</th>\n\t\t<th>Estado Laboral</th>\n\t\t<th>Fecha de Nacimiento</th>\n\t\t<th>Pais de Nacimiento</th>\n\t\t<th>Numero de Hijos</th>\n\t\t<th>Fecha de Deceso</th>\n\t\t<th>R.F.C.</th>\n\t\t<th>C.U.R.P.</th>\n\t</tr>\n\t\t{$tr}\n</table>"; if ($input != OUT_EXCEL) { echo getRawFooter(); ?> </body> <script > <?php ?> function initComponents(){ window.print();
} $_SESSION["current_file"] = addslashes($theFile); //===================================================================================================== $xHP = new cHPage("REPORTE DE ", HP_REPORT); $xHP->setTitle($xHP->lang("catalogo de", "documentacion")); $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(){
$dias_vigente = restarfechas($f_ultimo_mvto, $f_vencimiento); $dias_vencidos = restarfechas($f_vencimiento, fechasys()); } else { $dias_vencidos = restarfechas($f_ultimo_mvto, fechasys()); } $interes = $capital * $dias_vigente * $tasan / EACP_DIAS_INTERES; $interes_moratorio = $capital * $dias_vencidos * ($tasan + $tasam) / EACP_DIAS_INTERES; // $total = $saldo + $interes + $interes_moratorio + $otros_cargos; //Obtiene el Telefono del Socio $sql_150 = "SELECT * FROM socios_vivienda WHERE socio_numero={$socio} AND principal='1'"; $ddomicilio = obten_filas($sql_150); $telefono1 = $ddomicilio[10]; $telefono2 = $ddomicilio[11]; $hora_default = date("H:i"); $fecha_default = fechasys(); $observaciones = "Generado el {$fecha_default} a las {$hora_default} Hrs. por {$oficial}"; if ($dias_vencidos > 1 && $dias_vencidos <= 15) { //Primera Notificacion $tnotif = "segunda_notificacion"; $idnant = 1; $idnnew = 2; $sql_hay = "SELECT COUNT('idseguimiento_notificaciones') AS 'siexiste' FROM seguimiento_notificaciones WHERE socio_notificado={$socio}\n\t\t\tAND numero_solicitud={$solicitud} AND numero_notificacion={$idnant}"; $exists = mifila($sql_hay, "siexiste"); //si existe llamada, dar seguimiento if ($exists > 0) { //Cancelar las Llamadas ya hechas, pero sin compromisos $sql_uproc = "UPDATE seguimiento_notificacion SET estatus_notificacion='vencido' WHERE socio_notificado={$socio}\n\t\t\tAND numero_solicitud={$solicitud} AND estatus_notificacion='efectuado' AND numero_notificacion={$idnant}"; $rsUc = mysql_query($sql_uproc); $afected_row = mysql_affected_rows($rsUc); @mysql_free_result($rsUc);
</head> <link href="<?php echo CSS_GENERAL_FILE; ?> " rel="stylesheet" type="text/css"> <script src="../js/jsrsClient.js"></script> <body> <fieldset> <legend>Linea de Credito Autorizada</legend> <?php $idsocio = $_POST["idsocio"]; $montolinea = $_POST["montolinea"]; $observaciones = $_POST["observaciones"]; $numerohipoteca = $_POST["numerohipoteca"]; $montohipoteca = $_POST["montohipoteca"]; $fechavenc = $_POST["elanno0"] . "-" . $_POST["elmes0"] . "-" . $_POST["eldia0"]; $fechaalta = fechasys(); $eacp = EACP_CLAVE; $sucursal = getSucursal(); $estado = 1; // VIGENTE $sqllcf = "numero_socio, monto_linea, observaciones, numerohipoteca, monto_hipoteca, \r\n\t\t\t\t\tfecha_de_vencimiento, fecha_de_alta, estado, idusuario, sucursal, eacp"; $sqllcv = "{$idsocio}, {$montolinea}, '{$observaciones}', '{$numerohipoteca}', {$montolinea}, \r\n\t\t\t\t'{$fechavenc}', '{$fechaalta}', {$estado}, {$iduser}, '{$sucursal}', '{$eacp}'"; $sqllc = "INSERT INTO creditos_lineas({$sqllcf}) VALUES ({$sqllcv})"; my_query($sqllc); echo "<p class='aviso'>la Linea de Credito ha Sido Agregada como Autorizada, de esta fecha en adelante, el Socio <b>" . getNombreSocio($idsocio) . "</b>\r\n\tsera tomado en cuenta para Ministrarse Creditos por un monto no mayor a {$montolinea}; por lo que se tendra que respetar dicha cantidad.</p> \r\n\t<input type='button' name='btnprint' value='IMPRIMIR AUTORIZACION'>\r\n\t"; ?> </fieldset> </body> </html>
function setDescartaAlerta($notas = "", $fecha = false) { $fecha = $fecha == false ? fechasys() : $fecha; $xF = new cFecha(); $fecha = $xF->getInt($fecha); $clave = $this->mCodigo; //Actualizar la alerta $sql = "UPDATE aml_alerts SET fecha_de_checking={$fecha}, estado_en_sistema=" . SYS_CERO . ", notas_de_checking=\"{$notas}\" WHERE clave_de_control={$clave}"; my_query($sql); $this->mMessages .= "WARN\tAlerta # {$clave} descartada\r\n"; }
$completePath = $prePath . $usrFiles[$i]['name']; if (file_exists($completePath) == true) { unlink($completePath); echo "<p class='aviso'> SE ELIMINO EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } if (move_uploaded_file($usrFiles[$i]['tmp_name'], $completePath)) { //echo "<p class='aviso'> SE GUARDO EXITOSAMENTE EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } else { //echo "<p class='aviso'> SE FALLO AL GUARDAR " . $usrFiles[$i]['name'] . "</p>"; } //analizar el Archivo $gestor = @fopen($completePath, "r"); $iReg = 0; $cT = new cTipos(); //inicializa el LOG del proceso $aliasFil = getSucursal() . "-carga-batch-de-inversiones-" . fechasys(); $xLog = new cFileLog($aliasFil, true); if ($gestor) { while (!feof($gestor)) { $bufer = fgets($gestor, 4096); //$bufer = stream_get_line($gestor, "\r\n"); if (!isset($bufer)) { $msg .= "{$iReg}\t\tERROR\tLa Linea({$iReg}) no se leyo({$bufer})\r\n"; } else { $bufer = trim($bufer); $datos = explode(",", $bufer, 6); $socio = $cT->cInt($datos[0]); $importe = $cT->cFloat($datos[1]); $fechaApertura = $cT->cFecha($datos[2]); $plazo = $cT->cInt($datos[3]); $tasa = $cT->cFloat($datos[4]);
function addValorArqueado($valor_arqueado, $numero_arqueado, $documento, $notas = "", $fecha = false, $hora = false) { //eliminar valor anterior $fecha = $fecha == false ? fechasys() : $fecha; $hora = $hora == false ? time() : $hora; $monto = $valor_arqueado * $numero_arqueado; $xArq = new cTesoreria_caja_arqueos(); $id = $xArq->query()->getLastID(); $xArq->codigo_de_arqueo($id); $xArq->codigo_de_caja($this->mClaveDecaja); $xArq->documento($documento); $xArq->eacp(EACP_CLAVE); $xArq->fecha_de_arqueo($fecha); $xArq->hora_de_arqueo($hora); $xArq->idusuario(getUsuarioActual()); $xArq->monto_total_arqueado($monto); $xArq->observaciones($notas); $xArq->sucursal(getSucursal()); $xArq->valor_arqueado($valor_arqueado); $xArq->numero_arqueado($numero_arqueado); $cmd = $xArq->query()->insert(); $cmd->save(); if (MODO_DEBUG == true) { setLog($cmd->getMessages()); } return $id; }
function setValidarCuentas($ForzarCorreccion = false) { $msg = ""; $msg .= "============== VALIDANDO CUENTAS DE CAPTACION\t==========\r\n"; $msg .= "============== FECHA: " . fechasys() . " ==========\r\n"; /** * Valida si la Cuenta de captacion por defecto existe * @since 2010-12-31 */ $xPCta = new cCuentaALaVista(CTA_GLOBAL_CORRIENTE, DEFAULT_SOCIO); if ($xPCta->setContarCuenta() == 0) { $msg .= "LA Cuenta por DEFECTO no EXISTE\r\n"; $xPCta->setNuevaCuenta(99, 1, DEFAULT_SOCIO, "", DEFAULT_CREDITO, "", "", DEFAULT_GRUPO, false, 10); $msg .= $xPCta->getMessages("txt"); } $xTb = new cSAFETabla(TCAPTACION_CUENTAS); $SqlCta = $xTb->getQueryInicial() . "\n\t\t\t\tFROM\n\t\t\t\t\t`captacion_cuentas` `captacion_cuentas`\n\t\t\t\t\t\tINNER JOIN `captacion_cuentastipos` `captacion_cuentastipos`\n\t\t\t\t\t\tON `captacion_cuentas`.`tipo_cuenta` = `captacion_cuentastipos`.\n\t\t\t\t\t\t`idcaptacion_cuentastipos`\n\t\t\t\t\t\t\tINNER JOIN `captacion_subproductos` `captacion_subproductos`\n\t\t\t\t\t\t\tON `captacion_cuentas`.`tipo_subproducto` = `captacion_subproductos`\n\t\t\t\t\t\t\t.`idcaptacion_subproductos` "; $rs = getRecordset($SqlCta); while ($rw = mysql_fetch_array($rs)) { $xCta = new cCuentaDeCaptacion($rw["numero_cuenta"], $rw["numero_socio"]); $xCta->init($rw); $msg .= $xCta->setValidar($ForzarCorreccion); //$msg .= $xCta->getMessages("txt"); } return $msg; }
} $_SESSION["current_file"] = addslashes($theFile); //<===== FIN_H //===================================================================================================== $xInit = new cHPage("", HP_SERVICE); $txt = ""; $ql = new MQL(); $lis = new cSQLListas(); $xF = new cFecha(); //$persona = parametro("persona", DEFAULT_SOCIO, MQL_INT); $credito = parametro("credito", DEFAULT_CREDITO, MQL_INT); $letra = parametro("letra", 0, MQL_INT); $monto = parametro("monto", 0, MQL_FLOAT); $fechaI = parametro("on", fechasys()); $fechaF = parametro("off", fechasys()); $fechaEnv = parametro("to", fechasys()); $observaciones = parametro("observaciones", ""); $empresa = parametro("empresa", false); $periodo = parametro("periodo", false); $periocidad = parametro("periocidad", false); $notas = parametro("notas", false); $rs = array(); $idnomina = parametro("nomina", false); $xEmp = new cEmpresas($empresa); $xEmp->init(); $msg = ""; if (setNoMenorQueCero($idnomina) <= 0) { $rs["error"] = true; $rs["message"] = "Nomina Invalida {$idnomina} "; } else { if (setNoMenorQueCero($credito) > 1) {
//$jxc ->drawJavaScript(false, true); ?> <body> <?php //Si la Operacion es Configurar los Datos if ($operation == "s") { ?> <form name="frmSetBackup" method="post" action="matriz.restore_backup.frm.php?o=e"> <fieldset> <legend>Restaurar Datos de Sucursales</legend> <table border='0' width='100%' > <tbody> <tr> <td>Fecha de Corte</td> <td><input type='text' name='cFechaCorte' value='<?php echo fechasys(); ?> ' id="idFechaCorte" /></td> </tr> <tr> <td>Sucursal</td> <td><?php $sql = "SELECT * FROM general_sucursales WHERE codigo_sucursal!='matriz'"; $cSel = new cSelect("cSucursal", "idSucursal", $sql); $cSel->setEsSql(); $cSel->show(false); ?> </td> <tr> <th colspan="2"><input type="submit" value="Iniciar las Restauracion" /></th> </tr>
$completePath = $prePath . $usrFiles[$i]['name']; if (file_exists($completePath) == true) { unlink($completePath); echo "<p class='aviso'> SE ELIMINO EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } if (move_uploaded_file($usrFiles[$i]['tmp_name'], $completePath)) { //echo "<p class='aviso'> SE GUARDO EXITOSAMENTE EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } else { //echo "<p class='aviso'> SE FALLO AL GUARDAR " . $usrFiles[$i]['name'] . "</p>"; } //analizar el Archivo $gestor = @fopen($completePath, "r"); $iReg = 0; $cT = new cTipos(); //inicializa el LOG del proceso $aliasFil = getSucursal() . "-analisis_de_saldos_cw-" . fechasys(); $xLog = new cFileLog($aliasFil, true); $msg = ""; //============================================================================================= if ($gestor) { while (!feof($gestor)) { $bufer = fgets($gestor, 4096); //$bufer = stream_get_line($gestor, "\r\n"); if (!isset($bufer)) { //$msg .= "$iReg\t\tERROR\tLa Linea($iReg) no se leyo($bufer)\r\n"; } else { $bufer = trim($bufer); $datos = explode(",", $bufer, 8); } $iReg++; }
?> <!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> <!-- --> <?php $socio_inicial = $_GET["on"]; $socio_final = $_GET["off"]; $frecuencia_pagos = $_GET["f1"]; $corte = fechasys(); $limiteletras = 2; $inicioletras = 1; if ($frecuencia_pagos == 7) { $inicioletras = 7; $limiteletras = 11; } elseif ($frecuencia_pagos == 15) { $inicioletras = 4; $limiteletras = 5; } elseif ($frecuencia_pagos == 30) { $inicioletras = 2; $limiteletras = 2; } else { $limiteletras = 1; } if (!$socio_inicial) {
//===================================================================================================== ini_set("max_execution_time", 600); $xHP = new cHPage("", HP_REPORT); $mql = new cSQLListas(); $xF = new cFecha(); $query = new MQL(); $xLoc = new cLocal(); $xLog = new cCoreLog(); $xCR = new cReporteCirculoDeCredito_tipo(); $ClaveOtorgante = $xCR->getClaveDeOtorgante(); $NombreOtorgante = $xCR->getNombreOtorgante(); $ByPersona1 = ""; $ByPersona2 = ""; $ByPersona3 = ""; $FechaInicial = isset($_GET["on"]) ? $_GET["on"] : FECHA_INICIO_OPERACIONES_SISTEMA; $FechaFinal = isset($_GET["off"]) ? $_GET["off"] : fechasys(); $toJson = false; //parametro("beauty", false, MQL_BOOL); $lineaJson = array(); $itemJson = array(); $FechaExtraccion = date("Ymd", strtotime($FechaFinal)); $estatus_actual = parametro("f2", false, MQL_INT); $persona = parametro("persona", DEFAULT_SOCIO, MQL_INT); $persona = parametro("socio", $persona, MQL_INT); $persona = parametro("idsocio", $persona, MQL_INT); if ($persona != DEFAULT_SOCIO) { $ByPersona2 = " AND\t(`creditos_solicitud`.`numero_socio` = {$persona}) "; $ByPersona1 = " AND (`creditos_abonos_parciales`.`socio_afectado` = {$persona} ) "; $ByPersona3 = " AND (`socio_afectado` = {$persona} ) "; $toJson = true; }
} $_SESSION["current_file"] = addslashes($theFile); //<===== FIN_H $iduser = $_SESSION["log_id"]; //===================================================================================================== $xHP = new cHPage("TR.Recibos de Cobranza", HP_REPORT); $xL = new cSQLListas(); $xF = new cFecha(); $empresa = isset($_GET["r"]) ? $_GET["r"] : 0; $periocidad = isset($_GET["p"]) ? $_GET["p"] : "todos"; $variacion = isset($_GET["v"]) ? $_GET["v"] : 0; $ByPeriodo = $periocidad == "todos" ? "" : " AND creditos_solicitud.periocidad_de_pago = {$periocidad} "; $periodo = isset($_GET["periodo"]) ? $_GET["periodo"] : 0; $out = parametro("out", OUT_HTML); $xRPT = new cReportes($xHP->getTitle()); $fecha_filtro = fechasys(); $ByMinistracion = ""; //$periodo = $periodo + $variacion; $fechaInicial = parametro("on", false); $fechaFinal = parametro("off", false); $fechaFinal = $xF->getFechaISO($fechaFinal); $fechaInicial = $xF->getFechaISO($fechaInicial); $idnomina = parametro("nomina", 0, MQL_INT); //$xHP->addJsFile("../js/jquery/jquery.js"); //$xHP->addJsFile("../js/general.js"); //$xHP->addJsFile("../js/jquery/jquery.qtip.min.js"); $xEmp = new cEmpresas($empresa); $xEmp->init(); $xTPer = new cPeriocidadDePago($periocidad); $xTPer->init(); //if($xEmp->getEsPeriodoCerrado($periocidad, $periodo) == false){ $xHP->goToPageError(20101); }
<body> <?php $socio_inicial = $_GET["on"]; $socio_final = $_GET["off"]; $sql_notificaciones = "SELECT * FROM seguimiento_notificaciones WHERE tipo_credito='planes'\n\tAND estatus_notificacion='pendiente' AND numero_notificacion<3"; $rs = mysql_query($sql_notificaciones); while ($rw = mysql_fetch_array($rs)) { $nombre = getNombreSocio($rw[1]); $domicilio = $rw[15]; if ($domicilio == '0') { $domicilio = "NO EXISTE DOMICILIO DEFINIDO. CAPTURELO O EDITELO"; } //Datos del Credito $sql_cred = "SELECT * FROM creditos_solicitud WHERE numero_solicitud={$rw['2']} AND numero_socio={$rw['1']} LIMIT 0,1"; $dsol = obten_filas($sql_cred); $dias_venc = restarfechas(fechasys(), $dsol[15]); $interes = getFMoney($rw[9]); $moratorio = getFMoney($rw[10]); $otros_cargos = getFMoney($rw[11]); $capital = getFMoney($rw[8]); $total = getFMoney($rw[12]); echo getRawHeader(); ?> <p class='bigtitle'>NOTIFICACION DE COBRO NUM. <?php echo $rw[3]; ?> </p> <br /> <div class='numc'> <table width="60%" > <tr>
include_once "../core/core.captacion.inc.php"; include_once "../core/core.riesgo.inc.php"; include_once "../core/core.seguimiento.inc.php"; include_once "../core/core.creditos.inc.php"; include_once "../core/core.creditos.utils.inc.php"; include_once "../core/core.operaciones.inc.php"; include_once "../core/core.common.inc.php"; include_once "../core/core.html.inc.php"; ini_set("display_errors", "off"); ini_set("max_execution_time", 1600); $key = isset($_GET["k"]) ? true : false; $parser = !isset($_GET["s"]) ? false : $_GET["s"]; //Obtiene la llave del //if ($key == MY_KEY) { $messages = ""; $fechaop = parametro("f", fechasys()); $xF = new cFecha(0, $fechaop); /** * Generar el Archivo HTMl del LOG * eventos-del-cierre + fecha_de_cierre + .html * */ $aliasFil = getSucursal() . "-eventos-al-cierre-de-colocacion-del-dia-{$fechaop}"; $xLog = new cFileLog($aliasFil); $ql = new MQL(); $xRec = new cReciboDeOperacion(12); $xRec->setGenerarPoliza(); $xRec->setForceUpdateSaldos(); $idrecibo = $xRec->setNuevoRecibo(DEFAULT_SOCIO, DEFAULT_CREDITO, $fechaop, 1, 12, "CIERRE_DE_COLOCACION_{$fechaop}", DEFAULT_CHEQUE, DEFAULT_TIPO_PAGO, DEFAULT_RECIBO_FISCAL, DEFAULT_GRUPO); $xRec->setNumeroDeRecibo($idrecibo); $messages .= "=======================================================================================\r\n";
$xL = new cSQLListas(); $xF = new cFecha(); $query = new MQL(); $estatus = parametro("estado", SYS_TODAS); $frecuencia = parametro("periocidad", SYS_TODAS); $producto = parametro("convenio", SYS_TODAS); $producto = parametro("producto", $producto); $empresa = parametro("empresa", SYS_TODAS); $sucursal = parametro("sucursal", SYS_TODAS, MQL_RAW); $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); $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);
echo $xHP->setBodyinit("javascript:window.print()"); echo getRawHeader(); $sqlDic = new cSQLListas(); $idsolicitud = isset($_GET["solicitud"]) ? $_GET["solicitud"] : DEFAULT_CREDITO; $entidad = EACP_NAME; if ($idsolicitud == DEFAULT_CREDITO) { echo JS_CLOSE; } else { $xCred = new cCredito($idsolicitud); $xCred->init(); $siavales = isset($_GET["avales"]) ? $_GET["avales"] : SYS_NINGUNO; $sigarantias = isset($_GET["garantias"]) ? $_GET["garantias"] : SYS_NINGUNO; $sipatrimonio = isset($_GET["patrimonio"]) ? $_GET["patrimonio"] : SYS_NINGUNO; $siflujo = isset($_GET["flujo"]) ? $_GET["flujo"] : SYS_NINGUNO; $sihistorial = isset($_GET["historial"]) ? $_GET["historial"] : SYS_NINGUNO; $nowdate = fechasys(); $rwc = $xCred->getDatosDeCredito(); $fecha_de_solicitud = $rwc["fecha_solicitud"]; // datos generales del socio $idsocio = $xCred->getClaveDePersona(); // Numero de Socio $xSocio = new cSocio($idsocio); $xSocio->init(); $mynom = $xSocio->getNombreCompleto(); $thisdom = $xSocio->getDomicilio(); $sqlconv = "SELECT * FROM creditos_tipoconvenio WHERE idcreditos_tipoconvenio =" . $xCred->getClaveDeConvenio(); $dconv = obten_filas($sqlconv); $convenio = $dconv["descripcion_tipoconvenio"]; $mod_del_conv = $dconv["tipo_de_integracion"]; ?> <!-- -->
$xHFrm->addHElem("<p class='aviso'>La {$miFecha}, El Mes Anterior==" . $xF->getFechaMesAnterior() . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, dos meses atras==" . $xF->getFechaMesAnterior(false, 2) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha} - 30 Dias==" . $xF->setRestarDias(30) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha} + 30 Dias==" . $xF->setSumarDias(30) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha} + 2 meses==" . $xF->setSumarMeses(2) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha} - 2 meses==" . $xF->setRestarMeses(2) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Nombre del Dia==" . $xF->getDayName() . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Dia Inicial del mes==" . $xF->getDiaInicial() . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Obtener Dia Habil==" . $xF->getDiaHabil() . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Dias desde el 31Dic2013==" . $xF->setRestarFechas($xF->get(), "2013-12-31") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Buscar Sabado(D6) para el dia de hoy==" . $xF->getDiaAbonoSemanal(6) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Buscar NOMBRE Sabado(D6) para el dia de hoy==" . $xF->getDayName($xF->getDiaAbonoSemanal(6)) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Fecha de Pago Decenal 1==" . $xF->getDiaAbonoDecenal(10, 20, 30, "2014-03-02") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Fecha de Pago Decenal 1==" . $xF->getDiaAbonoDecenal(10, 20, 30, "2014-03-11") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Fecha de Pago Decenal 1==" . $xF->getDiaAbonoDecenal(10, 20, 30, "2014-03-18") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Fecha de Pago Decenal 1==" . $xF->getDiaAbonoDecenal(10, 20, 30, "2014-03-20") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Fecha de Pago Decenal 1==" . $xF->getDiaAbonoDecenal(10, 20, 30, "2014-03-24") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Fecha de Pago Decenal 1==" . $xF->getDiaAbonoDecenal(10, 20, 30, "2014-03-29") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Fecha de Pago Decenal 1==" . $xF->getDiaAbonoDecenal(10, 20, 30, "2014-03-31") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Obtener dias Loborales en el mes==" . $xF->getDiasHabilesEnRango("2014-03-31", "2014-03-01") . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, Obtener entero del mes==" . $xF->getInt(fechasys()) . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, DIAS CORRIENTES DE MES" . $xF->getDiasCorrientesDeMes() . "</p>"); $xHFrm->addHElem("<p class='aviso'>La {$miFecha}, sumar 7 dias time stamp 84600==" . $xF->getFechaByInt($xF->getInt(fechasys()) + (7 + 1) * 84600) . "</p>"); $xHFrm->addHElem("<p class='aviso'>" . $xF->getMessages(OUT_HTML) . "</p>"); //$xHFrm->addHTML("<p>Esto es un parrafo de prueba</p>"); echo $xHFrm->get(); echo $xP->setBodyEnd(); echo $xP->end(); //===================================================================================================== ?>
header("location:../404.php?i=999"); } $_SESSION["current_file"] = addslashes($theFile); //<===== FIN_H $iduser = $_SESSION["log_id"]; //===================================================================================================== $xHP = new cHPage("TR.Depositos cuentas_de_inversion"); $xF = new cFecha(); $xT = new cTipos(); $iddocto = parametro("idcuenta", DEFAULT_CUENTA_CORRIENTE); $recibo = parametro("idrecibo"); $reciboIDE = 0; // $actload = ""; $Fecha = parametro("idfecha-0", false); $Fecha = $Fecha == false ? fechasys() : $xF->getFechaISO($Fecha); $idsocio = parametro("idsocio", false, MQL_INT); //$xT->cInt($_POST["idsocio"]); $detalles = parametro("idobservaciones", ""); $monto = parametro("idmonto", 0, MQL_FLOAT); $cheque = parametro("cheque", DEFAULT_CHEQUE); $comopago = parametro("ctipo_pago", DEFAULT_TIPO_PAGO, MQL_RAW); $folio_fiscal = parametro("foliofiscal", DEFAULT_RECIBO_FISCAL); $msg = parametro(SYS_MSG); $action = parametro("action", SYS_NINGUNO); $xCaja = new cCaja(); if ($xCaja->getEstatus() == TESORERIA_CAJA_CERRADA) { header("location:../404.php?i=200"); } if (isset($iddocto)) { $actload = " onload='jsImprimirRecibo();' ";
//===================================================================================================== include_once "../core/entidad.datos.php"; include_once "../core/core.deprecated.inc.php"; include_once "../core/core.fechas.inc.php"; include_once "../libs/sql.inc.php"; include_once "../reports/PHPReportMaker.php"; $oficial = elusuario($iduser); //===================================================================================================== /** * Filtrar si Existe Caja Local */ $estatus = isset($_GET["f2"]) ? $_GET["f2"] : SYS_TODAS; $frecuencia = isset($_GET["f1"]) ? $_GET["f1"] : SYS_TODAS; $convenio = isset($_GET["f3"]) ? $_GET["f3"] : SYS_TODAS; $fecha_inicial = isset($_GET["on"]) ? $_GET["on"] : EACP_FECHA_DE_CONSTITUCION; $fecha_final = isset($_GET["off"]) ? $_GET["off"] : fechasys(); $estatus = isset($_GET["estado"]) ? $_GET["estado"] : $estatus; $frecuencia = isset($_GET["periocidad"]) ? $_GET["periocidad"] : $frecuencia; $frecuencia = isset($_GET["frecuencia"]) ? $_GET["frecuencia"] : $frecuencia; $convenio = isset($_GET["convenio"]) ? $_GET["convenio"] : $convenio; $tipo_autorizacion = isset($_GET["tipoautorizacion"]) ? $_GET["tipoautorizacion"] : SYS_TODAS; $es_por_estatus = ""; //$si_es_por_fecha $es_por_frecuencia = ""; $es_por_convenio = ""; $es_por_operacion = ""; $sumSDO = 0; $sumCAP = 0; if ($estatus != SYS_TODAS) { //$nest = eltipo("creditos_estatus", $estatus); $es_por_estatus = " AND creditos_solicitud.estatus_actual={$estatus} ";
//--------------------------------------- DATOS DEL RECIBO ----------------------------------------------- // PERIODOS $percont = EACP_PER_CONTABLE; // Periodo Contable $percbza = EACP_PER_COBRANZA; // Periodo Cobranza. $perseg = EACP_PER_SEGUIMIENTO; // Periodo de Seguimiento. $permens = dnmes(); // Periodo de dias en el mes $persem = 0; // Periodo de dias en la semana. $peranual = $anno; // A?o Natural. // DATOS GENERALES $fechaop = fechasys(); // fecha de la Operacion y el recibo. $diasasoc = 0; // DIAS ASOCIADOS $tasaasoc = 0; // TASA ASOCIADA $fechaafect = $fechaop; // FECHA DE AFECTACION $prCad = ", '{$fechaop}', '{$fechaop}', {$idrecibo}, "; $sgCad = ", 0, 0, 0, '{$fechaop}', 40, '{$eacp_codigo_cnbv}', 0, {$percont}, {$percbza}, {$perseg}, {$permens}, {$persem}, {$peranual}, 0, "; $trCad = ", 1, 'Elaborado: {$oficial}',0, 0, {$idgrupo})"; $mCad = "', {$iduser}, "; //$trCad = ", 0, 0, $idgrupo)"; ?> </body> <script>
$completePath = $prePath . $usrFiles[$i]['name']; if (file_exists($completePath) == true) { unlink($completePath); echo "<p class='aviso'> SE ELIMINO EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } if (move_uploaded_file($usrFiles[$i]['tmp_name'], $completePath)) { //echo "<p class='aviso'> SE GUARDO EXITOSAMENTE EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } else { //echo "<p class='aviso'> SE FALLO AL GUARDAR " . $usrFiles[$i]['name'] . "</p>"; } //analizar el Archivo $gestor = @fopen($completePath, "r"); $iReg = 0; $cT = new cTipos(); //inicializa el LOG del proceso $aliasFil = getSucursal() . "-carga -batch-de-socios-" . fechasys(); $xLog = new cFileLog($aliasFil, true); if ($gestor) { while (!feof($gestor)) { $bufer = fgets($gestor, 4096); //$bufer = stream_get_line($gestor, "\r\n"); if (!isset($bufer)) { $msg .= "{$iReg}\t\tERROR\tLa Linea({$iReg}) no se leyo({$bufer})\r\n"; } else { $bufer = trim($bufer); $datos = explode(",", $bufer, 6); $socio = $cT->cInt($datos[0]); } $iReg++; } }
$completePath = $prePath . $usrFiles[$i]['name']; if (file_exists($completePath) == true) { unlink($completePath); echo "<p class='aviso'> SE ELIMINO EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } if (move_uploaded_file($usrFiles[$i]['tmp_name'], $completePath)) { //echo "<p class='aviso'> SE GUARDO EXITOSAMENTE EL ARCHIVO " . $usrFiles[$i]['name'] . "</p>"; } else { //echo "<p class='aviso'> SE FALLO AL GUARDAR " . $usrFiles[$i]['name'] . "</p>"; } //analizar el Archivo $gestor = @fopen($completePath, "r"); $iReg = 0; $cT = new cTipos(); //inicializa el LOG del proceso $aliasFil = getSucursal() . "-carga -batch-de-creditos-" . fechasys(); $xLog = new cFileLog($aliasFil, true); if ($gestor) { while (!feof($gestor)) { $bufer = fgets($gestor, 4096); //$bufer = stream_get_line($gestor, "\r\n"); if (!isset($bufer)) { $msg .= "{$iReg}\t\tERROR\tLa Linea({$iReg}) no se leyo({$bufer})\r\n"; } else { $bufer = trim($bufer); $datos = explode(",", $bufer, 12); $socio = $cT->cInt($datos[0]); $credito = $cT->cInt($datos[1]); $producto = $cT->cInt($datos[2]); $monto = $cT->cFloat($datos[3]); $ministracion = $cT->cFecha($datos[4]);
function add($tipo, $tipo_de_valuacion = false, $valor = 0, $persona_propietaria = false, $nombre_del_propietario = "", $fecha_de_adquisicion = false, $documento_presentado = "", $estado_fisico = false, $descripcion = "", $observaciones = "", $fecha_actual = false) { $fecha_actual = $fecha_actual == false ? fechasys() : $fecha_actual; $persona_propietaria = $persona_propietaria == false ? DEFAULT_SOCIO : $persona_propietaria; $tipo_de_valuacion = $tipo_de_valuacion == false ? FALLBACK_CRED_GARANTIAS_TVALUACION : $tipo_de_valuacion; $xGar = new cCreditos_garantias(); $xGar->idcreditos_garantias($xGar->query()->getLastID()); $xGar->descripcion($descripcion); $xGar->documento_presentado($documento_presentado); $xGar->eacp(EACP_CLAVE); $xGar->estado_presentado($estado_fisico); $xGar->estatus_actual(CREDITO_GARANTIA_ESTADO_PRESENTADO); $xGar->fecha_adquisicion($fecha_de_adquisicion); $xGar->fecha_devolucion($fecha_actual); $xGar->fecha_recibo($fecha_actual); $xGar->fecha_resguardo($fecha_actual); $xGar->idsocio_duenno($persona_propietaria); $xGar->idusuario(getUsuarioActual()); $xGar->observaciones($observaciones); $xGar->observaciones_del_resguardo(""); $xGar->propietario($nombre_del_propietario); $xGar->socio_garantia($this->mClavePersona); $xGar->solicitud_garantia($this->mClaveCredito); $xGar->sucursal(getSucursal()); $xGar->tipo_garantia($tipo); $xGar->tipo_valuacion($tipo_de_valuacion); $xGar->monto_valuado($valor); $q = $xGar->query()->insert(); $id = $q->save(); $this->mMessages .= $q->getMessages(OUT_TXT); return $id; }