function getFicha($mark = true, $extraTool = "", $extendido = false, $ConPersona = false) { if ($this->mCreditoInicializado == false) { $this->initCredito(); } $lafila = $this->getDatosDeCredito(); $xL = new cLang(); $solicitud = $this->getNumeroDeCredito(); $convenio = $lafila["descripcion_tipoconvenio"]; $fministracion = $lafila["fecha_ministracion"]; $fvencimiento = $lafila["fecha_vencimiento"]; $periocidad_pago = $lafila["descripcion_periocidadpagos"]; $autorizado = getFMoney($lafila["monto_autorizado"]); $saldo = getFMoney($lafila["saldo_actual"]); $estatus = $lafila["descripcion_estatus"]; $tool = $extraTool; $tasa = getFMoney($lafila["tasa_interes"] * 100); $mora = $lafila["tasa_moratorio"] * 100; $pagos = $lafila["pagos_autorizados"]; $ultimopago = $lafila["ultimo_periodo_afectado"]; $cls = ""; $xD = new cFecha(0); $TasaIVA = $this->getTasaIVA(); $TasaMora = $this->getTasaDeMora(); $trInicial = ""; $cls = "credito-estado-" . $this->getEstadoActual(); $montoParc = getFMoney($this->mMontoFijoParcialidad); $activo = true; if ($ConPersona == true) { $xSoc = $this->getOPersona(); // new cSocio($this->getClaveDePersona(), true); $trInicial = "<tr><th>" . $xL->getT("TR.Persona") . "</th><td>" . $xSoc->getCodigo() . "</td><td colspan='2'>" . $xSoc->getNombreCompleto() . "</td></tr>"; } if ($this->getTipoEnSistema() == CREDITO_PRODUCTO_NOMINA) { if ($this->getClaveDeEmpresa() != DEFAULT_EMPRESA) { $xEmp = new cEmpresas($this->getClaveDeEmpresa()); $xEmp->init(); $convenio = "{$convenio} - " . $xEmp->getNombreCorto(); } else { $convenio = "{$convenio} - ND"; } } $tdSaldo = "<th class='izq'>" . $xL->getT("TR.Saldo Principal") . "</th><td class='mny'>{$saldo}</td>"; $tdMonto = "<th class='izq'>" . $xL->getT("TR.Monto Original") . "</th><td class='mny'>{$autorizado}</td>"; $tdFecha = "<th class='izq'>" . $xL->getT("TR.fecha de desembolso") . "</th><td>" . $xD->getFechaCorta($fministracion) . "</td>"; $tdPagos = $this->getPeriocidadDePago() != CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO ? "<td class='mny'>{$ultimopago} de {$pagos} POR \$ {$montoParc}</td>" : "<td class='izq'>UNICO</td>"; $tdVencimiento = "<th class='izq'>" . $xL->getT("TR.Fecha de Vencimiento") . "</th><td>" . $xD->getDayName($fvencimiento) . "; " . $xD->getFechaCorta($fvencimiento) . "</td>"; //Si el Estatus es AUTORIZADO if ($this->getEstadoActual() == CREDITO_ESTADO_AUTORIZADO) { $tdSaldo = ""; $tdFecha = "<th class='izq'>" . $xL->getT("TR.Fecha de Autorizacion") . "</th><td>" . $xD->getFechaCorta($this->getFechaDeAutorizacion()) . "</td>"; $activo = false; $tdPagos = "<td class='mny'>{$pagos}</td>"; } elseif ($this->getEstadoActual() == CREDITO_ESTADO_SOLICITADO) { $tdSaldo = ""; $tdMonto = "<th class='izq'>" . $xL->getT("TR.Monto Solicitado") . "</th><td class='mny'>" . getFMoney($this->getMontoSolicitado()) . "</td>"; $tdFecha = "<th class='izq'>" . $xL->getT("TR.Fecha de Solicitud") . "</th><td>" . $xD->getFechaCorta($this->getFechaDeMinistracion()) . "</td>"; $activo = false; $tdPagos = "<td class='mny'>{$pagos}</td>"; } if ($this->getPeriocidadDePago() != CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) { $fvencimiento = $this->getFechaDeMora(); $tdVencimiento = "<th class='izq'>" . $xL->getT("TR.Fecha de Vencimiento") . "</th><td>" . $xD->getDayName($fvencimiento) . "; " . $xD->getFechaCorta($fvencimiento) . "</td>"; } if ($extendido == true) { $xPP = new cCreditos_destinos(); $xPP->setData($xPP->query()->initByID($this->getClaveDeDestino())); $tdExigible = $activo == false ? "" : "<th class='izq'>" . $xL->getT("TR.Saldo exigible") . "</th><td class='mny'>" . getFMoney($this->getSaldoIntegrado(false, true)) . "</td>"; $oficial = $this->getOOficial()->getNombreCompleto(); $codigo_de_oficial = $this->getClaveDeOficialDeCredito(); $tool = "<tr>\n\t\t\t\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Tasa Anualizada de Moratorio") . "</th><td class='mny'>" . getFMoney($TasaMora * 100) . "%</td>\n\t\t\t\t\t\t\t\t{$tdExigible}</tr>\n\t\t\t\t\t<tr><th class='izq'>" . $xL->getT("TR.Destino del Credito") . "</th><td colspan='3'>" . $xPP->descripcion_destinos()->v() . ": " . $this->mDescripcionDestino . "</td></tr>\n\t\t\t\t\t<tr><th class='izq'>Oficial a Cargo</td><td class='notice' colspan='3'>{$oficial}</td></tr>" . $tool; if ($activo == true) { if ($this->getPeriocidadDePago() != CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) { $letra = $this->getPeriodoActual() + 1; $IntAct = $this->getInteresDevengado(fechasys(), $letra, false, true); } else { $IntAct = $this->getInteresDevengado(); } $IntDevNorm = $this->getInteresNormalDevengado(); $IntDevMor = $this->getInteresMoratorioDev(); $IntPerNor = $IntAct[SYS_INTERES_NORMAL]; $IntPerMor = $IntAct[SYS_INTERES_MORATORIO]; $IntPagMor = $this->getInteresMoratorioPagado(); $IntPagNor = $this->getInteresNormalPagado(); $TIntNorm = $IntDevNorm + $IntPerNor - $IntPagNor; $TIntMor = $IntDevMor + $IntPerMor - $IntPagMor; $BaseIVA = $TIntNorm > 0 ? $TIntNorm : 0; $BaseIVA += $TIntMor > 0 ? $TIntMor : 0; $IntIVA = setNoMenorQueCero(($TIntNorm + $TIntMor) * $TasaIVA); $cargos = $this->getCargosDeCobranza(); $cargosIVA = setNoMenorQueCero($cargos * TASA_IVA); $trCargos = ""; if ($cargos > 0) { $trCargos = "<tr>\n\t\t\t\t\t\t<td /><td />\n\t\t\t\t\t\t<th>" . $xL->getT("TR.Cargos por Cobranza") . "</th><td class='mny'>" . getFMoney($cargos) . "</td>\n\t\t\t\t\t</tr><tr>\n\t\t\t\t\t\t<td /><td />\n\t\t\t\t\t\t<th>" . $xL->getT("TR.IVA de Otros cargos") . "</th><td class='mny'>" . getFMoney($cargosIVA) . "</td>\n\t\t\t\t\t</tr>\t"; } $tool .= "<tr>\n\t\t\t\t\t\t<th>" . $xL->getT("TR.Interes Normal Generado") . "</th><td class='mny'>" . getFMoney($IntDevNorm) . "</td>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<th>" . $xL->getT("TR.Interes Moratorio Generado") . "</th><td class='mny'>" . getFMoney($IntDevMor) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>" . $xL->getT("TR.Interes Normal del Mes") . "</th><td class='mny'>" . getFMoney($IntPerNor) . "</td>\n\t\t\t\t\t\t<th>" . $xL->getT("TR.Interes Moratorio del mes") . "</th><td class='mny'>" . getFMoney($IntPerMor) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>" . $xL->getT("TR.Interes Normal Pagado") . "</th><td class='mny'>(" . getFMoney($IntPagNor) . ")</td>\n\t\t\t\t\t\t<th>" . $xL->getT("TR.Interes Moratorio Pagado") . "</th><td class='mny'>(" . getFMoney($IntPagMor) . ")</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>" . $xL->getT("TR.TOTAL INTERES NORMAL") . "</th><th class='mny'>" . getFMoney($TIntNorm) . "</th>\n\t\t\t\t\t\t<th>" . $xL->getT("TR.TOTAL INTERES MORATORIO") . "</th><th class='mny'>" . getFMoney($TIntMor) . "</th>\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td /><td />\n\t\t\t\t\t\t<th>" . $xL->getT("TR.SALDO DE CAPITAL") . "</th><td class='total, mny'>" . getFMoney($this->getSaldoActual()) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td /><td />\n\t\t\t\t\t\t<th>" . $xL->getT("TR.TOTAL INTERESES") . "</th><td class='mny'>" . getFMoney($TIntNorm + $TIntMor) . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td /><td />\n\t\t\t\t\t\t<th>" . $xL->getT("TR.IVA POR INTERESES") . "</th><td class='mny'>" . getFMoney($IntIVA) . "</td>\n\t\t\t\t\t</tr>\t\t\t\t\t\n\t\t\t\t\t\t\t\t{$trCargos}\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td /><td />\n\t\t\t\t\t\t<th>" . $xL->getT("TR.TOTAL POR PAGAR") . "</th><td class='total, mny'>" . getFMoney($TIntNorm + $TIntMor + $IntIVA + $this->getSaldoActual() + ($cargos + $cargosIVA)) . "</td>\n\t\t\t\t\t</tr>"; } $tool = "<tfoot>{$tool}</tfoot>"; } $exoFicha = "\n\t\t<table id='fichadecredito'>\n\t\t\t<tbody>\n\t\t\t\t{$trInicial}\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Numero de Credito") . "</th><td>{$solicitud}</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Producto") . "</th><td>{$convenio}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Periocidad de Pago") . "</th><td>{$periocidad_pago}</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Numero de Pagos") . "</th>{$tdPagos}\n\t\t\t\t<tr>\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Tasa Anualizada de interes") . "</th><td class='mny'>" . getFMoney($tasa) . "%</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Estado_actual") . "</th><td class='{$cls}'>{$estatus}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Tasa de IVA") . "</th><td class='mny'>" . getFMoney($TasaIVA * 100) . "%</td>\n\t\t\t\t\t<th class='izq'>CAT</th><td class='mny'>" . $this->getCAT() . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>{$tdFecha} {$tdVencimiento}</tr>\n\t\t\t\t<tr>{$tdMonto} {$tdSaldo}</tr>\n\t\t\t</tbody>\n\t\t\t{$tool}\n\t\t</table>"; if ($mark == true) { $exoFicha = "<fieldset><legend>| " . $xL->getT("TR.Informacion de Credito") . " |</legend>{$exoFicha}</fieldset>"; } return $exoFicha; }
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; }
/** * Funcion que Retorna una Ficha Descriptiva por el recibo * @param boolean $fieldset * @param string $trTool * @param string $wTable * @return string */ function getFicha($fieldset = false, $trTool = "", $extend = false) { $this->init(); $xLg = new cLang(); $personaAsoc = $this->getPersonaAsociada(); //$fichaEmpresa = ""; if ($this->mReciboIniciado == false) { $exoFicha = "<div class='error'>" . $xLg->get(MSG_NO_DATA) . "</div>"; } else { $xLg = new cLang(); $tool = $trTool; if ($extend == true) { $xUsr = new cSystemUser($this->getCodigoDeUsuario()); $xUsr->init(); $xSoc = new cSocio($this->getCodigoDeSocio()); $xSoc->init(); $tool .= "<tr><th class='izq'>" . $xLg->getT("TR.persona") . "</th>"; $tool .= "<td>" . $xSoc->getNombreCompleto() . "</td>"; $tool .= "<th class='izq'>" . $xLg->getT("TR.Documento") . "</th>"; $tool .= "<td>" . $this->getCodigoDeDocumento() . "</td>"; $tool .= "<tr><th class='izq'>" . $xLg->getT("TR.Elabora") . "</th>"; $tool .= "<td>" . $xUsr->getNombreCompleto() . "</td>"; if ($this->isDeEmpresa() == true) { $xEmp = new cEmpresas($personaAsoc); $xEmp->init(); $tool .= "<th class='izq'>" . $xLg->getT("TR.Empresa") . "</th>"; $tool .= "<td>" . $xEmp->getNombre() . "</td>"; } $tool .= "</tr>"; } if ($this->isDivisaExtranjera() == true) { $tool .= "<tr><th class='izq'>" . $xLg->getT("TR.Moneda") . "</th>"; $tool .= "<td>" . $this->getMoneda() . "</td>"; $tool .= "<th class='izq'>" . $xLg->getT("TR.Original") . "</th>"; $tool .= "<td>" . $this->getUnidadesOriginales() . "</td>"; $tool .= "</tr>"; } $xF = new cFecha(0); $exoFicha = "\n\t\t\t\t<table id=\"ficharecibo\">\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th class='izq'>Numero de Recibo</th>\n\t\t\t\t\t\t<td class='mny'>" . $this->mCodigoDeRecibo . "</td>\n\t\t\t\t\t\t<th class='izq'>Tipo de Recibo</th>\n\t\t\t\t\t\t<td>" . $this->mTipoDescripcion . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th class='izq'>Fecha de Recibo</th>\n\t\t\t\t\t\t<td>" . $xF->getFechaCorta($this->mFechaDeOperacion) . "</td>\n\t\t\t\t\t\t<th class='izq'>Recibo Fiscal</th>\n\t\t\t\t\t\t<td>" . $this->mReciboFiscal . "</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th class='izq'>Tipo de Pago</th>\n\t\t\t\t\t\t<td>" . strtoupper($this->mTipoDePago) . "</td>\n\t\t\t\t\t\t<th class='izq'>Total</th>\n\t\t\t\t\t\t<td>" . getFMoney($this->mTotalRecibo) . "</td>\n\n\t\t\t\t\t</tr>\n\n\t\t\t\t\t{$tool}\n\t\t\t\t</tbody>\n\t\t\t\t</table>"; if ($fieldset == true) { $exoFicha = "<fieldset>\n\t\t\t\t\t\t\t\t<legend> INFORMACIÓN DEL RECIBO </legend>\n\t\t\t\t\t\t\t\t{$exoFicha}\n\t\t\t\t\t\t\t</fieldset>"; } } return $exoFicha; }
$sc->setData($datos); $valor = $sc->codigo_sucursal()->v(); $nombre = $sc->nombre_sucursal()->v(); $txt .= "<option value=\"{$valor}\">{$nombre}</option>"; } $demohtml = "<div class='alert-box success'>\r\n\t\t\t\t<table>\r\n\t\t\t\t<caption>Demo Users</caption>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td>root</td><th>root</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>cumplimiento</td><th>cumplimiento</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>credito</td><th>credito</th>\r\n\t\t\t\t\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>cajero</td><th>cajero</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>contabilidad</td><th>contabilidad</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t</table>'"; //detect demo $allowed_hosts = array('demo.sipakal.com', 'localhost'); if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $allowed_hosts)) { //header($_SERVER['SERVER_PROTOCOL'].' 400 Bad Request'); //exit; $demohtml = ""; //$adsense = ""; } $msg = $msg == "" ? "" : "<div class='alert-box warning' id='idavisos'>{$msg}</div>"; echo "\r\n\r\n<form id=\"login\" name=\"frm{$funid}\" method=\"post\" action=\"clslogin.php\">\r\n\r\n {$msg}\r\n <fieldset id=\"inputs\">\r\n </h1><img src='images/logo.png' style='max-height:180px;' /></h1>\r\n <h3>" . EACP_NAME . "</h3>\r\n <input name=\"u{$funid}\" id=\"k{$funid}\" type=\"text\" placeholder=\"Usuario\" autofocus required> \r\n <input name=\"p{$funid}\" id=\"t{$funid}\" type=\"password\" required onblur='this.value = hex_md5(this.value);' placeholder=\"Password\" >\r\n <select id='idsucursal' name='idsucursal'>{$txt}</select>\r\n </fieldset>\r\n <fieldset id=\"actions\">\r\n <input type=\"submit\" id=\"submit\" value=\"" . $xLng->getT("TR.Iniciar") . "\">\r\n\r\n </fieldset>\r\n\r\n {$demohtml} \r\n</form>\r\n<div id=\"banner\">{$adsense}</div>"; if ($msg != "") { echo "<p class='aviso' id='idavisos'>{$msg}</p>"; } $jxc->drawJavaScript(false, true); //console.log("Inicio limpio!:" + window.location); //console.log("Inicio limpio!:" + self.location); ?> </body> <script> window.localStorage.clear(); function validar_nav() { var isGecko = true; var intIndex = navigator.userAgent.indexOf("Gecko/"); var mWin = String(top.location).indexOf("index");
function getFicha($fieldset = false, $trTool = "", $extendido = false) { $Dcta = $this->getDatosInArray(); $xF = new cFecha(); $xLi = new cSQLListas(); $xQL = new MQL(); $rw = $Dcta; $cuenta = $rw["numero_cuenta"]; $modalidad = $rw["tipo"]; $FApertura = getFechaMX($rw["fecha_apertura"]); $tasa = $rw["tasa_otorgada"]; $producto = $rw["subproducto"]; $saldo = $rw["saldo_cuenta"]; $mancomunantes = $this->mNombreMancomunados; $observaciones = $rw["observaciones"]; $tool = $trTool; $thead = ""; $xL = new cLang(); if ($extendido == true) { $xSoc = new cSocio($this->getClaveDePersona()); $xSoc->init(); $nombrepersona = $xSoc->getNombreCompleto(); $thead .= "<tr><th class='izq'>" . $xL->getT("TR.nombre completo") . "</th>"; $thead .= "<td colspan='3'>{$nombrepersona}</td><tr>"; } //eOperations = false; if (trim($mancomunantes) == "") { } else { $tool .= "<tr><th>" . $xL->getT("TR.Mancomunados") . "</th><td colspan='3'>{$mancomunantes}</td><tr>"; } //Obtener Mancomunantes /*$SQLMan = $xLi->getListadoDeRelaciones($this->getClaveDePersona(), $this->getNumeroDeCuenta(), PERSONAS_REL_MANCOMUNADO ); $rsMan = $xQL->getDataRecord($SQLMan); if($xQL->getNumberOfRows() > 0){ $tool .= "<tr><th colspan='4'>" . $xL->getT("TR.Mancomunados") . "</th><tr>"; foreach ($rsMan as $rowM){ //$idmanco = $tool .= "<tr>"; $tool .= "<td>"; $tool .= "</tr>"; } }*/ if ($this->mTipoDeCuenta == CAPTACION_TIPO_PLAZO) { $thead = $thead == "" ? "" : "<thead>{$thead}</thead>"; $exoFicha = "\n\t\t\t\t<table id='ficha-captacion'>\n\t\t\t\t\t{$thead}\n\t\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.clave_de_cuenta") . "</th>\n\t\t\t\t\t<td>" . $this->mNumeroCuenta . "</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Producto") . "</th>\n\t\t\t\t\t<td>" . $Dcta["subproducto"] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Fecha de Operacion") . "</th>\n\t\t\t\t\t<td>" . $xF->getFechaCorta($Dcta["apertura"]) . "</td>\n\t\t\t\t\t<th class='izq'>Fecha de Vencimiento</th>\n\t\t\t\t\t<td>" . $xF->getFechaCorta($Dcta["vencimiento"]) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.tasa actual") . "</th>\n\t\t\t\t\t<td class='mny'> % " . $Dcta["tasa"] * 100 . "</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.dias de Inversion") . "</th>\n\t\t\t\t\t<td class='mny'>" . $Dcta["dias"] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.saldo") . "</th><td class='mny'>" . getFMoney($Dcta["saldo"]) . "</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.observaciones") . "</th><td>" . $Dcta["observaciones"] . "</td>\n\t\t\t\t</tr>\n\t\t\t\t{$tool}\n\t\t\t\t</tbody>\n\t\t\t\t</table>"; } elseif ($this->mTipoDeCuenta == CAPTACION_TIPO_VISTA) { $thead = $thead == "" ? "" : "<thead>{$thead}</thead>"; $exoFicha = "\n\t\t\t\t<table id='ficha-captacion'>\n\t\t\t\t{$thead}\n\t\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.clave_de_cuenta") . "</th><td>{$cuenta}</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.Fecha de Registro") . "</th><td>" . $xF->getFechaCorta($FApertura) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.tipo") . "</th><td>{$modalidad}</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.producto") . "</th><td>{$producto}</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.tasa") . "</th><td class='mny'>% " . getFMoney($tasa * 100) . "</td>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.saldo") . "</th><td class='mny'>" . getFMoney($saldo) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>" . $xL->getT("TR.notas") . "</th><td colspan='3'>{$observaciones}</td>\n\t\t\t\t</tr>\n\t\t\t\t{$tool}\n\t\t\t\t</tbody>\n\t\t\t\t</table>"; } else { } if ($fieldset == true) { $exoFicha = "<fieldset>\n\t\t\t\t\t\t\t\t<legend> " . $xL->getT("TR.Ficha de datos") . " </legend>\n\t\t\t\t\t\t\t\t{$exoFicha}\n\t\t\t\t\t\t\t</fieldset>"; } return $exoFicha; }
/** * Funcion que retorna un HTML:SELECT con las horas del dia * * @param boolean $ret * se imprime o se retorna un valor * @return string del SELECT o se imprime con echo */ function getHours($ret = false, $titulo = "", $id = "") { $id = $id == "" ? "id-hours-" . $this->mIndex : $id; $name = $id == "" ? "cHours-" . $this->mIndex : $id; $options = ""; $xL = new cLang(); $titulo = $titulo == "" ? "" : $xL->getT($titulo); foreach ($this->mAHours as $key => $value) { $options .= "<option value=\"{$key}\">{$value}</option>"; } $cHours = "<select id=\"{$id}\" name=\"{$name}\" >\r\n\t\t{$options}\r\n\t\t</select>"; return $titulo == "" ? $cHours : "<div class=\"tx4\"><label for=\"{$id}\">{$titulo}</label>{$cHours}</div>"; }
$idx++; //Generar el Acuse if ($getPDF == true) { $id = $row["codigo"]; $tipo = $row["tipo"]; $app1 = $row["primerapellido"]; $app2 = $row["segundoapellido"]; $noms = $row["nombres"]; $flTitle = ""; //generar aka $xSoc = new cSocio($id); $xSoc->init(); $xTbl = new cHTabla(); $xTbl->initRow(); //score $xTbl->addTH($xLng->getT("TR.SDN Numero")); switch ($tipo) { case "soundlike": $flTitle = $xLng->getT("TR.Algoritmo") . " : SQL-SOUNDLIKE"; //$xTbl->addTH("Algoritmo"); //$xTbl->addTD("SOUNDLIKE"); $xTbl->addRaw("<td /><td />"); break; case "jarowinkler": $flTitle = $xLng->getT("TR.Algoritmo") . " : JARO-WINKLER"; $xTbl->addTH($xLng->getT("TR.Coincidencia")); $score1 = 0; $score2 = 0; $score3 = 0; if ($nombre != "") { $score1 = JaroWinkler($nombre, $noms);
function getListadoDeMovimientos($complementoTD = "") { $xL = new cLang(); $xQL = new cSQLListas(); $sql = $xQL->getListadoDeMovimientosContables($this->mCodigoDePoliza); $ql = new MQL(); $td = ""; $tcargos = 0; $tabonos = 0; $cnt = 1; $th = "<tr>\n\t\t <th class='movimiento'>#</th>\n\t\t <th class='cuenta'>" . $xL->getT("TR.Cuenta") . "</th>\n\t\t <th class='nombrecuenta'>" . $xL->getT("TR.Nombre") . "</th>\n\t\t <th class='cargos'>" . $xL->getT("TR.Cargos") . "</th>\n\t\t <th class='abonos'>" . $xL->getT("TR.Abonos") . "</th>\n\t\t <th class='referencia'>" . $xL->getT("TR.Referencia") . "</th>\n\t\t <th class='concepto'>" . $xL->getT("TR.Concepto") . "</th>\n \t\t</tr>"; $rs = $ql->getDataRecord($sql); foreach ($rs as $rows) { $operacion = $rows["operacion"]; $nid = $this->mCodigoDePoliza . $this->mDiv . $operacion; $cuenta = $rows["cuenta"]; $pid = str_replace(".", "_", $nid); $cnt = $cnt >= 2 ? 1 : $cnt + 1; $cls = $cnt == 2 ? " class='trOdd' " : ""; $td .= "<tr{$cls} id='{$pid}'><td>" . $rows["operacion"] . "</td>"; $td .= "<td>" . $cuenta . "</td>"; $td .= "<td class='nombrecuenta' onclick='var xC = new ContGen(); xC.goToPanel({$cuenta})'>" . $rows["nombre"] . "</td>"; if ($rows["tipo"] == TM_CARGO) { $tcargos += $rows["importe"]; $td .= "<td onclick='jsEditarMvto(\"{$nid}\")' class='mny'>" . getFMoney($rows["importe"]) . "</td><td />"; } else { $tabonos += $rows["importe"]; $td .= "<td /><td onclick='jsEditarMvto(\"{$nid}\")' class='mny'>" . getFMoney($rows["importe"]) . "</td>"; } $td .= "<td>" . $rows["referencia"] . "</td>"; $td .= "<td>" . $rows["concepto"] . "</td></tr>"; } $tf = "<tr>\n\t\t <td />\n\t\t <td />\n\t\t <th>" . $xL->getT("TR.Sumas") . "</th>\n\t\t <th><input type='text' disabled value='" . getFMoney($tcargos) . "' id='idsumacargos' class='mny' /></th>\n\t\t <th><input type='text' disabled value='" . getFMoney($tabonos) . "' id='idsumaabonos' class='mny' /></th>\n\t\t <td />\n\t\t <td />\n \t\t</tr>"; return "<table id='movimientocontables'><thead>{$th} {$complementoTD} </thead><tbody>{$td}</tbody><tfoot>{$tf}</tfoot></table>"; }
$tSdos += $sdo; @mysql_free_result($rs); //Imprime la Tabla de Mvtos if ($PieInts != SYS_NINGUNO) { $IntAct = $cFC->getInteresDevengado(); $IntDevNorm = $cFC->getInteresNormalDevengado(); $IntDevMor = $cFC->getInteresMoratorioDev(); $IntPerNom = $IntAct[SYS_INTERES_NORMAL]; $IntPerMor = $IntAct[SYS_INTERES_MORATORIO]; $ints = $IntDevMor + $IntDevNorm + $IntPerMor + $IntPerNom; $trs .= "<tr><td /><td /><td /><td class='ajustar'>INTS. NORMALES DEVENGADOS</td><td /><td class='mny'>" . getFMoney($IntDevNorm) . "</td><td /><td /><td class='mny' /><td class='ajustar' /></tr>"; $trs .= "<tr><td /><td /><td /><td class='ajustar'>INT. NORMAL DEL PERIODO</td><td /><td class='mny'>" . getFMoney($IntPerNom) . "</td><td /><td /><td class='mny' /><td class='ajustar' /></tr>"; $trs .= "<tr><td /><td /><td /><td class='ajustar'>INTS. MORATORIO DEVENGADOS</td><td /><td class='mny'>" . getFMoney($IntDevMor) . "</td><td /><td /><td class='mny' /><td class='ajustar' /></tr>"; $trs .= "<tr><td /><td /><td /><td class='ajustar'>INT. MORATORIO DEL PERIODO</td><td /><td class='mny'>" . getFMoney($IntPerMor) . "</td><td /><td /><td class='mny' /><td class='ajustar' /></tr>"; } echo "<table class='info'>\n\t\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th width='4%'>" . $xL->getT("TR.Fecha") . "</th>\n\t\t\t\t\t<th width='4%'>CI</th>\n\t\t\t\t\t<th width='3%'>" . $xL->getT("TR.Parcialidad") . "</th>\n\t\t\t\t\t<th width='25%'>" . $xL->getT("TR.Operacion") . "</th>\n\t\t\t\t\t<th width='9%'>" . $xL->getT("TR.Capital") . "</th>\n\t\t\t\t\t<th width='9%'>" . $xL->getT("TR.Intereses") . "</th>\n\t\t\t\t\t<th width='9%'>" . $xL->getT("TR.IVA") . "</th>\n\t\t\t\t\t<th width='9%'>" . $xL->getT("TR.Otros") . "</th>\n\t\t\t\t\t<th width='9%'>" . $xL->getT("TR.Saldo de Capital") . "</th>\n\t\t\t\t\t<th width='19%'>" . $xL->getT("TR.Observaciones") . "</th>\n\t\t\t\t</tr>\n\t\t\t\t</thead>\n\t\t\t\t<tbody>\n\t\t\t\t\t{$trs}\n\t\t\t\t</tbody>\n\t\t\t\t<tfoot>\n\t\t\t\t<tr>\n\t\t\t\t\t<td> </td>\n\t\t\t\t\t<td> </td>\n\t\t\t\t\t<td> </td>\n\t\t\t\t\t<th>SUMA DE PAGOS</th>\n\t\t\t\t\t<th class='sumas'>" . getFMoney($cap) . "</th>\n\t\t\t\t\t<th class='sumas'>" . getFMoney($ints) . "</th>\n\t\t\t\t\t<th class='sumas'>" . getFMoney($iva) . "</th>\n\t\t\t\t\t<th class='sumas'>" . getFMoney($otros) . "</th>\n\t\t\t\t\t<td> </td>\n\t\t\t\t\t<td> </td>\n\t\t\t\t</tr>\n\t\t\t\t</tfoot>\n\t\t</table>"; $trs = ""; $tCap += $cap; $tOtros += $otros; $tInts += $ints; if ($porSocio == true) { echo "<br /><hr class='divisor'/><br />"; } } @mysql_free_result($mycred); if ($porSocio == true) { echo "<table><tr>\n\t\t\t\t\t<td width='5%'> </td>\n\t\t\t\t\t<td width='5%'> </td>\n\t\t\t\t\t<td width='4%'> </td>\n\t\t\t\t\t<th width='30%'>TOTALES</th>\n\t\t\t\t\t<th width='9%' class='total'>" . getFMoney($tCap) . "</th>\n\t\t\t\t\t<th width='9%' class='total'>" . getFMoney($tInts) . "</th>\n\t\t\t\t\t<th width='9%' class='total'>" . getFMoney($tOtros) . "</th>\n\t\t\t\t\t<th width='9%' class='total'>" . getFMoney($tSdos) . "</th>\n\t\t\t\t\t<td width='20%'> </td>\n\t\t\t\t</tr></table>"; } if ($output != OUT_EXCEL) { echo getRawFooter(); ?>
function getFicha($telefonoPrincipal = "") { $xLng = new cLang(); $xT = new cTipos(); $xT->setForceMayus(); $xDS = $this->obj(); $telefonos = $telefonoPrincipal == "" ? "" : "{$telefonoPrincipal} /"; $telefonos .= setNoMenorQueCero($xDS->telefono_residencial()->v()) <= 0 ? "" : $xDS->telefono_residencial()->v() . " /"; $telefonos .= setNoMenorQueCero($xDS->telefono_movil()->v()) <= 0 ? "" : $xDS->telefono_movil()->v() . " /"; $numero = $xDS->numero_exterior()->v(); $numero .= trim($xDS->numero_interior()->v()) == "" ? "" : " /" . $xDS->numero_interior()->v(); $numero = strtoupper($numero); $callenum = $xT->cChar($this->getCalleConNumero()); $eldom = "<table>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class='izq'>" . $xLng->getT("TR.Acceso") . "/" . $xLng->getT("TR.Codigo_postal") . "</th>\n\t\t\t\t\t\t\t<td>" . $callenum . "/" . $this->getCodigoPostal() . "</td>\n\t\t\t\t\t\t\t<th class='izq'>" . $xLng->getT("TR.Numero") . "</th>\n\t\t\t\t\t\t\t<td>{$numero}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class='izq'>" . $xLng->getT("TR.Colonia") . "</th>\n\t\t\t\t\t\t\t<td>" . $xT->cChar($this->getColonia()) . "</td>\n\t\t\t\t\t\t\t<th class='izq'>" . $xLng->getT("TR.Telefono") . "</th>\n\t\t\t\t\t\t\t<td>{$telefonos}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th class='izq'>" . $xLng->getT("TR.Ciudad") . "</th>\n\t\t\t\t\t\t\t<td>" . $xT->cChar($this->getCiudad()) . "</td>\n\t\t\t\t\t\t\t<th class='izq'>" . $xLng->getT("TR.Municipio") . "/" . $xLng->getT("Estado") . "</th>\n\t\t\t\t\t\t\t<td>" . $xT->cChar($this->getMunicipio()) . "/" . $xT->cChar($this->getEstado()) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>"; return $eldom; }
function getListadoDeGarantias($credito = false) { $credito = $credito == false ? $this->mDocumento : $credito; $xLng = new cLang(); //cargar garantias $xCG = new cCreditos_garantias(); $data = $xCG->query()->select()->exec("(`creditos_garantias`.`solicitud_garantia` ={$credito})"); $contar = 1; $strgarantias = ""; foreach ($data as $campos) { $xCG->setData($campos); $xTG->setData($xTG->query()->initByID($xCG->tipo_garantia()->v())); $xTV->setData($xTV->query()->initByID($xCG->tipo_valuacion()->v())); //$this->setGarantiaDeCredito($xCG->idcreditos_garantias()->v(), $contar, $campos ); $str = "<tr>"; $str .= "<td>" . $xCG->documento_presentado->v() . "<td>"; $str .= "<td>" . $xCG->descripcion()->v() . "<td>"; $str .= "<td>" . $xCG->observaciones()->v() . "<td>"; $str .= "</tr>"; $contar++; $strgarantias .= ""; } $strgarantias = "<table><thead><tr>\n\t\t\t\t\t\t\t\t<th>" . $xLng->getT("TR.factura") . "</th>\n\t\t\t\t\t\t\t\t<th>" . $xLng->getT("TR.descripcion") . "</th>\n\t\t\t\t\t\t\t\t<th>" . $xLng->getT("TR.observaciones") . "</th>\n\t\t\t\t\t\t\t\t</tr></thead><tbody>{$strgarantias}</tbody></table>"; return $strgarantias; }
} $locale = "es_MX.iso-8859-1"; setlocale(LC_ALL, $locale); $locales = list_system_locales(); //var_dump($locales); //Crear formularios $xFRM = new cHForm("frmTest", "./test.php"); $xHTxt = new cHText(""); //==================================================================================================== $xFRM->addHElem("<p class='aviso'>Pruebas de la Clase Colonia</p>"); //$txt = $xHTxt->getDeMoneda("id", "Moneda de Prueba", 100); $xColonia = new cDomiciliosColonias(); $clave = $xColonia->getClavePorNombre("Ampliacion josefa ortiz de dom"); $xColonia->init(); $lng = new cLang(); $xFRM->addHElem($lng->getT("TR.La Clave Buscada es ") . $clave . "<br />"); $xFRM->addHElem($lng->getT("TR.El Codigo Postal Buscado es ") . $xColonia->getCodigoPostal() . "<br />"); $xFRM->addHElem($lng->getT("TR.EL Nombre de la Colonia es ") . $xColonia->getNombre() . "<br />"); $xFRM->addHElem($lng->getT("TR.EL Nombre del Municipio es ") . $xColonia->getNombreMunicipio() . "<br />"); $xFRM->addHElem($lng->getT("TR.EL Nombre del Estado es ") . $xColonia->getNombreEstado() . "<br />"); $xFRM->addHElem($lng->getT("TR.EL Nombre de la Localidaad es ") . $xColonia->getNombreLocalidad() . "<br />"); //$xFRM->addHElem( $txt ); $xFRM->addHElem("<p class='aviso'>Probando con el C.P. 24026</p>"); $clave = $xColonia->getClavePorCodigoPostal(24026); //$xColonia->init(); $xFRM->addHElem("<p>La OTRA Clave Buscada es " . $clave . "</p>"); $xFRM->addHElem("<p>EL Nombre de la Colonia es " . $xColonia->getNombre() . "</p>"); $xFRM->addHElem("<p>EL Nombre del Municipio es " . $xColonia->getNombreMunicipio() . "</p>"); $xFRM->addHElem("<p>EL Nombre del Estado es " . $xColonia->getNombreEstado() . "</p>"); $xFRM->addHElem("<p>EL Nombre de la Localidad es " . $xColonia->getNombreLocalidad() . "</p>"); $xFRM->addHElem("<p>EL Nombre de la Localidad2 es " . $xColonia->getOColonia()->sucursal()->v() . "</p>");
if ($mObj == null) { $xFRM->addAviso(MSG_NO_PARAM_VALID); $xFRM->addHTML("<script>var g = new Gen(); g.close(); </script>"); } else { $filtro = $filtro == "" ? $mObj->getKey() . "=" . $clave . "" : $filtro; $data = $mObj->query()->getRow(" {$filtro} "); $Boone = new cGeneral_structure(); $datos = $Boone->query()->select()->exec(" `general_structure`.`tabla` ='{$tabla}' ", " `general_structure`.`order_index`, `general_structure`.`tipo`"); //$original = json_encode($datos); $hidden = ""; //var_dump($datos); foreach ($datos as $clave => $valores) { $Boone->setData($valores); $id = "_" . $Boone->campo()->v(); $valor = $data[$Boone->campo()->v()]; $titulo = $xLng->getT($Boone->titulo()->v()); $equiva = $xDBTip[strtoupper($Boone->tipo()->v())]; $control = $Boone->control()->v(); $xTxt->setClearEvents(); if ($Boone->input_events()->v() != "") { $scr = explode(";", $Boone->input_events()->v()); foreach ($scr as $k => $v) { if ($v != "") { $props = explode("=", $v); //var_dump($props); //echo $props[0] ."===". $props[1] . "\n"; $xTxt->addEvent($props[1], $props[0]); } } } $proc = true;
//Evauar pendiente $pendiente = 0; $monto = $interes_moratorio; if ($monto > $monto_a_operar) { $pendiente = $monto - $monto_a_operar; $monto = $monto_a_operar; $monto_a_operar = 0; } else { $monto_a_operar = $monto_a_operar - $monto; $pendiente = 0; } $base_iva_intereses += $monto; $total += $monto; $monto = number_format($monto, 2, '.', ''); /*<input type=\"hidden\" name=\"p-moroso\" id=\"idp-moroso\" value=\"$pendiente\"/>*/ $tds = $tds . "\n\t\t\t<tr>\n\t\t\t\t<th></th>\n\t\t\t\t<td>" . $xLng->getT("TR.INTERESES MORATORIOS") . "</td>\n\t\t\t\t<th><input type=\"text\" name=\"c-moroso\" id=\"id-moroso\" value=\"{$monto}\" class='mny' onfocus=\"pushMny(event);\" onchange=\"jsEval(this);\" />\n\t\t\t\t</th>\n\t\t\t</tr>"; } //interes normal if ($interes_normal > 0 and $monto_a_operar > 0) { //Evauar pendiente $pendiente = 0; $monto = $interes_normal; if ($monto > $monto_a_operar) { $pendiente = $monto - $monto_a_operar; $monto = $monto_a_operar; $monto_a_operar = 0; } else { $monto_a_operar = $monto_a_operar - $monto; $pendiente = 0; } $base_iva_intereses += $monto;