function getRiesgoComunPorAvales($socio, $explain = false) { $sqlRxA = "SELECT\r\n\t`eacp_config_bases_de_integracion`.`descripcion`,\r\n\t`socios_relaciones`.`numero_socio`,\r\n\tCOUNT(`socios_relaciones`.`socio_relacionado`) AS `relaciones`,\r\n\tCOUNT(`creditos_solicitud`.`numero_solicitud`) AS `creditos`,\r\n\tSUM(`creditos_solicitud`.`saldo_actual`) AS `riesgo`\r\nFROM\r\n\t`socios_relaciones` `socios_relaciones`\r\n\t\tINNER JOIN `eacp_config_bases_de_integracion_miembros` `eacp_config_bases_de_integracion_miembros`\r\n\t\tON `socios_relaciones`.`tipo_relacion` = `eacp_config_bases_de_integracion_miembros`.\r\n\t\t`miembro`\r\n\t\t\tINNER JOIN `eacp_config_bases_de_integracion` `eacp_config_bases_de_integracion`\r\n\t\t\tON `eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = `eacp_config_bases_de_integracion`.\r\n\t\t\t`codigo_de_base`\r\n\t\t\t\tINNER JOIN `creditos_solicitud` `creditos_solicitud`\r\n\t\t\t\tON `socios_relaciones`.`socio_relacionado` =\r\n\t\t\t\t`creditos_solicitud`.`numero_socio`\r\nWHERE\r\n\t(`socios_relaciones`.`numero_socio` ={$socio}) AND\r\n\r\n\t(`creditos_solicitud`.`saldo_actual` >" . TOLERANCIA_SALDOS . ") AND\r\n\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = 5002)\r\nGROUP BY\r\n\t`socios_relaciones`.`numero_socio`,\r\n\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`\r\n"; $aRxN = obten_filas($sqlRxA); if ($explain == false) { return $aRxN["monto"]; } else { return "<fieldset>\r\n\t\t\t\t\t<legend>Riesgo Comun por Avales Otorgados</legend>\r\n\t\t\t\t\t\tNumero de Personas Relacionados : " . $aRxN["relaciones"] . " <br />\r\n\t\t\t\t\t\tNumero de Creditos Relacionados : " . $aRxN["creditos"] . " <br />\r\n\t\t\t\t\t\tMonto de Creditos Relacionados : " . getFMoney($aRxN["riesgo"]) . "\r\n\t\t\t\t</fieldset>"; } }
function calcula_ica($solicitud, $form) { $sql = "SELECT * FROM creditos_solicitud WHERE numero_solicitud={$solicitud}"; $mysolicitud = obten_filas($sql); $socio = $mysolicitud["numero_socio"]; // Numero de Socio $diasaut = $mysolicitud["dias_autorizados"]; // Dias Autorizados $montoMin = $mysolicitud["monto_autorizado"]; // Monto Autorizado $tasaInt = $mysolicitud["tasa_interes"]; // Monto Autorizado $tipoConv = $mysolicitud["tipo_convenio"]; // Interes Diario */ $ICA_pagado = $mysolicitud["sdo_int_ant"]; // saldo ICA */ $infoConv = get_convenio($tipoConv); $tasaICA = $infoConv["porcentaje_ica"]; $intneto = 0; $inttotal = 0; $intpagado = 0; $intdiario = $montoMin * $tasaInt / EACP_DIAS_INTERES; /** * Consulta todos los creditos que aplican Interes Anticipado */ $totaliva = 0; $nota = ""; $intneto = $intdiario * $diasaut * $tasaICA; //Resta el Interes pagado $intneto -= $ICA_pagado; /** * @see Parche: Solo se Incluye la afectacion del Credito */ $nota .= "Tasa ICA {$tasaICA}; Dias {$diasaut}, Int. Diario" . getFMoney($intdiario) . ", ICA Pag. {$ICA_pagado}"; //Valor IVA, obtenido del tipo de solicitud $tasaiva = $infoConv["tasa_iva"]; $iva_inc = $infoConv["iva_incluido"]; if ($iva_inc == 1) { $intneto = $intneto * (1 / (1 + $tasaiva)); $totaliva = $intneto * $tasaiva; } else { $totaliva = $intneto * $tasaiva; } $intneto = number_format($intneto, 2, '.', ''); //getFMoney($intneto); $totaliva = number_format($totaliva, 2, '.', ''); //getFMoney($totaliva); $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("valorinteres", $intneto)); $tab->add(TabSetValue::getBehavior("valoriva", $totaliva)); $tab->add(TabSetValue::getBehavior("idobservaciones", $nota)); $tab->add(TabSetValue::getBehavior("idTasaIva", $tasaiva)); return $tab->getString(); }
function jsaGetCalculos($socio, $acciones, $tipo_de_pago) { $xSoc = new cSocio($socio); $coste = COSTE_POR_ACCION * $acciones; $monto = $tipo_de_pago == "efectivo" ? $coste : 0; $ide = $tipo_de_pago == "efectivo" ? $xSoc->getIDExPagarByPeriodo(false, $monto) : 0; $tab = new TinyAjaxBehavior(); $tab->add(TabSetValue::getBehavior("idCoste", getFMoney($coste))); $tab->add(TabSetValue::getBehavior("idide", getFMoney($ide))); //$tab -> add( TabSetValue::getBehavior("idObservaciones", $xSoc->getMessages("txt") ) ); return $tab->getString(); }
function jsaGetLetras($idcredito) { $idcred = setNoMenorQueCero($idcredito); $xF = new cFecha(); if ($idcred > DEFAULT_CREDITO) { $xCred = new cCredito($idcred); $xCred->init(); if ($xCred->getEsAfectable() == false or $xCred->getSaldoActual() <= 0) { if (MODO_CORRECION == true) { $xTxt = new cHText(); $xTxt->setDivClass(""); return $xTxt->getNumero("idparcialidad", $xCred->getPeriodoActual() + 1, "TR.Numero de Parcialidad"); } else { return $xCred->getMessages(); } } else { if ($xCred->getPeriocidadDePago() == CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) { // $xTxt = new cHText(); $xTxt->setDivClass(""); return $xTxt->getNumero("idparcialidad", $xCred->getPeriodoActual() + 1, "TR.Numero de Parcialidad"); } else { $plan = $xCred->getNumeroDePlanDePagos(); if ($plan != false) { $xPlan = new cPlanDePagos($plan); $xPlan->init(); $parcs = $xPlan->getParcsPendientes(); //$txt = ""; $arrD = array(); foreach ($parcs as $p) { //setLog( $p[SYS_NUMERO]. " " . $xF->getFechaDDMM($p[SYS_FECHA]) . " ". getFMoney($p[SYS_TOTAL])); if (setNoMenorQueCero($p[SYS_TOTAL]) > 0) { $arrD[$p[SYS_NUMERO]] = $p[SYS_NUMERO] . " " . $xF->getFechaDDMM($p[SYS_FECHA]) . " " . getFMoney($p[SYS_TOTAL]); } } $xSel = new cHSelect(); $xSel->addOptions($arrD); $xSel->setEnclose(false); return $xSel->get("idparcialidad", "TR.Numero de Parcialidad", $xCred->getPeriodoActual() + 1); } else { if (MODO_CORRECION == true) { $xTxt = new cHText(); $xTxt->setDivClass(""); return $xTxt->getNumero("idparcialidad", $xCred->getPeriodoActual() + 1, "TR.Numero de Parcialidad"); } } } } } }
} if ($SUMIva == 0) { $thIVA = ""; $tfIVA = 0; } foreach ($arrLetras as $parcial => $dat) { $txt = "<tr><th>" . $parcial . "</th>"; $txt .= isset($dat[SYS_FECHA]) ? "<td>" . $xF->getDayName($dat[SYS_FECHA]) . "|" . $xF->getFechaCorta($dat[SYS_FECHA]) . "</td>" : "<td />"; $txt .= isset($dat[SYS_CAPITAL]) ? "<td class='mny'>" . getFMoney($dat[SYS_CAPITAL]) . "</td>" : "<td />"; $txt .= isset($dat[SYS_INTERES_NORMAL]) ? "<td class='mny'>" . getFMoney($dat[SYS_INTERES_NORMAL]) . "</td>" : "<td />"; $txt .= isset($dat[SYS_GASTOS_DE_COBRANZA]) ? "<td class='mny'>" . getFMoney($dat[SYS_GASTOS_DE_COBRANZA]) . "</td>" : ""; $txt .= isset($dat[SYS_IMPUESTOS]) ? "<td class='mny'>" . getFMoney($dat[SYS_IMPUESTOS]) . "</td>" : ""; $txt .= isset($dat[SYS_AHORRO]) ? "<td class='mny'>" . getFMoney($dat[SYS_AHORRO]) . "</td>" : ""; $txt .= "<td class='mny'>" . getFMoney($dat[SYS_TOTAL]) . "</td>"; $netoNivel -= $dat[SYS_TOTAL]; $txt .= "<th class='mny'>" . getFMoney($netoNivel) . "</th>"; $txt .= "<tr>"; $tmpcap = isset($dat[SYS_CAPITAL]) ? $dat[SYS_CAPITAL] : 0; if (setNoMenorQueCero($tmpcap) > 0 or $pagoactual == 0 or $xCred->getPagosSinCapital() == true) { $trs .= $txt; } } //<th>" . $xHP->lang("dia") . "</th> $PlanBody .= "<table class='listado'>\n <thead>\n <tr>\n <th>" . $xHP->lang("pago") . "</th>\n \n <th>" . $xHP->lang("fecha de", "pago") . "</th>\n <th>" . $xHP->lang("capital") . "</th>\n <th>" . $xHP->lang("interes") . "</th>\n {$thOtros}\n {$thIVA}\n {$thAhorro}\n <th>" . $xHP->lang("total") . "</th>\n <th>" . $xHP->lang("saldo") . "</th>\n </tr>\n </thead>\n <tbody>\n {$trs}\n\t\n <tr>\n <td colspan='2'>" . $xHP->lang("sumas") . "</td>\n <th class='mny'>" . getFMoney($SUMCap) . "</th>\n <th class='mny'>" . getFMoney($SUMInt) . "</th>\n {$tfOtros}\n \n {$tfIVA}\n {$tfAhorro}\n <th class='mny'>" . getFMoney($SumTotal) . "</th>\n <td />\n </tr>\n \t\n\n \n </tbody>\n</table>"; $PlanBody .= "\n\t<table >\n\t<tr>\n\t<td><center>" . $xHP->lang("firma del", "solicitante") . "</td>\n\t<td><center>" . $xHP->lang("por la", "empresa") . "</center></td>\n\t</tr>\n\t<tr>\n\t<td>\n\t\t<br />\n\t\t<br />\n\t\t<br />\n\t</td>\n\t</tr>\n\t<tr>\n\t<td><center>{$nombre}</center></td>\n\t<td><center>{$oficial}</center></td>\n\t</tr>\n\t<tr>\n\t\t<th>" . $xHP->lang("observaciones") . "</th><td>{$observaciones}</td>\n\t</tr>\n\t</table>"; echo $PlanBody; echo getRawFooter(); ?> </body> </html>
$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> <td><?php echo $rw[1]; ?> </td> </tr>
$idparcialidad = $_POST["idparcialidad"]; $iva = $_POST["iva_cargado"]; //$idsocio = mifila($sqlvs, "numero_socio"); $observaciones = $_POST["observaciones"]; $fecha = fechasys(); $cRec = new cReciboDeOperacion(97); $recibo = $cRec->setNuevoRecibo($idsocio, $idsolicitud, $fecha, $idparcialidad, 97, $observaciones); $cRec->setDefaultEstatusOperacion(40); $cRec->setNuevoMvto($fecha, $montoop, 601, $idparcialidad, $observaciones); $cRec->setNuevoMvto($fecha, $iva, 1202, $idparcialidad, $observaciones); $mSoc = new cFicha(iDE_SOCIO, $idsocio); $mSoc->setTableWidth(); $mSoc->show(); $cRec->setFinalizarRecibo(true); $cRec->getFicha(); echo "<p class='aviso'>EL MONTO DEL CARGO FUE DE: \$ " . getFMoney($montoop) . ", SE PODRA DISMUIR DESDE EL MODULO DE DESCUENTOS</p>"; echo $msg_rec_end; } ?> </body> <script > function printrec() { var elUrl= "../rpt_formatos/frmrecibogeneral.php?recibo=<?php echo $recibo; ?> "; rptrecibo = window.open( elUrl, "window"); rptrecibo.focus(); } </script> </html>
$dmvto = obten_filas($sql_d_mvto); $dInv = obten_filas($sql_d_inv); $dIDE = obten_filas($sql_d_ide); // $iSocio = new cFicha(iDE_SOCIO, $idsocio); $iSocio->setTableWidth(); $iSocio->show(); echo "<hr />"; $cInv = new cFicha(iDE_CINVERSION, $docto); $cInv->setTableWidth(); $cInv->show(); ?> <hr /> <?php $tasa = getFMoney($dcuentas["tasa_otorgada"] * 100); $interes = getFMoney($dmvto["afectacion_real"]); //$capital = getFMoney($dInv["afectacion_real"]); $capital = getFMoney($dcuentas["saldo_cuenta"]); $dias = $dcuentas["dias_invertidos"]; $isr = getISRByInversion($dcuentas["saldo_cuenta"], $dias); $isr = round($isr, 2); $ide = $dIDE["afectacion_real"]; //$ide = 0; $aliquidar = $dInv["afectacion_real"] + $dmvto["afectacion_real"] - ($isr + $ide); $vencimiento = $dcuentas["inversion_fecha_vcto"]; echo "\n<table width='75%'>\n <tr>\n <td width='15%'> </td>\n <td width='15%'> </td>\n\n <th>Fecha de Apertura:</th>\n <td>{$dcuentas['5']}</td>\n <td> </td>\n\n </tr>\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Fecha de Vencimiento:</th>\n <td>{$vencimiento}</td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <td></td>\n <td></td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Dias Invertidos:</th>\n <td class='mny'>{$dias}</td>\n <td> </td>\n\n </tr>\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Tasa Otorgada</th>\n <td class='mny'>{$tasa} %</td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <td></td>\n <td></td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Capital Invertido:</th>\n <td class='mny'>{$capital}</td>\n <td> </td>\n\n </tr>\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Interes Generado:</th>\n <th class='mny'>{$interes}</th>\n <td></td>\n </tr>\n<!-- ISR -->\n <tr>\n <td> </td>\n <td> </td>\n\n <th>ISR a Retener:</th>\n <th class='mny'>(" . getFMoney($isr) . ")</th>\n <td></td>\n </tr>\n\n<!-- IDE -->\n<!-- <tr>\n <td> </td>\n <td> </td>\n\n <th>IDE Retenido:</th>\n <th class='mny'>(" . getFMoney($ide) . ")</th>\n <td></td>\n </tr> -->\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>A Liquidar</th>\n <td class='mny'>" . getFMoney($aliquidar) . "</td>\n <td> </td>\n </tr>\n <tr>\n \t<td />\n \t<td />\n \t<th colspan='3'>" . convertirletras($aliquidar) . "</th>\n </tr>\n</table>\n<p class='legal'>El Impuesto a Depositos en Efectivo Cobrado en esta transaccion es de " . getFMoney($ide) . " </p>\n<hr />\n<table border='0' width='100%'>\n\t<tr>\n\t<td><center>Firma de CONFORMIDAD</td>\n\t<td><center>GENERO LA REINVERSION</center></td>\n\t</tr>\n\t<tr>\n\t<td><br /><br ><br /></td>\n\t</tr>\n\t<tr>\n\t<td><center>{$nombre}\n\t</td>\n\t\t<td><center>{$oficial}</center></td>\n\t</tr>\n</table>\n"; echo getRawFooter(); ?> </body> </html>
</table> <?php $rs = mysql_query($sql, cnnGeneral()); $gvalues = ""; $gnames = ""; $i = 0; $tds = ""; $mnt = 0; $sm = 0; while ($rw = mysql_fetch_array($rs)) { $val[] = round($rw[1] / 1000, 2); $lbl[] = $rw[0]; $sm += $rw[1]; $tds = $tds . "<tr>\n\t<td>{$rw['0']}</td>\n\t<td class='mny'>" . getFMoney($rw[1]) . "</td>\n\n\t</tr>"; $i++; } //echo $gnames; //echo $gvalues; $sm = getFMoney($sm); echo "<table width='100%' aling='center'>\n\t<tr>\n\t\t<th>Concepto</th>\n\t\t<th>Monto</th>\n\t</tr>\n\n\t{$tds}\n\n\t<tr>\n\t\t<td>Sumas</td>\n\t\t<td>{$sm}</td>\n\t</tr>\n\n\t</table>"; $x = new SAFEChart(); $x->setValues($val); $x->setLabels($lbl); $x->setTitle("INGRESOS ACUMULADOS EN UN RANGO DE FECHAS(Miles)"); $mFile = $x->Chart3DBAR(10000); open_flash_chart_object(768, 512, $mFile, true, "../"); echo getRawFooter(); ?> </body> </html>
} $ByStat = ""; $inputG = $_GET["outg"]; if ($Stat != "todas") { $ByStat = " AND\n\t\t\t\t(`creditos_solicitud`.`estatus_actual` ={$Stat}) "; } $sql = "SELECT\n\t`creditos_periocidadpagos`.`descripcion_periocidadpagos` AS `periocidad`,\n\tCOUNT(`creditos_solicitud`.`numero_solicitud`) AS `numero`,\n\tSUM(`creditos_solicitud`.`saldo_actual`) AS\n\t`monto`,\n\t`creditos_solicitud`.`periocidad_de_pago`\nFROM\n\t`creditos_solicitud` `creditos_solicitud`\n\t\tINNER JOIN `creditos_periocidadpagos` `creditos_periocidadpagos`\n\t\tON `creditos_solicitud`.`periocidad_de_pago` =\n\t\t`creditos_periocidadpagos`.`idcreditos_periocidadpagos`\nWHERE\n\t(`creditos_solicitud`.`saldo_actual` >=0.99)\n\t{$ByStat}\n\t{$BySuc}\n\tGROUP BY\n\t\t`creditos_solicitud`.`periocidad_de_pago`"; $rs = mysql_query($sql, cnnGeneral()); $lbl = array(); $val = array(); while ($rw = mysql_fetch_array($rs)) { $val[] = round($rw["monto"] / 1000, 2); $lbl[] = $rw["destino"]; $sm += $rw["monto"]; $nm += $rw["numero"]; $tds = $tds . "<tr>\n\t<td>" . $rw["periocidad"] . "</td>\n\t<td>" . $rw["numero"] . "</td>\n\t<td class='mny'>" . getFMoney($rw["monto"]) . "</td>\n\t</tr>"; $i++; } //echo $gnames; //echo $gvalues; echo "<table align=\"center\" width='100%'>\n\t<tr>\n\t\t<th>Destino del Credito</th>\n\t\t<th>Numero de Credito</th>\n\t\t<th>Saldo del Capital Insoluto</th>\n\t</tr>\n\n\t{$tds}\n\n\t<tr>\n\t\t<td>Sumas</td>\n\t\t<th>" . getFMoney($nm) . "</th>\n\t\t<th>" . getFMoney($sm) . "</th>\n\t</tr>\n\t</td>\n\t</table>\n"; $x = new SAFEChart(); $x->setValues($val); $x->setLabels($lbl); $x->setTitle("REPORTE DE CONCENTRACION DE LA CARTERA POR DESTINO ECONOMICO(Miles)"); $mFile = $x->ChartPIE(); open_flash_chart_object(768, 512, $mFile, true, "../"); echo getRawFooter(); ?> </body> </html>
$presidenta = $lafila["representante_numerosocio"]; $mynom = getNombreSocio($presidenta); $nomrep = $lafila["representante_nombrecompleto"]; $nomvv = $lafila["vocalvigilancia_nombrecompleto"]; if ($tipo_docto == 14) { $title = "PLANEACION DEL CREDITO EN GRUPOS SOLIDARIOS EN ETAPA DE SOLICITUD"; $thTit = "Monto Solicitado"; } echo "\n<p class='bigtitle'>{$title}</p>\n<hr />\n<table width='100%' border='0'>\n\t\t<tr>\n\t\t\t<th class='izq'>Referencia</th>\n\t\t\t<td>" . $rsr["idoperaciones_recibos"] . "</td>\n\t\t\t<th class='izq'>Fecha de Elaboracion</th>\n\t\t\t<td>" . getFechaLarga($rsr["fecha_operacion"]) . "</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class='izq'>Codigo de Grupo</th>\n\t\t\t<td>{$idgrupo}</td>\n\t\t\t<th class='izq'>Nombre de Grupo</th>\n\t\t\t<td>{$nombregrupo}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th class='izq'>Responsable del Grupo</td>\n\t\t\t<td>{$nomrep}</td>\n\t\t\t<th class='izq'>Vocal de Vigilancia del Grupo</td>\n\t\t\t<td>{$nomvv}</td>\n\t\t</tr>\n\t</table>\n\t<hr />"; $suma = 0; $sqlsun = "SELECT * FROM operaciones_mvtos\n\t\t\t\t\t\t\t\tWHERE recibo_afectado=" . $rsr["idoperaciones_recibos"] . "\n\t\t\t\t\t\t\t\t\t\tAND grupo_asociado={$idgrupo}"; $rss = mysql_query($sqlsun); echo "<table width='100%' border='0'>\n\t\t<tr>\n <th>Socia(o)</th>\n <th>C.U.R.P.</th>\n\t\t <th>Nombre Completo</th>\n\t\t <th>{$thTit}</th>\n\t\t <th>Firma</th>\n </tr>"; while ($rws = mysql_fetch_array($rss)) { $xSoc = new cSocio($rws["socio_afectado"], true); $DS = $xSoc->getDatosInArray(); $socia = $xSoc->getNombreCompleto(); $curp = $DS["curp"]; $suma = $suma + $rws["afectacion_real"]; echo "<tr>\n\t\t\t\t<td class='ctr'>" . $rws["socio_afectado"] . "</td>\n\t\t\t\t<td>{$curp}</td>\n\t\t\t\t<td>{$socia}</td>\n\t\t\t\t<td class='mny'>" . getFMoney($rws["afectacion_real"]) . "</td>\n\t\t\t\t<td><br /><br /><br />______________________</td>\n\t\t\t\t</tr>"; } $letters = convertirletras($suma); $suma = getFMoney($suma); echo "<td>SUMA DE LA PLANEACION</td><th>{$letters}</th><th>{$suma}</th></table>\n\t\t<p>Manifestamos Bajo Protesta de Decir Verdad que las personas que integramos este grupo, nos caracterizamos\n\t\tpor tener gran solvencia Moral, al ser Honestas y responsables, asi como tener la Suficiente solvencia\n\t\tEconomica para cubrir el Monto Manifestado en esta Cedula.</p>\n\t\t<p>El Total de la Planeacion del Credito sera considerado como el Monto del Credito Solicitado.</p>"; @mysql_free_result($rss); echo "<hr /><table border='0' width='100%'>\n\t<tr>\n\t<td><center>Firma del Solicitante<br>\n\tBajo Protesta de Decir Verdad</center></td>\n\t<td><center>Procesa la Planeación</center></td>\n\t</tr>\n\t<tr>\n\t<td><br><br><br></td>\n\t</tr>\n\t<tr>\n\t<td><center>{$mynom}</center></td>\n\t<td><center>{$oficial}</center></td>\n\t</tr>\n\t</table>"; echo getRawFooter(); ?> </body> </html>
} else { $td_inicial = "<td></td>\n\t\t\t\t\t\t\t\t\t<td class='mny'>" . getFMoney($mvtos["inicial"]) . "</td>"; $td_final = "<td></td>\n\t\t\t\t\t\t\t\t\t<td class='mny'>" . getFMoney($mvtos["final"]) . "</td>"; } break; case 2: $mvtos["cargos_actual"] = $rm["movimiento"]; break; case 3: $mvtos["abonos_actual"] = $rm["movimiento"]; break; } //$MActuales++; } // END mysql Movimientos*/ $exoCuenta = "\n\t\t<tr {$css}>\n\t\t\t<td>" . $xEsq->CUENTA_FORMATEADA . "</td>\n\t\t\t<td>{$nombre}</td>\n\t\t\t{$td_inicial}\n\t\t\t<td class='mny'>" . getFMoney($mvtos["cargos_actual"]) . "</td>\n\t\t\t<td class='mny'>" . getFMoney($mvtos["abonos_actual"]) . "</td>\n\t\t\t{$td_final}\n\t\t</tr>\n\t\t"; /** * @see Re refiere a la decision de imprimir o no ciertas cuentas */ switch ($incluir_cuentas) { case "con_movimientos": if ($MActuales == false) { $exoCuenta = ""; } break; case "saldo_no_cero": if ($saldo == 0) { $exoCuenta = ""; } break; case "saldo_no_cero_con_mvtos":
*/ $sqlM = "SELECT\n\n\t/* `operaciones_mvtos`.`socio_afectado`,\n\t`operaciones_mvtos`.`docto_afectado`, */\n\t`operaciones_mvtos`.`recibo_afectado`,\n\n\t`operaciones_mvtos`.`fecha_operacion` AS 'fecha_de_operacion',\n\t`operaciones_tipos`.`descripcion_operacion` AS 'tipo_de_operacion',\n\n\t(`operaciones_mvtos`.`afectacion_real` *\n\t`eacp_config_bases_de_integracion_miembros`.`afectacion`) AS 'monto'\n\n\n\tFROM\n\n\t`operaciones_mvtos` `operaciones_mvtos`\n\tINNER JOIN `eacp_config_bases_de_integracion_miembros`\n\t`eacp_config_bases_de_integracion_miembros`\n\tON `operaciones_mvtos`.`tipo_operacion` =\n\t`eacp_config_bases_de_integracion_miembros`.`miembro`\n\tINNER JOIN `operaciones_tipos` `operaciones_tipos`\n\tON `operaciones_mvtos`.`tipo_operacion` = `operaciones_tipos`.\n\t`idoperaciones_tipos`\n\n\tWHERE\n\t(`operaciones_mvtos`.`docto_afectado` ={$credito})\n\tAND\n\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` =2001)\n\t{$ByFecha}\n\tORDER BY\n\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`,\n\t`operaciones_mvtos`.`fecha_operacion` "; $td = ""; $rs2 = $query->getDataRecord($sqlM); $sumP = 0; $sumD = 0; foreach ($rs2 as $rw) { $montoD = 0; $montoP = 0; $recibo = $rw["recibo_afectado"]; $operacion = $rw["tipo_de_operacion"]; $fecha = $rw["fecha_de_operacion"]; if ($rw["monto"] < 0) { $montoP = $rw["monto"]; $sumP += $rw["monto"]; } else { $montoD = $rw["monto"]; $sumD += $rw["monto"]; } $td .= "\n\t\t\t<tr>\n\t\t\t<td>{$recibo}</td>\n\t\t\t<td>{$fecha}</td>\n\t\t\t<td>{$operacion}</td>\n\t<td class='mny'>" . getFMoney($montoD) . "</td>\n\t<td class='mny'>" . getFMoney($montoP) . "</td>\n\t</tr>"; } $xRPT->addContent("\t<table width=\"100%\" align=\"center\" >\n\t\t\t<thead>\n\t\t\t<tr>\n\t\t\t<th width=\"15%\">Recibo</th>\n\t\t\t<th width=\"15%\">Fecha</th>\n\t\t\t<th width=\"40%\">Tipo de Operacion</th>\n\t\t\t<th width=\"15%\">Devengado</th>\n\t\t\t<th width=\"15%\">Pagado</th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\n\t\t\t{$td}\n\t\t\t</tbody>\n\t\t\t<tfoot>\n\t\t\t<tr>\n\t\t\t<td />\n\t\t\t<th>SUMA DE MORATORIOS </th>\n\t\t\t<td class='mny'>" . getFMoney($sumD + $sumP) . "</td>\n\t\t\t<th class='mny'>" . getFMoney($sumD) . "</th>\n\t\t\t<th class='mny'>" . getFMoney($sumP) . "</th>\n\t\t\t</tr>\n\t\t\t</tfoot>\n\t\t</table>\n\t"); //$xT->setEventKey("jsGoPanel"); //$xT->setKeyField("creditos_solicitud"); //$xRPT->addContent( $xT->Show( $xHP->getTitle() ) ); //============ Agregar HTML //$xRPT->addContent( $xHP->init($jsEvent) ); //$xRPT->addContent( $xHP->end() ); $xRPT->setResponse(); $xRPT->setSenders($senders); echo $xRPT->render(true);
$sql = "select convenio, count(solicitud) AS 'numero', SUM(monto_solicitado) AS 'total_colocado' FROM solicitudes {$si_es_por_fecha} AND monto_solicitado>=0.99 GROUP BY convenio"; $rs = mysql_query($sql); //echo $sql; $gvalues = ""; $gnames = ""; $i = 0; $tds = ""; $mnt = 0; $sm = 0; $nm = 0; while ($rw = mysql_fetch_array($rs)) { $val[] = round($rw[2] / 1000, 2); $lbl[] = $rw[0]; $sm = $sm + $rw[2]; $nm = $nm + $rw[1]; $tds = $tds . "<tr>\n\t<td>{$rw['0']}</td>\n\t<td>{$rw['1']}</td>\n\t<td class='mny'>" . getFMoney($rw[2]) . "</td>\n\t</tr>"; $i++; } //echo $gnames; //echo $gvalues; echo "<table >\n\t<tr>\n\t\t<th>Tipo de Convenio</th>\n\t\t<th>Numero Solicitado</th>\n\t\t<th>Cantidad</th>\n\t</tr>\n\t\n\t{$tds}\n\t\n\t<tr>\n\t\t<td>Sumas</td>\n\t\t<th>{$nm}</th>\n\t\t<th class='mny'>" . getFMoney($sm) . "</th>\n\t</tr>\n\t</td>"; $x = new SAFEChart(); $x->setValues($val); $x->setLabels($lbl); $x->setTitle("REPORTE DE SOLICITUDES DE CREDITO EN FECHA DADA(Miles)"); $mFile = $x->Chart3DBAR(2500); open_flash_chart_object(768, 512, $mFile, true, "../"); echo getRawFooter(); ?> </body> </html>
$idgrupo = $rt["grupo_asociado"]; $codigorep = $rt["numero_socio"]; $periocidad = $rt["periocidad_de_pago"]; } if (EACP_INCLUDE_INTERES_IN_PAGARE == true) { if ($periocidad == 360) { $monto = $monto + $idiario * $dias; } else { $sqlInt = "SELECT\n\t\t\t\t\t\t`operaciones_mvtos`.`docto_afectado`,\n\t\t\t\t\t\t`operaciones_mvtos`.`tipo_operacion`,\n\t\t\t\t\t\tCOUNT(`operaciones_mvtos`.`idoperaciones_mvtos`) AS `mvtos`,\n\t\t\t\t\t\t\tSUM(`operaciones_mvtos`.`afectacion_real` *\n\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`afectacion`) AS 'monto'\n\t\t\t\t\tFROM\n\t\t\t\t\t`operaciones_mvtos` `operaciones_mvtos`\n\t\t\t\t\t\tINNER JOIN `eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\t\tON `operaciones_mvtos`.`tipo_operacion` =\n\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`miembro`\n\t\t\t\t\tWHERE\n\t\t\t\t\t\t(`operaciones_mvtos`.`docto_afectado` = {$idsolicitud})\n\t\t\t\t\t\tAND\n\t\t\t\t\t\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = 2601)\n\t\t\t\t\t\tGROUP BY\n\t\t\t\t\t\t\t`operaciones_mvtos`.`docto_afectado`,\n\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`\n\t\t\t\t\t\tORDER BY\n\t\t\t\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`,\n\t\t\t\t\t\t\t`operaciones_mvtos`.`fecha_afectacion`,\n\t\t\t\t\t\t\t`operaciones_mvtos`.`socio_afectado`\n\t\t\t\t\t"; $xF = obten_filas($sqlInt); $monto = $xF["monto"]; } } $tasamor = $imora * 100 / 12; $montoletras = convertirletras($monto); $monto = getFMoney($monto); $nombrerep = getNombreSocio($codigorep); $domrep = sociodom($codigorep); $isnow = fecha_larga(); $fecha = fecha_larga($fecha); echo "<table width='100%' border='0'>\n <tr>\n <td bordercolor='#000000' class='bigtitle'>PAGARE</td>\n <td></td>\n <td>Numero 01/01</td>\n <td></td>\n <td class='midtitle'>Bueno por : </td>\n <td class='midtitle'>\$ {$monto}</td>\n </tr>\n\t\t<tr>\n\t\t <td> </td>\n\t\t <td> </td>\n\t\t <td> </td>\n\t\t <td> </td>\n\t\t <td class='numc'>EN " . DEFAULT_NOMBRE_LOCALIDAD . ", " . DEFAULT_NOMBRE_ESTADO . " a:</td>\n\t\t <td class='numc'>{$isnow}</td>\n\t </tr>\n\t\t<tr>\n\t\t <td colspan='6' class='legal'>Debo(emos) y Pagare(mos) incondicionalmente por este PAGARE\n\t\t a la orden de <b>" . EACP_NAME . "</b> ubicada en <b>" . EACP_DOMICILIO_CORTO . "</b> o\n\t\t en cualquier otra que se me(nos) solicite el pago, el dia <b>{$fecha}</b> la cantidad de <b>\$ {$monto}</b>\n\t\t - - - - - - - - - - - - - - - - - - - - - -\n\t\t <b>son:({$montoletras})</b> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -\n\t\t - - - - - - - - - - - - - - - - - - - - - - - - - - - - Valor recibido a mi(nuestra) entera\n\t\t satisfacción. Este PAGARÉ forma parte de una serie numerada del 01/01 y todos estan sujetos\n\t\t a la condición de que, al no pagarse cualquiera de ellos a su vencimiento, seran exigibles\n\t\t todos los que sigan en número, ademas de los ya vencidos. Desde la fecha de este documento\n\t\t hasta el dia de su liquidacion, causara intereses moratorios al tipo de <b>{$tasamor} % </b> Mensual, pagadero\n\t\t en esta ciudad o cualquier otra plaza donde me(nos) sea exigido, conjuntamente con el principal.</td>\n\t </tr>\n\t\t<tr>\n\t\t <td colspan='6'> </td>\n\t </tr>\n\t</table>\n\t<p class='order'>\n\tAcepto\n\t<br />\n\t<br />\n\t<br />\n\t<br />\n\t____________________________________\n\t<br />\n\t{$nombrerep}<br />\n\t{$domrep}<br />\n\t</p>\n<p class='bigtitle'>AVAL(ES)</b>\n"; $segpo = "SELECT codigo FROM socios_general WHERE grupo_solidario={$idgrupo} AND codigo!={$codigorep}"; $rsgpo = mysql_query($segpo); while ($rwg = mysql_fetch_array($rsgpo)) { $name = getNombreSocio($rwg[0]); $dom = sociodom($rwg[0]); echo "\t<p class='order'>\n\tAcepto Incondicionalmente las Obligaciones de este Pagaré, como si del deudor Principal se tratará<br>\n\t<br>\n\t<br>\n\t<br>\n\t____________________________________<br>\n\t{$name}<br>\n\tDireccion: {$dom}<br>\n\t</p>"; } @mysql_free_result($rsgpo); ?> </body>
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>"; }
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; }
//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 > <?php ?> function initComponents(){ window.print(); } </script> </html>
$numero_parcialidad = setNoMenorQueCero($rw["letra"]) == 0 ? 1 : $rw["letra"]; $numero_de_pagos = $rw["pagos"]; //$DCred[""]; $periocidad_titulo = $xTPer->getNombre(); $tipo_de_credito = ""; $monto_ministrado = ""; $DOficial = $xCred->getDatosOficialDeCredito_InArray(); $oficial = $DOficial["nombre_completo"]; $variable_oficial = $DOficial["nombre_completo"]; $fecha_de_vencimiento = ""; $tasa_interes_mensual_ordinario = ""; $tasa_garantia_liquida = ""; $tasa_interes_mensual_moratorio = 0; $fecha_de_ministracion = ""; //cargar Datos de la Empresa $vars = array("variable_nombre_del_socio" => $cSoc->getNombreCompleto(), "variable_nombre_de_la_sociedad" => EACP_NAME, "variable_nombre_de_la_entidad" => EACP_NAME, "variable_domicilio_del_socio" => trim(substr($cSoc->getDomicilio(), 0, 60)), "variable_documento_de_constitucion_de_la_sociedad" => EACP_DOCTO_CONSTITUCION, "variable_rfc_de_la_entidad" => EACP_RFC, "variable_rfc_del_socio" => $DSoc["rfc"], "variable_curp_del_socio" => $DSoc["curp"], "variable_nombre_del_representante_legal_de_la_sociedad" => EACP_REP_LEGAL, "variable_informacion_del_credito" => $svar_info_cred, "variable_domicilio_de_la_entidad" => EACP_DOMICILIO_CORTO, "variable_acta_notarial_de_poder_al_representante" => EACP_DOCTO_REP_LEGAL, "variable_numero_de_socio" => $numero_de_socio, "variable_tipo_de_credito" => $tipo_de_credito, "variable_monto_ministrado" => getFMoney($monto_ministrado), "variable_tasa_mensual_de_interes_ordinario" => $tasa_interes_mensual_ordinario, "variable_credito_fecha_de_vencimiento" => getFechaLarga($fecha_de_vencimiento), "variable_tasa_mensual_de_interes_moratorio" => $tasa_interes_mensual_moratorio . " %", "variable_tasa_de_garantia_liquida" => $tasa_garantia_liquida . " %", "variable_horario_de_trabajo_de_la_entidad" => EACP_HORARIO_DE_TRABAJO, "variable_testigo_del_acto" => $oficial, "variable_fecha_larga_actual" => fecha_larga(), "variable_nombre_de_presidente_de_vigilancia_de_la_entidad" => EACP_PDTE_VIGILANCIA, "variable_en_letras_monto_ministrado" => convertirletras($monto_ministrado), "variable_credito_fecha_de_ministracion" => getFechaLarga($fecha_de_ministracion), "variable_informacion_del_socio" => $ficha_socio, "variable_oficial" => $variable_oficial, "variable_lugar" => $variable_lugar, "variable_lugar_actual" => $variable_lugar, "variable_monto_inicial_en_numero" => $monto_inicial, "variable_monto_inicial_en_letras" => $monto_inicial_letras, "variable_numero_de_dias" => $numero_dias, "variable_fecha_de_vencimiento" => $variable_fecha_vencimiento, "variable_tasa_otorgada" => $variable_tasa_otorgada, "variable_nombre_empresa" => $nempresa, "variable_numero_de_pagos" => $numero_de_pagos, "variable_numero_parcialidad_actual" => $numero_parcialidad, "variable_monto_parcialidad" => getFMoney($monto_parcialidad), "variable_monto_letras_parcialidad" => convertirletras($monto_parcialidad), "variable_encabezado_de_reporte" => getRawHeader(false, $out), "variable_pie_de_reporte" => getRawFooter(false, $out), "variable_paginas" => $contar); if ($out == OUT_DOC) { $vars["<hr />"] = ""; } $texto_contrato = $base_contrato; foreach ($vars as $key => $value) { $texto_contrato = str_replace($key, $value, $texto_contrato); } if ($monto_parcialidad > 0) { $xRPT->addContent($texto_contrato); $ppn++; if ($ppn == 2) { if ($out == OUT_DOC) { } else { $xRPT->addContent("<hr class='divisormedio' />\n"); }
/** * 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; }
$operacion = $rwm["concepto_del_movimiento"]; $monto = $rwm["monto_del_movimiento"] * $rwm["naturaleza_del_movimiento"] * $afectaCaja; $destino = " " . $rwm["numero_de_documento"]; $parcial = $rwm["parcialidad"]; //Documento de Destino if ($origen == TESORERIA_RECIBOS_ORIGEN_CRED or $origen == TESORERIA_RECIBOS_ORIGEN_MIXTO) { $destino .= "|" . substr($tipoDocto, 0, 5) . "|" . substr($estatDocto, 0, 3) . "|{$parcial} {$letras}"; } $destino .= "|" . trim($rwm["observacion_del_mvto"]); $td = ""; foreach ($aSQL as $mKey => $mValue) { $css = ""; $valor = $mValue == "destino_del_movimiento" ? $destino : $rwm[$mValue]; if ($mValue == "monto_del_movimiento") { $css = " class='mny' "; $valor = getFMoney($monto); } $td .= "<td {$css}>{$valor}</td>\n"; } $tr .= "<tr>{$td}</tr>"; } $body = "<tbody>{$tr}</tbody>"; $table = "\n\t\t\t\t<table>\n\t\t\t\t{$header} {$body}\n\t\t\t\t</table>"; $texto_contrato = str_replace("_AREA_DE_MOVIMIENTOS_", $table, $texto_contrato); foreach ($vars as $key => $value) { $texto_contrato = str_replace($key, $value, $texto_contrato); } echo $texto_contrato; ?> </body> <script>
$idsocio = $rwrec[2]; $domicilio = sociodom($idsocio); $x = getDatosSocio($idsocio); $rfc = $x[4]; $curp = $x[5]; $iddocto = $rwrec["docto_afectado"]; if ($idsocio != 1) { $nombre = getNombreSocio($idsocio); } else { $rfc = "N/A"; $curp = "N/A"; $domicilio = "PARTE RELACIONADA DE LA EMPRESA"; $nombre = mifila($sqlrec, "cadena_distributiva"); } echo "<hr>\n\t\t<table border='0' width='100%'>\n\t\t<tr>\n\t\t\t<th width='10%'>Referencia:</th>\n\t\t\t<td with='10%'>{$idrecibo} | {$iddocto}</td>\n\t\t\t<td width='80%'>" . DEFAULT_NOMBRE_LOCALIDAD . ", " . DEFAULT_NOMBRE_ESTADO . "; " . fecha_larga($rwrec[1]) . "</td>\n\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Socio</th>\n\t\t\t<td colspan='2'>[ {$idsocio} ] {$nombre}</td>\n\t\t\t\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>Domicilio</th>\n\t\t\t<td colspan='2'>{$domicilio}</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<th>R.F.C./C.U.R.P.</th>\n\t\t\t<td>{$rfc} / {$curp}</td>\n\t\t\t<td />\n\t\t</tr>\n\t\t</table>\n\t\t<hr>"; $monto = getFMoney($rwrec[5]); $letras = convertirletras($rwrec[5]); $parrafo = ""; if ($rwrec[4] == 32) { $parrafo = "<p>ESTA CANTIDAD TENDRA UN CARACTER DEVOLUTIVO, CONFORME A LAS POLITICAS VIGENTES DE LA SOCIEDAD;\n\t\t\t EN DADO CASO QUE NO LO RETORNE DIRECTAMENTE EN CAJA, SER&Acute; CARGADO A MI CUENTA Y SE DESCONTARA DIRECTAMENTE\n\t\t\t A MI SALARIO AL NO PRESENTAR PAGO ANTES DE LA FECHA DE VENCIMIENTO</p>"; } elseif ($rwrec[4] == 31) { $parrafo = "<p>ESTA CANTIDAD TENDRA UN CARACTER DEVOLUTIVO, CONFORME A LAS POLITICAS VIGENTES DE LA SOCIEDAD;\n\t\t\t EN DADO CASO QUE NO LO RETORNE DIRECTAMENTE EN CAJA, SER� CARGADO A MI CUENTA Y SE DESCONTARA DIRECTAMENTE\n\t\t\t A MI SALARIO AL NO PRESENTAR PAGO ANTES DE LA FECHA DE VENCIMIENTO</p>"; } else { $parrafo = ""; } $tiporec = eltipo("operaciones_recibostipo", $rwrec[4]); // RECIBO echo "<table width ='100%'>\n\t\t\t\t<tr>\n\t\t\t\t\t<td> RECIBI DE <b>" . EACP_NAME . "</b> LA CANTIDAD DE \$ <b>{$monto}</b> --- SON :(<b>{$letras}</b>)---;\n\t\t\t\t\t\tCANTIDAD RECIBIDA POR CONCEPTO DE <b>{$tiporec}</b> EN EFECTIVO, A MI ENTERA SATISFACCION.\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>\n\t\t\t\t\t\t{$parrafo}\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>OBSERVACIONES: {$rwrec['7']}<td>\n\t\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t</table>\n\t\t<hr>"; } @mysql_free_result($rsrec); echo "<table border='0' >\n\t<tr>\n\t<td><center>Firma de Conformidad</center></td>\n\t<td><center>Entrega el Recurso</center></td>\n\t</tr>\n\t<tr>\n\t<td><br><br><br></td>\n\t</tr>\n\t<tr>\n\t<td><center>{$nombre}</center></td>\n\t<td><center>{$oficial}</center></td>\n\t</tr>\n\t</table>";
if ($monto > 0) { $monto = getFMoney($monto); $tde = "<td class='mny'>{$monto}</td>\n\t\t\t<td></td>"; } else { $monto = getFMoney($monto); $tde = "<td></td>\n\t\t\t<td class='mny'>{$monto}</td>"; } $tds = $tds . "\n\t\t<tr>\n\t\t\t<td>{$rw['2']}</td>\n\t\t\t<td>{$rw['5']}</td>\n\t\t\t<td>{$rw['3']}</td>\n\t\t\t<td class='mny'>" . getFMoney($rw[6]) . "</td>\n\t\t\t{$tde}\n\n\t\t</tr>"; } @mysql_free_result($rsf); $sql_suma_E = "SELECT * FROM sumas_flujo_efectivo WHERE solicitud={$idsolicitud} AND tipo=2"; $suma_E = getFMoney(mifila($sql_suma_E, "sumas")); $sql_suma_I = "SELECT * FROM sumas_flujo_efectivo WHERE solicitud={$idsolicitud} AND tipo=1"; $suma_I = getFMoney(mifila($sql_suma_I, "sumas")); $neto = $suma_I + $suma_E; $neto = getFMoney($neto); echo "\n\t<fieldset>\n\t<legend>[ Flujo de Efectivo ]</legend>\n\t<table width='100%'>\n <tr>\n <th>Origen</th>\n <th>Descripción</th>\n <th>Frecuencia</th>\n <th>Declarado</th>\n <th>INGRESOS</th>\n <th>EGRESOS</th>\n\n </tr>\n \t\t{$tds}\n\t<tr>\n\n\t<th colspan='2'>CAPACIDAD DIARIA</th>\n\t<th>{$neto}</th>\n\t<td>SUMAS</td>\n\t<th>{$suma_I}</th>\n\t<th>{$suma_E}</th>\n\t</tr>\n</table>\n</fieldset>\n"; } // relacion patrimonial if ($sipatrimonio == "yes") { echo "<fieldset>\n\t\t\t<legend>[ Balance Patrimonial ]</legend>"; $sqlactivos = "SELECT socios_patrimoniotipo.descripcion_patrimoniotipo AS 'Tipo_de_patrimonio', socios_patrimonio.monto_patrimonio AS 'Monto_Patrimonio', "; $sqlactivos .= " socios_patrimonio.fecha_expiracion AS 'Fecha_Expiracion', socios_patrimonio.documento_presentado AS 'Documento_Presentado' "; $sqlactivos .= " FROM socios_patrimonio, socios_patrimoniotipo WHERE socios_patrimonio.socio_patrimonio={$idsocio} "; $sqlactivos .= " AND socios_patrimoniotipo.idsocios_patrimoniotipo=socios_patrimonio.tipo_patrimonio"; // activos. //echo $sqlactivos; sqltabla($sqlactivos, "", "fieldnames"); echo "</fieldset>"; } // garantias
//Actualizar pago de letra a saldo de capital si existe. if ($credito_abonado == true) { $xPlan->init(); $saldo_letra = $xCred->getSaldoActual(); $xPlan->setActualizarParcialidad($letra, $saldo_letra); } } } //2015-01-05 Agregar Bonificaciones if ($bonificaciones != 0) { $xPlan->addBonificacion($bonificaciones, $fecha_de_pago, $letra, $tipo_monto_extra); } //=================================================================================================================================== $TParcial = $parcialidad_ahorro + $parcialidad_capital + $parcialidad_cargo + $parcialidad_interes + $parcialidad_iva - $bonificaciones; $msgM .= "{$socio}\t{$solicitud}\tPer. {$letra}\t{$dias_normales},{$sumar_dias}\t" . getFMoney($saldo_inicial) . "\t" . getFMoney($saldo_final) . "\t" . getFMoney($parcialidad_capital) . ""; $msgM .= "\t" . getFMoney($parcialidad_interes) . "\t" . getFMoney($parcialidad_iva) . "\t" . getFMoney($parcialidad_cargo) . "\t" . getFMoney($parcialidad_ahorro) . "\t" . getFMoney($TParcial) . "\t{$fecha_de_referencia}\t{$fecha_de_pago}\r\n"; } //end FOR $fecha_final = $fecha_de_pago; $fecha_de_vencimiento = $fecha_final; $dias_netos = restarfechas($fecha_final, $fecha_ministracion); $dias_normales = $dias_netos; $interes_diario = $total_de_intereses / $dias_netos; //=================================================================================================================================== $OProd = $xCred->getOProductoDeCredito(); $OPer = $xCred->getOPeriocidad(); $fecha_de_mora = $xF->setSumarDias($OProd->getDiasTolerados() + 1, $fecha_de_vencimiento); $vencimiento_dinamico = $xF->setSumarDias($OPer->getDiasToleradosEnVencer(), $fecha_de_mora); $arrUpdate = array("plazo_en_dias" => $dias_netos, "dias_autorizados" => $dias_netos, "fecha_vencimiento" => $fecha_de_vencimiento, "monto_parcialidad" => $primera_parcialidad, "contrato_corriente_relacionado" => $cuenta_captacion, "tipo_de_pago" => $FormaDePago, "fecha_ministracion" => $fecha_ministracion, "interes_diario" => $interes_diario, "fecha_mora" => $fecha_de_mora, "fecha_vencimiento_dinamico" => $vencimiento_dinamico, "fecha_de_primer_pago" => $fecha_primer_abono); if ($xCred->getSaldoActual() == $xCred->getMontoAutorizado() or $xCred->getEsAfectable() == false) { $arrUpdate["ultimo_periodo_afectado"] = SYS_CERO;
function initPagosEfectuados($data = false, $fecha_de_corte = false) { $xF = new cFecha(); $fecha_minis = $xF->getInt($this->getFechaDeMinistracion()); $fecha_de_corte = $xF->getInt($fecha_de_corte); if ($this->mInitPagos == false) { //comparar pagos con letras $sql = "SELECT * FROM `creditos_abonos_parciales` WHERE docto_afectado=" . $this->mNumeroCredito; $mq = new MQL(); $data = $data == false ? $mq->getDataRecord($sql) : $data; $cnt = 1; $OProd = $this->getOProductoDeCredito(); $this->mMontoCapitalPagado = 0; $this->mMontoInteresPagado = 0; $this->mMontoMoraPagado = 0; $this->mMontoUltimoPago = 0; $this->mFechaUltimoPago = $this->getFechaDeMinistracion(); $this->mAbonosAcumulados = 0; if ($fecha_minis > $fecha_de_corte) { $this->mMessages .= "WARN\tCREDITO OMITIDO\r\n"; //$this->mFechaUltimoMvtoCapital = $this->getFechaDeMinistracion(); } else { foreach ($data as $row) { $idparcial = $row["periodo_socio"]; $fecha_op = $xF->getInt($row["fecha_de_pago"]); if ($fecha_op > $fecha_de_corte) { $this->mMessages .= "WARN\tPARCIALIDAD {$idparcial} de fecha " . $row["fecha_de_pago"] . " OMITIDA\r\n"; } else { $this->mPagos[$idparcial][SYS_MONTO] = $row["total"]; $this->mPagos[$idparcial][SYS_FECHA] = $row["fecha_de_pago"]; $this->mPagos[$idparcial][SYS_INTERES_NORMAL] = $row["interes_normal"]; $this->mPagos[$idparcial][SYS_INTERES_MORATORIO] = $row["interes_moratorio"]; $this->mPagos[$idparcial][SYS_VARIOS] = $row["otros"]; $this->mPagos[$idparcial][SYS_CAPITAL] = $row["capital"]; $this->mPagos[$idparcial][SYS_IMPUESTOS] = $row["impuesto"]; //$this->mMessages .= "OK\t$idparcial\t" . $row["fecha_de_pago"] . "\t" . $row["capital"] . "\t" . $row["interes_normal"] . "\t" . $row["total"] ."\r\n"; //elegir si es plan de pagos if ($this->getPeriocidadDePago() == CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) { $this->mPagos[$idparcial][SYS_ESTADO] = CREDITO_ESTADO_VIGENTE; } else { //$fecha_de_pago = $xPlan->getFechaDePago($fecha_de_referencia, $simletras1); $fecha_de_pago = $this->getFechaEstimadaPorNumeroDePago($idparcial); //Agregar tolerancia de pagos $fecha_de_pago = $xF->setSumarDias($OProd->getDiasTolerados(), $fecha_de_pago); $this->mPagos[$idparcial][SYS_ESTADO] = CREDITO_ESTADO_VIGENTE; if ($xF->getInt($row["fecha_de_pago"]) > $xF->getInt($fecha_de_pago)) { $this->mPagos[$idparcial][SYS_ESTADO] = CREDITO_ESTADO_VENCIDO; $this->mMessages .= "WARN\t{$idparcial}\tPago {$idparcial} cambiado a Vencido\r\n"; } //si es vencido y la fecha de primer atraso es null if ($this->mPagos[$idparcial][SYS_ESTADO] == CREDITO_ESTADO_VENCIDO and $this->mFechaPrimerAtraso == null) { $this->mFechaPrimerAtraso = $row["fecha_de_pago"]; $this->mMessages .= "ERROR\t{$idparcial}\tFecha de Primera atraso a " . $this->mFechaPrimerAtraso . " \r\n"; } } //estado estado del credito $this->mMontoCapitalPagado += $row["capital"]; $this->mMontoInteresPagado += $row["interes_normal"]; $this->mMontoMoraPagado += $row["interes_moratorio"]; if ($cnt == 1) { $this->mDPrimerPagoEfect = $this->mPagos[$idparcial]; } $this->mDUltimoPagoEfect = $this->mPagos[$idparcial]; $this->mMontoUltimoPago = $row["total"]; $this->mFechaUltimoPago = $row["fecha_de_pago"]; $this->mMessages .= "OK\t{$idparcial}\tFecha de ultimos datos establecidos a (" . getFMoney($row["total"]) . ") y Fecha " . $row["fecha_de_pago"] . " \r\n"; $this->mAbonosAcumulados += $row["capital"]; $this->mFechaAcumulada = $row["fecha_de_pago"]; //SALDO INSOLUTO SEGUN LA LETRA $this->mPagos[$idparcial][SYS_SALDO] = setNoMenorQueCero($this->getMontoAutorizado() - $this->mAbonosAcumulados); } $cnt++; } $this->mInitPagos = true; } } return $this->mInitPagos; }
$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%'>Fecha</th><th width='4%'>CI</th><th width='3%'>Parc.</th><th width='25%'>Operacion</th>\n\t\t\t\t\t<th width='9%'>Capital</th><th width='9%'>Intereses</th><th width='9%'>IVA</th><th width='9%'>Otros</th>\n\t\t\t\t\t<th width='9%'>Saldo De Capital</th><th width='19%'>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\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(); ?> </body> <script></script> </html> <?php }
$tasa = $dcuentas["tasa_otorgada"]; $capital = $dcuentas["saldo_cuenta"]; // + $ide);( $vencimiento = sumardias($dcuentas["inversion_fecha_vcto"], $dias); $interes = $capital * $dias * $tasa / EACP_DIAS_INTERES; $xSoc = new cSocio($idsocio); $xSoc->init(); $DSoc = $xSoc->getDatosInArray(); $domicilio_del_socio = $xSoc->getDomicilio(); $nombre_del_socio = $xSoc->getNombreCompleto(); $numero_de_socio = $idsocio; $tasa = getFMoney($tasa * 100); $isr = getISRByInversion($capital, $dias); $aliquidar = $capital + $interes - $isr; $nombre = $nombre_del_socio; echo "\n\t<p class='bigtitle'>CONSTANCIA PROVISIONAL DE DEPOSITO A PLAZO</p>\n\t<hr />"; // obtiene datos del socio $direccion = $domicilio_del_socio; $rfc = $DSoc["rfc"]; $curp = $DSoc["curp"]; // echo $xSoc->getFicha(); echo $xInv->getFicha(true); ?> <hr /> <?php echo "\n<table width='75%'>\n <tr>\n <td width='15%'> </td>\n <td width='15%'> </td>\n\n <th>Fecha de Apertura:</th>\n <td>{$dcuentas['5']}</td>\n <td> </td>\n\n </tr>\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Fecha de Vencimiento:</th>\n <td>{$vencimiento}</td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <td></td>\n <td></td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Dias Invertidos:</th>\n <td class='mny'>{$dcuentas['15']}</td>\n <td> </td>\n\n </tr>\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Tasa Otorgada</th>\n <td class='mny'>{$tasa} %</td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <td></td>\n <td></td>\n <td> </td>\n\n </tr>\n\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Capital Invertido:</th>\n <td class='mny'>" . getFMoney($capital) . "</td>\n <td> </td>\n\n </tr>\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>Interes Generado:</th>\n <th class='mny'>" . getFMoney($interes) . "</th>\n <td>{$dmvto['0']}</td>\n </tr>\n<!--ISR -->\n <tr>\n <td> </td>\n <td> </td>\n\n <th>ISR a Retener:</th>\n <th class='mny'>(" . getFMoney($isr) . ")</th>\n <td></td>\n </tr>\n<!-- IDE -->\n<!-- <tr>\n <td> </td>\n <td> </td>\n\n <th>IDE Retenido:</th>\n <th class='mny'>(" . getFMoney($ide) . ")</th>\n <td></td>\n </tr> -->\n\n <tr>\n <td> </td>\n <td> </td>\n\n <th>A Liquidar</th>\n <td class='mny'>" . getFMoney($aliquidar) . "</td>\n <td> </td>\n </tr>\n <tr>\n \t<td />\n \t<td />\n \t<th colspan='3'>" . convertirletras($aliquidar) . "</th>\n </tr>\n</table>\n<hr /><table border='0' width='100%'>\n\t<tr>\n\t<td><center>Firma de CONFORMIDAD</td>\n\t<td><center>GENERO LA REINVERSION</center></td>\n\t</tr>\n\t<tr>\n\t<td><br /><br ><br /></td>\n\t</tr>\n\t<tr>\n\t<td><center>{$nombre}\n\t</td>\n\t\t<td><center>{$oficial}</center></td>\n\t</tr>\n\t</table>\n\t<p class='legal'>Comprobante Provisional de Reinversion, solo para fines Informativos,\n\tya que la informacion contenida en esta cedula es de caracter\n\tprovisional y suceptible a que el Aceptante modifique los montos y/o plazos durante el lapso del Dia Laboral.</p>\n\t<p class='legal'>El Impuesto a Depositos en Efectivo Cobrado en esta transaccion es de " . getFMoney($ide) . " </p>\n"; echo getRawFooter(); ?> </body> </html>
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; }
if ($credito != $credito_anterior) { //resetear TR_child $TR_parent .= "\n\n \t\t\t\t{$TR_head}\n\n \t\t\t\t<tr>\n \t\t\t\t\t<td colspan='4'>\n \t\t\t\t\t\t<table width='100%'>\n \t\t\t\t\t\t\t<thead>\n \t\t\t\t\t\t\t\t<th width='10%'>[{$counter}]Recibo</th>\n \t\t\t\t\t\t\t\t<th width='15%'>Fecha</th>\n \t\t\t\t\t\t\t\t<th width='25%'>Operacion</th>\n \t\t\t\t\t\t\t\t<th width='20%'>Monto</th>\n \t\t\t\t\t\t\t\t<th width='30%'>Detalles</th>\n \t\t\t\t\t\t\t<thead>\n \t\t\t\t\t\t\t<tbody>\n \t\t\t\t\t\t\t\t{$TR_child}\n \t\t\t\t\t\t\t</tbody>\n \t\t\t\t\t\t</table>\n \t\t\t\t\t</td>\n \t\t\t\t\t<tr>\n \t\t\t\t\t\t<td colspan='4'> <hr /></td>\n \t\t\t\t\t</tr>\n \t\t\t\t</tr>\n \t\t\t\t"; $TR_child = ""; $TR_head = ""; } $TR_child .= "\n\t\t\t<tr>\n\t\t\t\t<td>" . $rw["recibo"] . "</td>\n\t\t\t\t<td>" . getFechaMX($rw["fecha"]) . "</td>\n\t\t\t\t<td>" . $rw["tipo_de_operacion"] . "</td>\n\t\t\t\t<td class='mny'>" . getFMoney($rw["monto"]) . "</td>\n\t\t\t\t<td>" . $rw["detalles"] . "</td>\n\t\t\t</tr>"; $sumCAP += $rw["monto_original"]; $sumSDO += $rw["saldo_insoluto"]; $TR_head = "\n\t\t\t\t<tr>\n\t\t\t\t\t<th class='izq'>Socio</th>\n\t\t\t\t\t<td>" . $rw["socio"] . "</td>\n\t \t\t\t\t<th class='izq'>Nombre\n\t \t\t\t\t</th><td>" . $rw["nombre"] . "</td>\n\t \t\t\t</tr>\n\t \t\t\t<tr>\n \t\t\t\t\t<th class='izq'>Numero de Solicitud</th>\n \t\t\t\t\t<td>" . $rw["solicitud"] . "</td>\n \t\t\t\t\t<th class='izq'>Fecha de Ministracion</th>\n \t\t\t\t\t<td>" . $rw["fecha_de_otorgamiento"] . "</td>\n \t\t\t\t</tr>\n \t\t\t\t<tr>\n\t \t\t\t\t<th class='izq'>Tipo de Convenio</th>\n\t \t\t\t\t<td>" . $rw["modalidad"] . "</td>\n\t \t\t\t\t<th class='izq'>Fecha de Vencimiento</th>\n\t \t\t\t\t<td>" . $rw["fecha_de_vencimiento"] . "</td>\n\t \t\t\t</tr>\n\t \t\t\t<tr>\n \t\t\t\t\t<th class='izq'>Periocidad</th>\n \t\t\t\t\t<td>" . $rw["condiciones_de_pago"] . "</td>\n \t\t\t\t\t<th class='izq'>Estatus</th>\n \t\t\t\t\t<td>" . $rw["estatus"] . "</td>\n\t \t\t\t</tr>\n\t \t\t\t<tr>\n\t \t\t\t\t<th class='izq'>Monto Ministrado</th>\n\t \t\t\t\t<td class='mny'>" . getFMoney($rw["monto_original"]) . "</td>\n\t \t\t\t\t<th class='izq'>Saldo Actual</th>\n\t \t\t\t\t<td class='mny'>" . getFMoney($rw["saldo_insoluto"]) . "</td>\n \t\t\t\t</tr>"; $credito_anterior = $credito; $counter++; } //Corregir el último //resetear TR_child $TR_parent .= "\n\t\t\n\t\t{$TR_head}\n\t\t\n\t\t<tr>\n\t\t<td colspan='4'>\n\t\t<table width='100%'>\n\t\t<thead>\n\t\t<th width='10%'>[{$counter}]Recibo</th>\n\t\t<th width='15%'>Fecha</th>\n\t\t<th width='25%'>Operacion</th>\n\t\t<th width='20%'>Monto</th>\n\t\t<th width='30%'>Detalles</th>\n\t\t<thead>\n\t\t<tbody>\n\t\t{$TR_child}\n\t\t</tbody>\n\t\t</table>\n\t\t</td>\n\t\t<tr>\n\t\t<td colspan='4'> <hr /></td>\n\t \t\t\t<tr>\n\t \t\t\t\t<th class='izq'>Monto Ministrado</th>\n\t \t\t\t\t<td class='mny'>" . getFMoney($sumCAP) . "</td>\n\t \t\t\t\t<th class='izq'>Saldo Actual</th>\n\t \t\t\t\t<td class='mny'>" . getFMoney($sumSDO) . "</td>\n \t\t\t\t</tr>\t\t\n\t\t</tr>\n\t\t</tr>\n\t\t"; ?> <!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 echo getRawHeader(); //Imprimir toda la Tabla echo "\n\t\t<table width='100%'>\n\t\t\t{$TR_parent}\n\t\t</table>";
function getRiesgoComunPorNucleoFamiliar($explain = false) { $sqlRC = "SELECT\n\t\t\t\tCOUNT(`socios_relaciones`.`numero_socio`) AS `relaciones`,\n\t\t\t\tCOUNT(`creditos_solicitud`.`numero_solicitud`) AS `creditos`,\n\t\t\t\tSUM(`creditos_solicitud`.`saldo_actual`) AS `monto`\n\t\t\tFROM\n\t\t\t\t`socios_relaciones` `socios_relaciones`\n\t\t\t\t\tINNER JOIN `eacp_config_bases_de_integracion_miembros` `eacp_config_bases_de_integracion_miembros`\n\t\t\t\t\tON `socios_relaciones`.`tipo_relacion` = `eacp_config_bases_de_integracion_miembros`.\n\t\t\t\t\t`miembro`\n\t\t\t\t\t\tINNER JOIN `creditos_solicitud` `creditos_solicitud`\n\t\t\t\t\t\tON `socios_relaciones`.`numero_socio` = `creditos_solicitud`.\n\t\t\t\t\t\t`numero_socio`\n\t\t\tWHERE\n\t\t\t\t(`socios_relaciones`.`socio_relacionado` = " . $this->mCodigo . ")\n\t\t\t\tAND\n\t\t\t\t(`creditos_solicitud`.`saldo_actual` >" . TOLERANCIA_SALDOS . ")\n\t\t\t\tAND\n\t\t\t\t(`eacp_config_bases_de_integracion_miembros`.`codigo_de_base` = 5001)\n\t\t\t\tAND\n\t\t\t\t(`socios_relaciones`.`consanguinidad` != 99)\n\t\t\tGROUP BY\n\t\t\t\t`eacp_config_bases_de_integracion_miembros`.`codigo_de_base`,\n\t\t\t\t`socios_relaciones`.`socio_relacionado`\n\t\t"; $aRxN = obten_filas($sqlRC); $activo = isset($aRxN["monto"]) ? true : false; if ($explain == false) { return $activo == false ? 0 : $aRxN["monto"]; } else { return $activo == false ? "" : "<fieldset>\n\t\t\t\t\t\t<legend>Riesgo Comun por Nucleo Familiar</legend>\n\t\t\t\t\t\t\tNúmero de Personas Relacionados : " . $aRxN["relaciones"] . " <br />\n\t\t\t\t\t\t\tNúmero de Creditos Relacionados : " . $aRxN["creditos"] . " <br />\n\t\t\t\t\t\t\tMonto de Creditos Relacionados : " . getFMoney($aRxN["monto"]) . "\n\t\t\t\t\t</fieldset>"; } }