function jsaGuardarDatosBanco($credito, $banco, $cuenta, $clabe)
{
    $xCred = new cCredito($credito);
    $xCred->init();
    $Cat = $xCred->OCatOtrosDatos();
    $datobanco = "";
    $xBan = new cBancos_entidades();
    $xBan->setData($xBan->query()->initByID($banco));
    $datobanco = $xBan->idbancos_entidades()->v() . " | " . $xBan->nombre_de_la_entidad()->v();
    $xCred->setOtrosDatos($Cat->DEPOSITO_BANCO, strtoupper($datobanco));
    $xCred->setOtrosDatos($Cat->DEPOSITO_CTA_BANCARIA, $cuenta);
    $xCred->setOtrosDatos($Cat->DEPOSITO_CLABE_BANCARIA, $clabe);
    return $xCred->getMessages(OUT_HTML);
}
 function getDatosDeCobro()
 {
     $OTipo = $this->getOTipoRecibo();
     $info = "";
     $info .= strtoupper($this->getTipoDePago()) . "|";
     //TODO: Terminar tipos de info
     switch ($OTipo->getAfectacionEnEfvo()) {
         case SYS_ENTRADAS:
             $info .= $this->getOCaja()->getChequeActivo() . "|";
             $info .= $this->getOCaja()->getCuentaBancoActivo() . "|";
             $info .= $this->getOCaja()->getBancoActivo() . "|";
             $this->mCuentaBancaria = setNoMenorQueCero($this->getOCaja()->getCuentaBancoActivo());
             $xCtaBanc = new cCuentaBancaria($this->mCuentaBancaria);
             if ($xCtaBanc->init() == true) {
                 $this->mOBanco = $xCtaBanc;
                 $xBanc = new cBancos_entidades();
                 $xBanc->setData($xBanc->query()->initByID($xCtaBanc->getClaveDeBanco()));
                 $info .= $xBanc->nombre_de_la_entidad()->v(OUT_TXT) . "|";
             }
             break;
         case SYS_SALIDAS:
             switch ($this->getTipoDePago()) {
                 case TESORERIA_PAGO_CHEQUE:
                     //$xBac	= new cCuentaBancaria($numero_de_cuenta)
                     //Buscar si existe
                     $xOp = new cOperacionBancaria();
                     $xOp->initByRecibo($this->mCodigoDeRecibo);
                     //$PorOperar	= setNoMenorQueCero($this->getTotal() - $xOp->getMonto());
                     $info .= $xOp->getNumeroDeCheque() . "|";
                     $info .= $xOp->getCuentaBancaria() . "|";
                     //obtener el nombre del banco
                     $this->mCuentaBancaria = setNoMenorQueCero($xOp->getCuentaBancaria());
                     $xCtaBanc = new cCuentaBancaria($this->mCuentaBancaria);
                     if ($xCtaBanc->init() == true) {
                         $this->mOBanco = $xCtaBanc;
                         $xBanc = new cBancos_entidades();
                         $xBanc->setData($xBanc->query()->initByID($xCtaBanc->getClaveDeBanco()));
                         $info .= $xBanc->nombre_de_la_entidad()->v(OUT_TXT) . "|";
                     }
                     break;
                 case TESORERIA_PAGO_DOCTO:
                     break;
                 case TESORERIA_PAGO_EFECTIVO:
                     break;
                 case TESORERIA_PAGO_TRANSFERENCIA:
                     $xOp = new cOperacionBancaria();
                     $xOp->initByRecibo($this->mCodigoDeRecibo);
                     //$PorOperar	= setNoMenorQueCero($this->getTotal() - $xOp->getMonto());
                     $info .= $xOp->getNumeroDeCheque() . "|";
                     $info .= $xOp->getCuentaBancaria() . "|";
                     //obtener el nombre del banco
                     $this->mCuentaBancaria = setNoMenorQueCero($xOp->getCuentaBancaria());
                     $xCtaBanc = new cCuentaBancaria($this->mCuentaBancaria);
                     if ($xCtaBanc->init() == true) {
                         $this->mOBanco = $xCtaBanc;
                         $xBanc = new cBancos_entidades();
                         $xBanc->setData($xBanc->query()->initByID($xCtaBanc->getClaveDeBanco()));
                         $info .= $xBanc->nombre_de_la_entidad()->v(OUT_TXT) . "|";
                     }
                     break;
             }
             break;
     }
     return $info;
 }
//=====================================================================================================
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";
include_once "../core/core.db.inc.php";
$theFile = __FILE__;
$permiso = getSIPAKALPermissions($theFile);
if ($permiso === false) {
    header("location:../404.php?i=999");
}
$_SESSION["current_file"] = addslashes($theFile);
//=====================================================================================================
$xHP = new cHPage("TR.Catalogo de Bancos", HP_GRID);
$xF = new cFecha();
$xTabla = new cBancos_entidades();
$filtro1 = "";
$filtro2 = "";
$xHP->setNoDefaultCSS();
echo $xHP->getHeader(true);
//HTML Object END
echo '<body onmouseup="SetMouseDown(false);" ><div id="onGrid">';
//Define your grid
$_SESSION["grid"]->SetDatabaseConnection(MY_DB_IN, USR_DB, PWD_DB);
//Propiedades del GRID
$mGridTitulo = $xHP->getTitle();
$mGridKeyField = $xTabla->getKey();
//Nombre del Campo Unico
$mGridKeyEdit = true;
//Es editable el Campo
$mGridTable = $xTabla->get();
 function init($arr = false)
 {
     if (is_array($arr)) {
         $D = $arr;
     } else {
         $ql = new MQL();
         $D = $ql->getDataRow("SELECT * FROM `bancos_cuentas` WHERE `idbancos_cuentas` = " . $this->mCuenta . " LIMIT 0,1");
     }
     $xB = new cBancos_cuentas();
     $xB->setData($D);
     $this->mClaveBanco = $xB->entidad_bancaria()->v();
     //Clave de Pais del banco
     $xBE = new cBancos_entidades();
     $xBE->setData($xBE->query()->initByID($this->mClaveBanco));
     $this->mNombreBanco = $xBE->nombre_de_la_entidad()->v();
     $this->mPaisDeOrigen = $xBE->pais_de_origen()->v(OUT_TXT);
     $this->mCuentaContable = $xB->codigo_contable()->v(OUT_TXT);
     $this->mConsecutivo = setNoMenorQueCero($xB->consecutivo_actual()->v());
     $this->mObj = $xB;
     $this->mOBanco = $xBE;
     $this->mInit = true;
     return $this->mInit;
 }