function jsaGetLocalidades($estado, $municipio, $pais, $cp)
{
    $xSel = new cHSelect();
    $text = new cHText();
    $txt = "";
    $mun = false;
    if (setNoMenorQueCero($cp) > 0) {
        if ($pais == EACP_CLAVE_DE_PAIS) {
            $xCol = new cDomiciliosColonias();
            $xCol->existe($cp);
            $mun = $xCol->getClaveDeMunicipio();
            //$xCol->getNombreMunicipio();
        }
    }
    if (PERSONAS_VIVIENDA_MANUAL == true) {
        $text->setDivClass("");
        $txt = $text->getDeNombreDeLocalidad("idnombrelocalidad", "", "TR.Localidad");
    } else {
        $xS = $xSel->getListaDeLocalidades("", $estado, $pais);
        $txt = $xS->get(false);
        if ($xS->getCountRows() <= 0) {
            //Corregir si no hay registros
            $text->setDivClass("");
            $txt = $text->getDeNombreDeLocalidad("idnombrelocalidad", "", "TR.Localidad");
        }
    }
    return $txt;
}
function jsaReRelaciones($idsocio)
{
    //Checar compatibilidad numerica entre los dependientes economicos
    $sqlL = new cSQLListas();
    $cBenef = new cTabla($sqlL->getListadoDeRelaciones($idsocio));
    $xTbl = new cHTabla("idtblrels");
    $xHSel = new cHSelect();
    $xChk = new cHCheckBox();
    $xText = new cHText();
    $xText->setDivClass("");
    $xChk->setDivClass("");
    $xBtn = new cHButton();
    $xUl = new cHUl();
    $li = $xUl->getO();
    $li->setT("ul");
    $li->setClass("tags blue");
    $li->add($xBtn->getBasic("TR.Guadar", "jsGuardarReferencia()", $xBtn->ic()->GUARDAR, "idguardar", false, true), "");
    $xTbl->initRow();
    $xTbl->addTD($xText->getDeNombreDePersona());
    $xTbl->addTD($xHSel->getListaDeTiposDeRelaciones("", "")->get(""));
    $xTbl->addTD($xHSel->getListaDeTiposDeParentesco()->get(""));
    $xTbl->addTD($xChk->get("TR.es dependiente_economico", "dependiente"));
    $xTbl->addRaw("<td class='toolbar-24'>" . $xUl->get() . "</td>");
    $xTbl->endRow();
    $cBenef->addTool(1);
    $cBenef->addTool(2);
    $cBenef->setKeyField("idsocios_relaciones");
    return $xTbl->get() . $cBenef->Show();
}
function jsaGetValidacion($persona, $producto, $origen)
{
    $html = "";
    $xPd = new cCaptacionProducto($producto);
    if ($xPd->getClase() == CAPTACION_TIPO_PLAZO) {
        $html .= $xPd->getListaDeDias();
    }
    if ($xPd->getDestinoInteres() == CAPTACION_DESTINO_CTA_INTERES) {
        $xTxt2 = new cHText();
        $xSoc = new cSocio($persona);
        $xSoc->init();
        $html .= $xTxt2->getDeCuentaCaptacionInteres("", $xSoc->getCuentaDeCaptacionPrimaria(CAPTACION_TIPO_VISTA, CAPTACION_PRODUCTO_INTERESES));
    }
    //
    return $html;
}
$jxc = new TinyAjax();
function jsaGetIDE($socio, $monto, $tipo_de_pago)
{
    $xSoc = new cSocio($socio);
    $xSoc->init();
    $x = $xSoc->getIDExPagarByPeriodo(false, $monto, $tipo_de_pago);
    $tab = new TinyAjaxBehavior();
    $tab->add(TabSetValue::getBehavior("idide", $x));
    return $tab->getString();
}
$jxc->exportFunction('jsaGetIDE', array('idsocio', "idmonto", "idtipo_pago"));
$jxc->process();
echo $xHP->getHeader();
$xFRM = new cHForm("depositoahorro", "frmdepositoinversion.php?action=next");
$xBtn = new cHButton();
$xTxt = new cHText();
$xDate = new cHDate();
$xSel = new cHSelect();
$xFRM->setTitle($xHP->getTitle());
?>
<body <?php 
echo $actload;
?>
 >
<?php 
$xFRM->setTitle($xHP->getTitle());
if ($action == SYS_NINGUNO) {
    $xFRM->addCuentaCaptacionBasico(true, CAPTACION_TIPO_PLAZO);
    $xFRM->addSubmit();
    $xFRM->addHElem($xTxt->getDeMoneda("idmonto", "TR.deposito", 0, true));
    $xFRM->addCobroBasico();
//<=====	FIN_H
$iduser = $_SESSION["log_id"];
//=====================================================================================================
require_once "." . TINYAJAX_PATH . "/TinyAjax.php";
$cuenta = isset($_POST["NumeroDeCuenta"]) ? $_POST["NumeroDeCuenta"] : false;
$xP = new cHPage("Guia Contable");
$xP->setIncludes();
echo $xP->getHeader();
$oficial = elusuario($iduser);
$jxc = new TinyAjax();
function jsaSaveOperacion($cuenta, $operacion, $descripcion)
{
}
$jxc->exportFunction('jsaSaveOperacion', array('idCuenta', 'idOperacion', 'idDescripcion'));
$jxc->process();
$xHTxt = new cHText("id");
$xHTxt->setIncludeLabel();
$jsb = new jsBasicForm("frmGuia");
$jsb->setIncludeJQuery();
$jsb->show();
$jxc->drawJavaScript(false, true);
?>
<style>

#wrapper {
    width:600px;
}
ul.tabs {
    width:600px;
    margin:0;
    padding:0;
$jxc->exportFunction('jsaCambiarEstadoActual', array('idsolicitud', 'idestadoactual', 'idfecha-3'), "#avisos");
$jxc->exportFunction('jsaVincularEmpresa', array('idsolicitud', 'idobservacionesw', 'idcodigodeempresas'), "#avisos");
$jxc->exportFunction('jsaCambiarProducto', array('idsolicitud', 'idpdto', 'idtasa', 'idtasamora'), "#avisos");
$jxc->exportFunction('jsaCambiarPeriocidad', array('idsolicitud', 'idperiocidad', 'idtipopago', 'idpagos', 'idfecha-2', 'idpagoactual'), "#avisos");
$jxc->exportFunction('jsaEliminarCredito', array('idsolicitud'), "#avisos");
$jxc->exportFunction('jsaReestructurarIntereses', array('idsolicitud'), "#avisos");
$jxc->exportFunction('jsaSetCambiarPersona', array('idsolicitud', 'idnuevapersona'), "#avisos");
//
$jxc->process();
$xHP->init();
echo "<input type='hidden' id='idsolicitud' value='{$credito}'>";
$xCred = new cCredito($credito);
$xCred->init();
$xFRM = new cHForm("frmrenegociar", "./", "idfrmmain");
$oBtn = new cHButton();
$oTxt = new cHText();
$oHSel = new cHSelect();
$oFch = new cHDate(0);
$oSel = new cSelect("");
$oUL = new cHUl();
$lguardar = $xFRM->lang("guardar");
$lcancelar = $xFRM->lang("cancelar");
$xFRM->setTitle($xHP->getTitle());
$xFRM->OButton("TR.Cambiar Monto Ministrado", "jsCambiarMonto()", "mas-dinero", "idcambiarmonto");
$xFRM->OButton("TR.Cambiar Fecha de Ministracion", "jsCambiarFechaMinistracion()", "fecha", "idcmdministracion");
//$xFRM->addHElem( $oBtn->getBasic("Fecha de Autorizacion", "jsCambiarFechaAutorizacion", "fecha", "idcmdautorizacion" ) );
$xFRM->OButton("TR.Cambiar Monto Autorizado", "jsCambiarMontoAutorizado()", "dinero", "idcambiarmontoaut");
$xFRM->OButton("TR.Cambiar Estado", "jsCambiarEstado()", "trabajo", "idcambiarestado");
$xFRM->OButton("TR.Cambiar Producto", "jsCambiarProducto()", "colaborar", "idcambiarpdto");
$xFRM->OButton("TR.Cambiar Periocidad", "jsCambiarPeriocidad()", "calendario", "idcambiarpers");
if ($xCred->getPeriocidadDePago() != CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) {
 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;
 }
$jxc->process();
$persona = parametro("persona", DEFAULT_SOCIO, MQL_INT);
$persona = parametro("socio", $persona, MQL_INT);
$persona = parametro("idsocio", $persona, MQL_INT);
$credito = parametro("credito", DEFAULT_CREDITO, MQL_INT);
$credito = parametro("idsolicitud", $credito, MQL_INT);
$credito = parametro("solicitud", $credito, MQL_INT);
$cuenta = parametro("cuenta", DEFAULT_CUENTA_CORRIENTE, MQL_INT);
$cuenta = parametro("idcuenta", $cuenta, MQL_INT);
$jscallback = parametro("callback");
$tiny = parametro("tiny");
$form = parametro("form");
$action = parametro("action", SYS_NINGUNO);
$xHP->init();
$xFRM = new cHForm("frmbuscargrupos", "./");
$xTxt = new cHText();
$msg = "";
//$xFRM->OText("idbusqueda", "", "TR.Buscar Grupo");
//$xFRM->addHElem(  );
$xTxt->setDivClass("");
$xTxt->addEvent("jsaGetGrupos()", "onkeyup");
$xFRM->addDivSolo($xTxt->getNormal("idbusqueda", "", "TR.Nombre"), " ");
$xFRM->OButton("TR.Buscar", "jsaGetGrupos()", "buscar");
$xFRM->addHTML("<div class='tx1' id='listabusqueda'></div>");
//$xFRM->addJsBasico();
//$xFRM->addCreditBasico();
//$xFRM->addSubmit();
echo $xFRM->get();
$jxc->drawJavaScript(false, true);
?>
<script>
    $monto = $xRec->getTotal();
    $documento = $xRec->getCodigoDeDocumento();
    $recibo = $cargar;
    $fecha = $xRec->getFechaDeRecibo();
    $operacion = BANCOS_OPERACION_DEPOSITO;
    $socio = $xRec->getCodigoDeSocio();
    $xSoc = new cSocio($socio, true);
    $beneficiario = $xSoc->getNombreCompleto();
}
$jsb = new jsBasicForm("bancos_operaciones", iDE_OPERACION);
$jsb->setIncludeOnlyCommons();
//$jsb->show();
//$jxc ->drawJavaScript(false, true);
echo $jsb->setIncludeJQuery();
echo $xHP->setBodyinit();
$xTxt = new cHText();
$xBtn = new cHButton();
$xFRM = new cHForm("bancos_operaciones", "movimientos_bancarios.frm.php");
//id,	label value, size,	class,	options[])
$xSel = new cSelect("idcuenta", "idcuenta", TBANCOS_CUENTAS);
$xSel->setOptionSelect($numero_de_cuenta);
$xHSel = new cHSelect();
$xHSel->addOptions(array("cheque" => "Cheque", "deposito" => "Deposito", "retiro" => "Retiro"));
$selOperacion = $xHSel->get("idoperacion", "operacion", $operacion);
$xHSel->setClearOptions();
$xHSel->addOptions(array("autorizado" => "Autorizado", "noautorizado" => "No Autorizdo", "cancelado" => "Cancelado"));
$selEstatus = $xHSel->get("idestatus", "Estatus", $estado);
$xF = new cHDate(0, $fecha, TIPO_FECHA_OPERATIVA);
$xFRM->addHElem($xF->get("Fecha de Operacion"));
$xFRM->addHElem($xSel->get("Cuenta", true));
$xFRM->addHElem($selOperacion);
    if ($xCierre->checkCierre($fecha) == true) {
        $msg .= $xCierre->getMessages();
    } else {
        $status = $xCierre->check5Cierres($fecha, true);
        if ($status[SYS_ESTADO] == false and MODO_DEBUG == false) {
            $msg .= $xCierre->getMessages();
        } else {
            header("Location: ../frmutils/cierre_de_colocacion.frm.php?k=" . MY_KEY . "&s=true&f=" . $fecha);
            exit;
        }
    }
}
$xHP->init('jsaGetListadoCierres()');
$xFRM = new cHForm("frmcierre", "frmcierredeldia.php?action=1");
$xBtn = new cHButton();
$xTxt = new cHText();
$xDate = new cHDate();
$xSel = new cHSelect();
$xFRM->addSubmit("TR.Cerrar Dia", "jsChecarAbiertas()");
$xFRM->OButton("TR.Salir", "var xG = new Gen(); xG.salir();", "salir");
$xFRM->addJsBasico();
$xDate->addEvents(" onchange='jsGetListaDeCierres()' ");
$xFRM->addHElem($xDate->get("TR.Fecha de corte", $fecha));
$xFRM->addHElem($xTxt->getNumero("periodo_actual", EACP_PER_SOLICITUDES, "TR.Periodo Actual de Creditos"));
$xFRM->addObservaciones();
$xFRM->addHTML("<div id='listados'></div>");
$xFRM->addAviso($msg);
echo $xFRM->get();
?>
<script>
	function jsToCerrarCorte(f){ var xT = new TesGen(); xT.goCerrarCaja(f);  }
        $banco = $xBanc->getClaveDeBanco();
        $CuentaBancaria = $xBanc->getNumeroDeCuenta();
    }
    $msg .= $xRec->getMessages(OUT_TXT);
}
//$jxc = new TinyAjax();
//$jxc ->exportFunction('datos_del_pago', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
//$jxc ->process();
echo $xHP->getHeader();
$jsb = new jsBasicForm("tesoreria_operaciones", iDE_OPERACION);
$jsb->setIncludeOnlyCommons();
//$jxc ->drawJavaScript(false, true);
echo $xHP->setBodyinit();
$xFRM = new cHForm("tesoreria_operaciones", "./tesoreria_operaciones.frm.php");
$xBtn = new cHButton();
$xTxt = new cHText();
$xTest = new cCaja();
//$xTest->addOperacion($recibo, )
$xHCob = new cHCobros();
$xHSel = new cHSelect();
$xHSel->addOptions(array(1 => "INGRESO", 0 => "NINGUNO", -1 => "EGRESO"));
$xHSel->setDefault(SYS_UNO);
//$selOperacion		= $xHSel->get("idoperacion", "operacion", $operacion);
$xSel = new cSelect("idbanco", "idbanco", TBANCOS_ENTIDADES);
$xSel->setOptionSelect($banco);
$xSel2 = new cSelect("idcuenta", "idcuenta", TBANCOS_CUENTAS);
$xSel2->setOptionSelect($CuentaBancaria);
/*
SELECT idtesoreria_cajas_movimientos, codigo_de_caja, idusuario, documento, recibo, tipo_de_movimiento, tipo_de_exposicion, fecha, hora,
monto_del_movimiento, monto_recibido, monto_en_cambio, banco, numero_de_cheque,
observaciones, sucursal,
$permiso = getSIPAKALPermissions($theFile);
if ($permiso === false) {
    header("location:../404.php?i=999");
}
$_SESSION["current_file"] = addslashes($theFile);
//<=====	FIN_H
//=====================================================================================================
$xP = new cHPage("Cobranza.- Efectivo");
$xJS = new jsBasicForm("frmCobrosEnCheque");
//=========================== AJAX
$jxc = new TinyAjax();
$jxc->exportFunction('getLetras', array('iMontoCheque1'), "#avisos");
function getLetras($total)
{
    return $total > 0 ? "(" . convertirletras($total) . ")" : "";
}
$xP->setBodyinit();
$jxc->exportFunction('getLetras', array('iMontoCheque1'), "#avisos");
$jxc->process();
$xFrm = new cHForm("frmCobrosEnEfectivo", "cobro-efectivo.frm.php");
$xTxt = new cHText("id");
$xDat = new cHDate();
$xSel1 = new cSelect("iBancos1", "iBancos1", TBANCOS_ENTIDADES);
$xFrm->addHElem(array($xSel1->get("Banco de deposito"), $xDat->get("Fecha de Deposito"), $xTxt->getDeMoneda("iMonto", "Monto", 0)));
$xFrm->addHElem("<div class='title'>TOTAL : <mark id='idtotal'>0</mark></div>");
$xFrm->addHTML("<input type='hidden' id='iRecibo' name='iRecibo' value='{$recibo}' />");
$xFrm->addHTML("<input type='hidden' id='iDiferencia' name='iDiferencia' value='0' />");
$xFrm->addHTML("<input type='hidden' id='iTotal' name='iTotal' value='{$MontoOperacion}' />");
$xFrm->addHTML("<div id='avisos'></div>");
echo $xFrm->get();
$xP->setBodyEnd();
$fecha = parametro("idfecha-0", false, MQL_DATE);
$fecha = parametro("idfechaactual", $fecha, MQL_DATE);
$persona = parametro("persona", DEFAULT_SOCIO, MQL_INT);
$persona = parametro("socio", $persona, MQL_INT);
$persona = parametro("idsocio", $persona, MQL_INT);
$credito = parametro("credito", DEFAULT_CREDITO, MQL_INT);
$credito = parametro("idsolicitud", $credito, MQL_INT);
$credito = parametro("solicitud", $credito, MQL_INT);
$cuenta = parametro("cuenta", DEFAULT_CUENTA_CORRIENTE, MQL_INT);
$cuenta = parametro("idcuenta", $cuenta, MQL_INT);
$jscallback = parametro("callback");
$tiny = parametro("tiny");
$form = parametro("form");
$action = parametro("action", SYS_NINGUNO);
$xHP->init();
$xTxt = new cHText();
$xSel = new cHSelect();
/* ===========		FORMULARIO		============*/
$clave = parametro("clave_de_riesgo", null, MQL_INT);
$xTabla = new cAml_risk_register();
if ($clave != null) {
    $xTabla->setData($xTabla->query()->initByID($clave));
}
$xTabla->setData($_REQUEST);
$clave = parametro("id", null, MQL_INT);
$xSel = new cHSelect();
if ($clave == null) {
    $step = MQL_ADD;
    $clave = $xTabla->query()->getLastID() + 1;
    $xTabla->clave_de_riesgo($clave);
} else {
    $xRec = new cReciboDeOperacion(false, false, $recibo);
    $xRec->init();
    $DRec = $xRec->getDatosInArray();
    $MontoOperacion = $DRec["total_operacion"];
    //=========================== HTML
    echo $xHP->getHeader();
    //echo $xJS->setIncludeJQuery();
    $jxc->drawJavaScript(false, true);
    echo $xHP->setBodyinit("initComponents()");
    ?>
 <style> #idavisopago, #idimporte, #iMontoRecibido { font-size : 1.3em !important; } </style> <?php 
    $xFRM = new cHForm("frmCobrosEnEfectivo", "cobro-efectivo.frm.php");
    $xFRM->addGuardar("jsActualizarPago()");
    //agrega en un hidden el idrecibo
    $xHNot = new cHNotif();
    $xTxt = new cHText("id");
    $xTxt->addEvent("this.select()", "onfocus");
    $xTxt->addEvent("jsActualizarPago()", "onblur");
    $xTxt->addEvent("jsSetEvalMonto(event, this)", "onkeyup");
    $xFRM->addHElem($xHNot->get($xHP->lang("importe") . " : " . getFMoney($MontoOperacion) . AML_CLAVE_MONEDA_LOCAL, "idimporte"));
    $xFRM->OHidden("iMontoOperacion", $MontoOperacion, "");
    $SMoneda = $xHSel->getListaDeMonedas("idcodigodemoneda");
    $SMoneda->addEvent("onblur", "jsGetEquivalenciasA");
    $xFRM->addHElem($SMoneda->get($xHP->lang("Moneda"), true));
    $xFRM->addHElem($xTxt->getDeMoneda("iMontoRecibido", "TR.Monto recibido", $MontoOperacion));
    $xFRM->addHElem($xHNot->get($xHP->lang("Cambio") . " : <mark id='idtotal'>0</mark>" . AML_CLAVE_MONEDA_LOCAL, "idavisopago", $xHNot->WARNING));
    $xFRM->addHElem($xHNot->get($xHP->lang("Cotizacion") . " : <mark id='idequivalente'>0</mark>", "idavisopago", $xHNot->SUCCESS));
    $xFRM->OHidden("iMontoCambio", 0, "");
    $xFRM->OHidden("idTipoCambio", 1, "");
    $xFRM->addHTML("<div id='avisos'></div>");
    $xFRM->addFootElement("<input type='hidden' name='montonormal' id='montonormal' value='{$MontoOperacion}' />");
$xFRM->addHElem($selPdto->get("TR.producto de credito", true));
//$xFRM->addHElem($xTxt->getDeMoneda("idnuevocredito", "TR.clave_de_credito"));
$selFreq = $xSel->getListaDePeriocidadDePago();
$selFreq->addEvent("onblur", "jsSetFrecuenciaDePagos(this)");
$xFRM->addHElem($selFreq->get(true));
$xFRM->addHElem($xSel->getListaDeTipoDePago()->get(true));
$xFRM->OMoneda("idnumerodepagos", 1, "TR.Numero de pagos");
$xFRM->ODate("idFechaVencimiento", false, "TR.Fecha de Vencimiento");
$xFRM->ODate("idFechaMinistracion", false, "TR.Fecha de Ministracion");
$xFRM->addHElem($xTxt->getDeMoneda("idmonto", "TR.Monto Solicitado", 0, true));
if (MODULO_CAPTACION_ACTIVADO == true) {
    $xFRM->addCuentaCaptacionBasico(false);
} else {
    $xFRM->addHTML("<input type='hidden' value='" . DEFAULT_CUENTA_CORRIENTE . "' id='idcuenta' name='idcuenta' />");
}
$txt2 = new cHText();
$txt2->setDivClass("");
$xFRM->addDivSolo($xSel->getListaDeDestinosDeCredito()->get(false), $txt2->get("iddescripciondestino", false, "TR.Descripcion del Destino de los_recursos"), "tx14", "tx34");
$xFRM->addObservaciones();
//si es credito renovado
$xFRM->OCheck("TR.Es Credito Renovado", "idrenovado");
if (MODULO_AML_ACTIVADO == true) {
    $xFRM->OCheck("TR.PREGUNTA_AML_CREDITO_2", "idpropietario");
    $xFRM->OCheck("TR.PREGUNTA_AML_CREDITO_1", "idproveedor");
}
$xFRM->addCerrar();
$xFRM->OButton("TR.Validar Credito", "jsValidarCredito()", "checar", "idcheck");
$xFRM->addToolbar("<span id='creditoaprobado'></span>");
$xFRM->addAviso(" ");
echo $xFRM->get();
$jxc->drawJavaScript(false, true);
}
$jxc->exportFunction('jsaGuardarPerfil', array('idpersona', 'idtipotransaccion', 'idpais', 'idmonto', 'idnumero', 'idobservaciones'), "#idperfil");
$jxc->process();
$persona = isset($DDATA["persona"]) ? $DDATA["persona"] : DEFAULT_SOCIO;
$persona = isset($DDATA["socio"]) ? $DDATA["socio"] : $persona;
$credito = isset($DDATA["credito"]) ? $DDATA["credito"] : DEFAULT_CREDITO;
$jscallback = isset($DDATA["callback"]) ? $DDATA["callback"] : "";
$tiny = isset($DDATA["tiny"]) ? $DDATA["tiny"] : "";
$form = isset($DDATA["form"]) ? $DDATA["form"] : "";
echo $xHP->getHeader();
$jsb = new jsBasicForm("", iDE_CAPTACION);
echo $xHP->setBodyinit();
$xFRM = new cHForm("frmperfiltransaccional", "perfil_transaccional.frm.php");
$xBtn = new cHButton();
$xTxt = new cHText();
$xTxt2 = new cHText();
$xDate = new cHDate();
$xSel = new cHSelect();
$jsb->setNameForm($xFRM->getName());
$xFRM->addHElem($xSel->getListaDePerfilTransaccional()->get("TR.tipo de perfil", true));
$xFRM->addHElem($xSel->getListaDePaises()->get("TR.pais de origen", true));
$xFRM->addHElem($xTxt->getDeMoneda("idmonto", "TR.monto maximo de operaciones mensuales"));
$xFRM->addHElem($xTxt->getDeMoneda("idnumero", "TR.numero maximo de operaciones mensuales"));
//$xFRM->addHElem(  );
$arr = array_merge($xTxt->getIDs(), $xTxt2->getIDs(), $xSel->getIDs());
$xFRM->addHElem($xTxt2->get("idobservaciones", "", "TR.observaciones"));
//$xFRM->addHElem( $xTxt->get("idnumero", 0, "TR.Numero maximo de operaciones mensuales"));
//$xFRM->addCreditBasico();
$QL = new cSQLListas();
$xT = new cTabla($QL->getListadoDePerfil($persona));
$xT->addTool(SYS_DOS);
            $xFRM->OButton("TR.Imprimir Recibo", "jsImprimirRecibo()", "imprimir");
            $xFRM->addAvisoRegistroOK();
            $xFRM->addCerrar();
            echo $xRec->getJsPrint(true);
        }
    } else {
        $xFRM->addAviso($xRec->getMessages());
    }
} else {
    $xFRM->addJsBasico();
    $xFRM->addCreditBasico();
    $xFRM->addSubmit();
    $xSel = new cHSelect();
    $xTxt = new cHText();
    $xTxt2 = new cHText();
    $xTxt3 = new cHText();
    $xTCob = new cHCobros();
    //"idtipodepago", "idtipodepago"
    $xFRM->ODate("idfechacomision", "", "TR.Fecha de Cobro");
    $xFRM->addCobroBasico();
    $xTxt2->setDivClass("");
    $xTxt->setDivClass("");
    $xTxt3->setDivClass("");
    $xTxt->addEvent("jsaGetSumas()", "onchange");
    $xTxt->addEvent("jsaGetSumas()", "onblur");
    $xTxt3->addEvent("jsaGetSumas()", "onchange");
    $xTxt3->addEvent("jsaGetSumas()", "onblur");
    $xTxt->addEvent("jsaGetComisionPorApertura()", "onfocus");
    //$xTxt->setClearEvents(false);
    $xFRM->addDivSolo($xTxt->getDeMoneda("idcom1", "TR.Comisiones por Apertura de credito"), $xTxt2->getDeObservaciones("idob1", "", "TR.Observaciones"), "tx24", "tx24");
    $xTxt->addEvent("jsaGetSumas()", "onchange");
$persona = parametro("socio", $persona, MQL_INT);
$persona = parametro("idsocio", $persona, MQL_INT);
$credito = parametro("credito", DEFAULT_CREDITO, MQL_INT);
$credito = parametro("idsolicitud", $credito, MQL_INT);
$credito = parametro("solicitud", $credito, MQL_INT);
$cuenta = parametro("cuenta", DEFAULT_CUENTA_CORRIENTE, MQL_INT);
$cuenta = parametro("idcuenta", $cuenta, MQL_INT);
$jscallback = parametro("callback");
$tiny = parametro("tiny");
$form = parametro("form");
$action = parametro("action", SYS_NINGUNO);
$txt = "";
$xFRM = new cHForm("frmcreditoautorizado", "frmcreditosautorizados.php?action=2", "frmcreditoautorizado");
$xSel = new cHSelect();
$xTxt = new cHText();
$xTxt2 = new cHText();
$xBtn = new cHButton();
$msg = "";
$jsInit = "";
$remoto = false;
if (setNoMenorQueCero($credito) > DEFAULT_CREDITO and $action == SYS_NINGUNO) {
    $xCred = new cCredito($credito);
    $xCred->init();
    $persona = $xCred->getClaveDePersona();
    $jsInit = "jsInit()";
    getPersonaEnSession($persona);
    $remoto = true;
}
$xFRM->addDataTag("role", "autorizacion");
function jsaGetDatos($solicitud)
{
		</tr>
		<?php 
    if (MODULO_CAPTACION_ACTIVADO == true) {
        ?>
		<tr>
			<td colspan='1' title='Cuenta de Captacion Relacionada'>Cuenta de Captacion</td>
			<td><input type="number" name="idcuenta" value="<?php 
        echo $defCuentaCorriente;
        ?>
" id="idcuenta" size='12' class='mny' />
			<?php 
        echo CTRL_GOCUENTAS_A;
        ?>
			</td>
			<td><?php 
        $xTxt = new cHText("nombrecuenta");
        $xTxt->setProperty("disabled", "true");
        $xTxt->setProperty("size", "40");
        echo $xTxt->get();
        ?>
</td>
		</tr>
		<?php 
    } else {
        echo "<input type='hidden' id='idcuenta' name='idcuenta' value='{$defCuentaCorriente}' />";
    }
    ?>
	</table>
	</fieldset>
	<fieldset>
	<legend>Caracteristicas del Pago</legend>
$recibo = isset($_GET["r"]) ? $_GET["r"] : false;
if ($recibo != false) {
    $xRec = new cReciboDeOperacion(false, false, $recibo);
    $xRec->init();
    $DRec = $xRec->getDatosInArray();
    $MontoOperacion = $DRec["total_operacion"];
    //=========================== HTML
    echo $xP->getHeader();
    /*echo $xJS->setIncludeJQuery();*/
    $jxc->drawJavaScript(false, true);
    echo $xP->setBodyinit();
    $xFrm = new cHForm("frmCobrosEnCheque", "cobro-cheques.frm.php");
    //agrega en un hidden el idrecibo
    $xTxt = new cHText("id");
    //$xTxt->setIncludeLabel(false);
    $xTxt2 = new cHText("id");
    $xSel1 = new cSelect("iBancos1", "iBancos1", TBANCOS_ENTIDADES);
    $xSel2 = new cSelect("iBancos2", "iBancos2", TBANCOS_ENTIDADES);
    $xSel2->addEspOption(SYS_NINGUNO);
    $xSel2->setOptionSelect(SYS_NINGUNO);
    $xFrm->addHElem("<div class='title'>IMPORTE : {$MontoOperacion}</div>");
    $xTxt->addEvent("jsActualizarPago", "onkeyup");
    //$xTxt->setDropProperty("disabled");
    $xFrm->addHElem(array($xSel1->get("Cheque 1.- Banco"), $xTxt2->get("iNumeroCheque1", "", "Cheque 1.- Numero"), $xTxt->getDeMoneda("iMontoCheque1", "Cheque 1.- Monto", 0)));
    $xFrm->addHElem("<div class='title'>TOTAL : <mark id='idtotal'>0</mark></div>");
    $xFrm->addHTML("<input type='hidden' id='iRecibo' name='iRecibo' value='{$recibo}' />");
    $xFrm->addHTML("<input type='hidden' id='iDiferencia' name='iDiferencia' value='0' />");
    $xFrm->addHTML("<input type='hidden' id='iTotal' name='iTotal' value='{$MontoOperacion}' />");
    $xFrm->addHTML("<div id='avisos'></div>");
    echo $xFrm->get();
    echo $xP->setBodyEnd();
$DDATA = $_REQUEST;
$credito = isset($DDATA["credito"]) ? $DDATA["credito"] : DEFAULT_CREDITO;
$action = isset($DDATA["action"]) ? $DDATA["action"] : SYS_CERO;
//$jxc = new TinyAjax();
//$jxc ->exportFunction('datos_del_pago', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
//$jxc ->process();
echo $xHP->getHeader();
$jsb = new jsBasicForm("frmdocumentos");
//$jxc ->drawJavaScript(false, true);
$ByType = "";
echo $xHP->setBodyinit();
$xFRM = new cHForm("frmfirmas", "importar.plan_de_pagos.frm.php?credito={$credito}&action=" . SYS_UNO);
$xFRM->setEnc("multipart/form-data");
$xFRM->setTitle($xHP->getTitle());
$xBtn = new cHButton();
$xTxt = new cHText();
$xTxt2 = new cHText();
$xSel = new cHSelect();
$xF = new cFecha();
$xT = new cTipos();
$msg = "";
if ($action == SYS_CERO) {
    $xFRM->addHElem("<div class='tx4'><label for='f1'>" . $xFRM->lang("archivo") . "</label><input type='file'  name='f1' id='f1'  /></div>");
    //$xFRM->addHElem( $xTxt2->getDeMoneda("idnumeropagina", $xFRM->lang("numero de", "pagina")) );
    $xFRM->addHElem($xTxt->get("idobservaciones", "", "Observaciones"));
    $xFRM->addSubmit();
    $xFRM->addFootElement('<input type="hidden" name="MAX_FILE_SIZE" value="1024000">');
    echo $xFRM->get();
} else {
    $doc1 = isset($_FILES["f1"]) ? $_FILES["f1"] : false;
    $observaciones = isset($DDATA["idobservaciones"]) ? $DDATA["idobservaciones"] : "";
//$xFRM->addHElem( $xSel->getListaDeRegimenesFiscales("", PERSONAS_ES_MORAL)->get("TR.Regimen Fiscal", true) );
//$xFRM->addHElem( $xSel->getListaDeGeneros()->get("TR.genero", true) );
//$xFRM->addHElem( $xSel->getListaDePaises("idpaisdeorigen")->get("TR.Pais de Origen", true) );
$xFRM->ODate("idfechanacimiento", false, "TR.fecha de creacion");
$sEstados = $xSel->getListaDeEntidadesFed("identidadfederativanacimiento");
$xFRM->addHElem($sEstados->get("TR.entidad de Creacion", true));
$xFRM->addHElem($xTxt->get("idlugardenacimiento", $xLoc->DomicilioMunicipio(), "TR.localidad de creacion"));
//$sCivil		= $xSel->getListaDeEstadoCivil();
//$xFRM->addHElem( $sCivil->get("TR.estado civil", true) );
//$xFRM->addHElem( $xSel->getListaDeRegimenMatrimonio()->get(true) );
//$sFJ		= $xSel->getListaDeTipoDeIdentificacion("", PERSONAS_ES_MORAL);
//$xFRM->addHElem( $sFJ->get(true) );
//$xFRM->OText("idnumerodocumento","", "TR.Numero de Documento");
$xFRM->addHElem($xTxt->getEmail("idemail"));
$xFRM->addHElem($xTxt->getNumero("idtelefono", "", "TR.Telefono"));
$xTCURP = new cHText();
$xTRFC = new cHText();
$xTCURP->setProperty("required", "true");
//$xFRM->addHElem( $xTCURP->get("idcurp", "", "TR.IDENTIFICACION_POBLACIONAL") );
//$xFRM->addHElem( $xTRFC->get("idrfc", "", "TR.IDENTIFICACION_FISCAL") );
$xFRM->addObservaciones();
//$xFRM->OMoneda("iddependientes", 0, "TR.Dependientes economicos");
//
if (EACP_CLAVE_DE_PAIS == "MX") {
    //$xFRM->OText("idclavefiel", "", "TR.Clave FIEL");
    //$xFRM->OTextArea("idrazonnofiel","", "TR.Razones por la cual no tiene FIEL");
    $xFRM->OHidden("idrazonnofiel", "GRUPO INFORMAL", "TR.Razones por la cual no tiene FIEL");
}
$xFRM->endSeccion();
$xFRM->addSeccion("idintegrantes", "TR.Integrantes");
$xFRM->addPersonaBasico("2", false, false, "", "TR.Representante de Grupo");
             $msg .= $xGrupo->getMessages();
         }
     }
 }
 //Agregar Domicilio si existe
 $persona = $xSoc->getCodigo();
 $xFRM->addHTML($xSoc->getFicha());
 $lastpersona = $xCL->getUltimoSocioRegistrado(true);
 $xFRM->addPersonaComandos($persona);
 $xFRM->addAvisoRegistroOK();
 //==================================== Nuevas Relaciones
 if ($origen_relacion == false) {
     $xTbl = new cHTabla("idtblrels");
     $xHSel = new cHSelect();
     $xChk = new cHCheckBox();
     $xText = new cHText();
     $xText->setDivClass("");
     $xChk->setDivClass("");
     $xBtn = new cHButton();
     $xUl = new cHUl();
     $li = $xUl->getO();
     $li->setT("ul");
     $li->setClass("tags blue");
     $li->add($xBtn->getBasic("TR.Guadar", "jsGuardarReferencia()", $xBtn->ic()->GUARDAR, "idguardar", false, true), "");
     $xTbl->initRow();
     $xTbl->addTD($xText->getDeNombreDePersona());
     $xTbl->addTD($xHSel->getListaDeTiposDeRelaciones("", "")->get(""));
     $xTbl->addTD($xHSel->getListaDeTiposDeParentesco()->get(""));
     $xTbl->addTD($xChk->get("TR.es dependiente_economico", "dependiente"));
     $xTbl->addRaw("<td class='toolbar-24'>" . $xUl->get() . "</td>");
     $xTbl->endRow();
    $xSocio->init();
    //idelmes0 idelanno0 ideldia0
    $tab = new TinyAjaxBehavior();
    //$tab -> add(TabSetvalue::getBehavior("idNumeroSocio", $socio));
    $tab->add(TabSetvalue::getBehavior("idnombredependencia", $xSocio->getNombreCompleto()));
    //$tab -> add(TabSetvalue::getBehavior('idObservaciones', $xSoc->getMessages() ));
    return $tab->getString();
}
$jxc->exportFunction('jsaGetDatosHeredados', array("idsocio"));
$jxc->process();
echo $xHP->getHeader();
//$jsb	= new jsBasicForm("");
$xHP->init();
$xFRM = new cHForm("frmagregarempresas", "agregar-empresas.frm.php?action={$step}&empresa={$empresa}");
$xTxt2 = new cHText();
$xTxt = new cHText();
$xSel = new cHSelect();
$xTabs = new cHTabs();
$xFRM->addPersonaBasico("", false, $idsocio);
$xFRM->OText("nombrecorto", $alias, "TR.Nombre_corto");
$xFRM->addHElem($xTxt2->getDeNombreDePersona("iddirectivo", $iddirectivo, "TR.Clave_de_Persona del Contacto"));
$xFRM->OText("directivo", $directivo, "TR.Nombre de Contacto");
$xFRM->addHElem($xSel->getListaDeProductosDeCredito("", $producto)->get(true));
$xTabs->addTab("TR.Periocidad 1", $xSel->getListaDePeriocidadDePago("idperiocidad1", $periocidad1)->get("TR.Periocidad de pago", true));
$xTabs->addTab("TR.Periocidad 1", $xTxt->getNormal("dias_de_aviso1", $diasaviso1, "TR.Dias de Aviso"));
$xTabs->addTab("TR.Periocidad 1", $xTxt->getNormal("dias_de_nomina1", $diasnomina1, "TR.Dias de Nomina"));
$xTabs->addTab("TR.Periocidad 1", $xTxt->getNormal("dias_de_pago1", $diaspago1, "TR.Dias de Pago"));
$xTabs->addTab("TR.Periocidad 2", $xSel->getListaDePeriocidadDePago("idperiocidad2", $periocidad1)->get("TR.Periocidad de pago", true));
$xTabs->addTab("TR.Periocidad 2", $xTxt->getNormal("dias_de_aviso2", $diasaviso2, "TR.Dias de Aviso"));
$xTabs->addTab("TR.Periocidad 2", $xTxt->getNormal("dias_de_nomina2", $diasnomina2, "TR.Dias de Nomina"));
$xTabs->addTab("TR.Periocidad 2", $xTxt->getNormal("dias_de_pago2", $diaspago2, "TR.Dias de Pago"));
    $xF->setClose();
    return $xCred->getMessages(OUT_HTML) . $xF->getLinkDownload("Descarga de Log");
}
$credito = isset($_REQUEST["credito"]) ? $_REQUEST["credito"] : false;
$jxc = new TinyAjax();
$jxc->exportFunction('jsaGuardarReestructura', array('idsolicitud', 'idmonto', 'idpagos', 'idperiocidad', 'idtasa', 'idobservaciones', 'idpdto', 'idtipopago'), "#resultados");
$jxc->process();
echo $xHP->getHeader();
//$xHP->setTamannio(500,800);
$jsb = new jsBasicForm("frmrenegociar");
echo $xHP->setBodyinit();
echo "<input type='hidden' id='idsolicitud' value='{$credito}'>";
$xCred = new cCredito($credito);
$xCred->init();
$oBtn = new cHButton();
$oTxt = new cHText();
$oFech = new cHDate();
$oSel = new cSelect("");
$oUL = new cHUl();
$oTa = new cHTextArea();
$xCE = new cCreditos_estatus();
$xSelEA = $xCE->query()->html()->select($xCE->descripcion_estatus()->get());
$xCP = new cCreditos_periocidadpagos();
$xSelCP = $xCP->query()->html()->select($xCP->descripcion_periocidadpagos()->get());
$xCTP = new cCreditos_tipo_de_pago();
$xSelTP = $xCTP->query()->html()->select($xCTP->descripcion()->get());
$xPP = new cCreditos_tipoconvenio();
$xSelPP = $xPP->query()->html()->select($xPP->descripcion_tipoconvenio()->get());
$oFRM = new cHForm("frmrenegociar", "", "idfrmrenegociar");
$oFRM->addHElem($xSelPP->get("idpdto", "Producto Actual", $xCred->getClaveDeProducto()));
$oFRM->addHElem($xSelCP->get("idperiocidad", "Nueva Periocidad", $xCred->getPeriocidadDePago()));
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");
                    }
                }
            }
        }
    }
}
        $xLog->add($xCta->getMessages(), $xLog->DEVELOPER);
        $xLog->add("OK\tActualizar {$idcuenta} {$nombre} {$equivalencia} {$centro}\r\n");
    }
    return $xLog->getMessages(OUT_HTML);
}
$jxc->exportFunction('jsaHeredarDatos', array('idcuenta'));
$jxc->exportFunction('jsaGuardarDatos', array('idcuenta', 'idnombrecuenta', 'idtipodecuentacontable', 'idcentrodecosto', 'idequivalencia', 'idoperacion'), "#idmsgs");
$jxc->process();
$xHP->init();
$xFRM = new cHForm("frm", "./");
$xFRM->setFieldsetClass("fieldform frmpanel");
$xSel = new cHSelect();
$xTxt = new cHText();
$xTxt->setDivClass("");
$xTxt->addEvent("jsaHeredarDatos()", "onblur");
$xTxt2 = new cHText();
$xTxt2->setDivClass("");
$msg = "";
$xFRM->addGuardar("jsaGuardarDatos()");
$xFRM->OButton("TR.Panel", "jsGoPanel()", $xFRM->ic()->EJECUTAR);
$xFRM->addDivSolo($xTxt->getDeCuentaContable("idcuenta", "", false), $xTxt2->getNormal("idnombrecuenta", "", "TR.Nombre de la Cuenta"), "tx14", "tx34");
$xFRM->addDivSolo("<input type='text' id='idcuentasuperior' disabled='true' />", "<input type='text' id='idnombresuperior' disabled='true' />", "tx14", "tx34");
$xFRM->OText("idequivalencia", "", "TR.Equivalencia");
//$xFRM->addHElem( $xSel->getListaDeNivelesDeCuentasContables()->get(true) );
$xFRM->addHElem($xSel->getListaDeTiposDeCuentasContables()->get(true));
$xFRM->addHElem($xSel->getListaDeTiposDeCentrosDeCosto()->get(true));
$xFRM->OHidden("idoperacion", "0", "TR.operacion");
//0 = nuevo, 1 = Actualizar
$xFRM->OTextArea("idmsg3", "", "TR.Texto");
$xFRM->addAviso(" ");
echo $xFRM->get();
    $MaxRet = $xCta->getMaximoRetirable();
    $sdo = $DC["saldo_cuenta"];
    $tab = new TinyAjaxBehavior();
    $tab->add(TabSetValue::getBehavior("idMaxRet", $MaxRet));
    $tab->add(TabSetValue::getBehavior("idSaldoAnterior", $sdo));
    //$tab -> add(TabSetValue::getBehavior("idmonto", $sdo ));
    //$tab -> add(TabSetValue::getBehavior("imsg", $xCta->getMessages("txt") ));
    return $tab->getString();
}
$jxc->exportFunction('jssetUltimoCheque', array('idcuenta_cheques', 'idtipo_pago'), "#idcheque");
$jxc->exportFunction('jsaGetDatosCuenta', array("idcuenta", "idsocio"));
$jxc->process();
echo $xHP->getHeader(true);
$xFRM = new cHForm("frmretirovista", "frmretiroahorro.php?action=next");
$xBtn = new cHButton();
$xTxt = new cHText();
$xDate = new cHDate();
$xSel = new cHSelect();
$xFRM->setTitle($xHP->getTitle());
$xHP->setBodyinit();
if ($com == SYS_NINGUNO) {
    $xFRM->addCuentaCaptacionBasico();
    $xFRM->addPagoBasico();
    $xFRM->addHElem($xDate->get("TR.Fecha"));
    $xFRM->addObservaciones();
    $xFRM->addHElem($xTxt->getDeMoneda("idmonto", "TR.Monto de Retiro", 0, true));
    $xFRM->addFootElement("<input type='hidden' name='cMaxRet' id='idMaxRet' value='0'  />");
    $xFRM->addFootElement("<input type='hidden' name='sdoanterior' id='idSaldoAnterior' value='0' />");
    $xFRM->addSubmit();
    $xFRM->addJsBasico(iDE_CAPTACION, iDE_CVISTA);
    $jxc->drawJavaScript(false, true);
<?php

//=====================================================================================================
//=====>	INICIO_H
include_once "../core/go.login.inc.php";
include_once "../core/core.error.inc.php";
include_once "../core/core.html.inc.php";
include_once "../core/core.init.inc.php";
$theFile = __FILE__;
$permiso = getSIPAKALPermissions($theFile);
if ($permiso === false) {
    header("location:../404.php?i=999");
}
$_SESSION["current_file"] = addslashes($theFile);
//<=====	FIN_H
//=====================================================================================================
$xP = new cHPage("Cobranza.- Efectivo");
$xP->setIncludes();
echo $xP->getHeader();
$xP->setBodyinit();
$xFrm = new cHForm("frmCobrosEnEfectivo", "cobro-efectivo.frm.php");
$xTxt = new cHText("id");
//$xTxt->setIncludeLabel();
$xFrm->addHElem($xTxt->getDeMoneda("iMontoOperacion", "Monto de la Operacion"));
$xFrm->addHElem($xTxt->getDeMoneda("iMontoRecibido", "Monto Recibido"));
$xFrm->addHElem($xTxt->getDeMoneda("iMontoCambio", "Monto de Cambio"));
echo $xFrm->get();
$xP->setBodyEnd();
$jsb = new jsBasicForm("frmdocumentos");
//$jxc ->drawJavaScript(false, true);
$ByType = "";
echo $xHP->setBodyinit();
if ($persona != DEFAULT_SOCIO) {
    $xSoc = new cSocio($persona);
    $xSoc->init();
    $ByType = $xSoc->getEsPersonaFisica() == true ? BASE_DOCTOS_PERSONAS_FISICAS : BASE_DOCTOS_PERSONAS_MORALES;
}
$xFRM = new cHForm("frmfirmas", "personas_documentos.frm.php?action=" . SYS_UNO . "&persona={$persona}");
$xFRM->setEnc("multipart/form-data");
$xFRM->setTitle($xHP->getTitle());
$xBtn = new cHButton();
$xTxt = new cHText();
$xTxt2 = new cHText();
$xTxtF = new cHText();
$xSel = new cHSelect();
$xImg = new cHImg();
if ($action == SYS_CERO) {
    $xTxtF->setDivClass("");
    //$xTxtF->setProperty("class", "")
    $xFRM->OFile("idnuevoarchivo", "", "TR.Cargar Documento");
    $xFRM->OText("iddocumento", "", "TR.Nombre del Archivo", true, $xImg->get24("common/search.png", " onclick='jsGetDocto()' "));
    $xFRM->addHElem($xSel->getTiposDeDoctosPersonales("", $ByType)->get(true));
    $xFRM->addHElem($xTxt2->getDeMoneda("idnumeropagina", "TR.Numero de Pagina"));
    $xFRM->addObservaciones();
    $xFRM->addSubmit();
} else {
    $xFRM->addCerrar();
    $doc1 = parametro("iddocumento", "", MQL_RAW);
    $observaciones = isset($DDATA["idobservaciones"]) ? $DDATA["idobservaciones"] : "";