function getOLetra($numero)
 {
     $xLetra = new cParcialidadDeCredito($this->getClaveDePersona(), $this->getClaveDeCredito(), $numero);
     //setLog($this->getClaveDePersona());
     if (isset($this->mPagos[$numero])) {
         $xLetra->setDatos($this->mPagos[$numero]);
     }
     $xLetra->init($this->getClaveDePersona(), $this->getClaveDeCredito(), $numero);
     $this->mPagos[$numero][SYS_INTERES_NORMAL] = $xLetra->getInteres();
     $this->mPagos[$numero][SYS_CAPITAL] = $xLetra->getCapital();
     $this->mPagos[$numero][SYS_TOTAL] = $xLetra->getMonto();
     $this->mPagos[$numero][SYS_FECHA] = $xLetra->getFechaDePago();
     $this->mPagos[$numero][SYS_FECHA_VENCIMIENTO] = $xLetra->getFechaDeVencimiento();
     $this->mPagos[$numero][SYS_DATOS] = $xLetra->getDatosInArray();
     $this->mPagos[$numero][SYS_DATOS][SYS_INTERES_NORMAL] = $this->mPagos[$numero][SYS_INTERES_NORMAL];
     $this->mPagos[$numero][SYS_DATOS][SYS_CAPITAL] = $this->mPagos[$numero][SYS_CAPITAL];
     $this->mPagos[$numero][SYS_DATOS][SYS_TOTAL] = $this->mPagos[$numero][SYS_TOTAL];
     $this->mPagos[$numero][SYS_DATOS][SYS_FECHA] = $this->mPagos[$numero][SYS_FECHA];
     $this->mPagos[$numero][SYS_DATOS][SYS_FECHA_VENCIMIENTO] = $this->mPagos[$numero][SYS_FECHA_VENCIMIENTO];
     $this->mMessages .= $xLetra->getMessages();
     return $xLetra;
 }
$interes_normal_devengado = $xCred->getInteresNormalDevengado();
$interes_normal_pagado = $xCred->getInteresNormalPagado();
$interes_moratorio_pagado = $xCred->getInteresMoratorioPagado();
$interes_moratorio_devengado = $xCred->getInteresMoratorioDev();
$periocidad = $xCred->getPeriocidadDePago();
$ByLetra = "";
$solo_mora_corriente = $pago_total == true ? true : false;
//Corrige calculo de Interes.- Si es primer pago
$DInteres = $xCred->getInteresDevengado($fecha_operacion, $parcialidad, false, $solo_mora_corriente);
$interes_normal_calculado = $DInteres[SYS_INTERES_NORMAL];
$interes_moratorio_calculado = $DInteres[SYS_INTERES_MORATORIO];
$gastos_de_cobranza_calculado = $DInteres[SYS_GASTOS_DE_COBRANZA];
$fecha_de_pago = $fecha_vencimiento;
if ($xCred->getPeriocidadDePago() != CREDITO_TIPO_PERIOCIDAD_FINAL_DE_PLAZO) {
    $xLetra = new cParcialidadDeCredito();
    if ($xLetra->init($xCred->getClaveDePersona(), $xCred->getNumeroDeCredito(), $parcialidad) == true) {
        $fecha_de_pago = $xLetra->getFechaDePago();
        $xLog->add("OK\tFecha de Pago establecida a {$fecha_de_pago}\r\n", $xLog->DEVELOPER);
    } else {
        $xLog->add("ERROR\tParcialidad {$parcialidad} no inicializada\r\n", $xLog->DEVELOPER);
        $xLog->add("ERROR\tNo existe el Periodo de Pago\r\n", $xLog->COMMON);
    }
}
//=========================================================
//Datos del Respeto al Plan de Pagos
// ================================== VERIFICAR EL PLAN DE PAGOS =======================================
//======================================= END VERIFICATION =============================================
$interes_normal = 0;
$interes_moratorio = 0;
$base_iva_otros = 0;
$base_iva_intereses = 0;