function jsaSetDesvincularPersona($credito, $fecha, $observaciones)
{
    $msg = "";
    $xLng = new cLang();
    $xCred = new cCredito($credito);
    $xCred->init();
    $xdat = new cFecha(0);
    $fecha = $xdat->getFechaISO($fecha);
    $xCred->setResetPersonaAsociada($fecha, $observaciones);
    $oP = $xCred->getOPersona();
    $xEmp = new cEmpresas($xCred->getClaveDeEmpresa());
    $xEmp->init();
    $xRN = new cReglaDeNegocio();
    $xRN->setVariables(array("nombre_de_persona" => $oP->getNombreCompleto(), "mensaje" => $observaciones, "saldo_del_credito" => $xCred->getSaldoActual(), "nombre_de_la_empresa" => $xEmp->getNombreCorto()));
    $xRN->setExecuteActions($xRN->reglas()->RN_NOMINA_AL_DESVINCULAR);
    return $xLng->get(MSG_READY_SAVE);
}
 function setResetPersonaAsociada($fecha, $observaciones = "", $empresa = "")
 {
     $empresa = $empresa == "" ? FALLBACK_CLAVE_EMPRESA : $empresa;
     $xLng = new cLang();
     $txt = $xLng->get("saldo") . " : " . $this->getSaldoActual() . "; " . $xLng->get("empresa") . ":" . $this->getClaveDeEmpresa() . "/{$empresa} . {$observaciones}";
     //Agregar Memo a socio
     $xSoc = new cSocio($this->getClaveDePersona());
     $this->mMessages .= $xSoc->setNewMemo(MEMOS_TIPO_DESVINCULACION, $txt, $this->getNumeroDeCredito(), $fecha);
     $this->setUpdate(array("persona_asociada" => $empresa));
 }
 /**
  * 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>&nbsp;&nbsp;INFORMACI&Oacute;N DEL RECIBO&nbsp;&nbsp;</legend>\n\t\t\t\t\t\t\t\t{$exoFicha}\n\t\t\t\t\t\t\t</fieldset>";
         }
     }
     return $exoFicha;
 }
 function getListaDeDias($events = false)
 {
     $selDias = "";
     $xLn = new cLang();
     $dias = $xLn->get("dias");
     if (CAPTACION_INVERSIONES_POR_DIA == true) {
         $xTxt = new cHText();
         if (is_array($events)) {
             foreach ($events as $evento => $func) {
                 $xTxt->addEvent($func, $evento);
             }
         }
         $selDias = $xTxt->getNormal("iddias", INVERSION_DIAS_MINIMOS, "TR.Plazo de Inversion");
     } else {
         $xSel = new cHSelect();
         if (is_array($events)) {
             foreach ($events as $evento => $func) {
                 $xSel->addEvent($func, $evento);
             }
         }
         $xSel->addOptions(array(7 => "7 {$dias}", 14 => "14 {$dias}", 28 => "28 {$dias}", 30 => "30 {$dias}", 60 => "60 {$dias}", 90 => "90 {$dias}", 120 => "120 {$dias}", 180 => "180 {$dias}", 360 => "360 {$dias}"));
         $selDias = $xSel->get("iddias", "TR.Plazo de Inversion", INVERSION_DIAS_MINIMOS);
     }
     return $selDias;
 }
 function getFicha()
 {
     $xL = new cLang();
     $xF = new cFecha();
     $xTipo = $this->OTipoPoliza()->nombre_del_diario()->v();
     $table = "<table>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>" . $xL->get("fecha") . "</th><td>" . $xF->getFechaCorta($this->mFechaPoliza) . "</td>\n\t\t\t\t\t\t<th>" . $xL->get("tipo") . "</th><td>" . $xTipo . "</td>\n\t\t\t\t\t\t<th>" . $xL->get("numero") . "</th><td>" . $this->mNumeroDePoliza . "</td>\n\t\t\t\t\t\t<th>" . $xL->get("concepto") . "</th><td>" . $this->mConceptoPoliza . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>";
     return $table;
 }
 function getDeCuentaCaptacionInteres($id = "", $cuenta = false)
 {
     $id = $id == "" ? "idcuentainteres" : $id;
     $this->mArrProp["type"] = "number";
     $this->mArrProp["class"] = "mny";
     $this->mArrProp["name"] = $id;
     $this->mArrProp["maxlength"] = "18";
     $xLn = new cLang();
     if (setNoMenorQueCero($cuenta) > 0) {
         $this->mValue = $cuenta;
     }
     $this->addEvent("var xgc = new CaptGen(); xgc.getDescripcion(this.value, 'nombrecuentainteres');", "onblur");
     $this->mIncLabel = true;
     $this->addHTMLCode(CTRL_GOCUENTAS);
     $dSol = new cHInput("nombrecuentainteres", "", $xLn->getT("TR.Descripcion de la Cuenta de Interes"));
     $dSol->setIncludeLabel(false);
     $dSol->setProperty("name", "nombrecuentainteres");
     $dSol->setProperty("disabled", "true");
     $this->setDivClass("tx14");
     $dSol->setDivClass("tx34");
     return "<div class='tx1' id='div{$id}'> " . $this->get($id, $cuenta, $xLn->get("numero_de_cuenta")) . $dSol->get("nombrecuentainteres") . "</div>";
 }