/**
   * Do ini editar conciliacion.
   *
   * @param mapping the mapping
   * @param actionForm the action form
   * @param request the request
   * @param response the response
   * @return the action forward
   * @throws Exception the exception
   */
  public final ActionForward doIniEditarConciliacion(
      final ActionMapping mapping,
      final ActionForm actionForm,
      final HttpServletRequest request,
      final HttpServletResponse response)
      throws Exception {

    PseudoResponse res = new PseudoResponse(request, response);
    ReporteConciliacionForm form;
    int registro = Integer.parseInt(request.getParameter("registro"));
    final Boolean repBoletas =
        (request.getParameter(REP_BOLETAS) == null)
            ? false
            : Boolean.parseBoolean(request.getParameter(REP_BOLETAS));
    if (actionForm instanceof ReporteConciliacionForm) {
      form = (ReporteConciliacionForm) actionForm;
    } else {
      form = new ReporteConciliacionForm();
    }

    SantanderSecurityContext sc = null;
    try {
      sc = getSecurityContext(request);
    } catch (Exception e) {
      LOG.error(e.getMessage(), e);
      throw new FrontClientException(GralErrorKeys.PPINV_ERR_GRAL.toString(), e);
    }
    String perfilOper = sc.getPrivilegiosUsuario().getPrivilegiosPerfil().getPerfil().getNombre();
    final ReporteConciliacionService service =
        (ReporteConciliacionService)
            getWebApplicationContext().getBean(REPORTE_CONCILIACION_SERVICE);

    String errorValida = "";

    if ("TOTALTOTAL".equals(perfilOper.toUpperCase().trim())
        || "FCADMIN".equals(perfilOper.toUpperCase().trim())
        || "FCPROMOTORBP".equals(perfilOper.toUpperCase().trim())) {
      errorValida = service.validaEditarConciliacion(form, registro, repBoletas);
    } else {
      errorValida = ConciliaErrorKeys.PPINV_ERR_CONCILIACION_EDICION_DENEGADA.toString();
    }

    if ("".equals(errorValida)) {
      form = service.obtieneDatosEditarConciliacion(form, registro, repBoletas);
      res.setResponseError(null);
      res.setResponseContent(jsonize(form));
    } else {
      res.setResponseError(errorValida);
    }

    res.commit();

    return null;
  }
Esempio n. 2
0
  /**
   * Metodo que obtiene la consulta de un fondo de inversión.
   *
   * @param branch Número del branch.
   * @param strDeal Número de operación.
   * @param sc Contexto de seguridad.
   * @return respFondosVO Contiene los datos a mostrar.
   * @throws Exception En caso que ocurra un error.
   */
  public final RespuestaFondosVO consultaFondos(
      final String branch, final String strDeal, final SantanderSecurityContext sc)
      throws Exception {

    RespuestaFondosVO respFondosVO = new RespuestaFondosVO();
    RespuestaFondosVO respDAO = new RespuestaFondosVO();

    respDAO = capturaFondosDAO.consultaFondos(branch, strDeal, sc);

    if (respDAO != null) {

      log.debug("MutFundind " + respDAO.getMutFundind());
      log.debug("Fixincind " + respDAO.getFixincind());
      log.debug("Revdate " + respDAO.getRevDate());
      log.debug("Cuenta " + respDAO.getContrato());

      if (respDAO.getMutFundind().trim().equals("0") || respDAO.getFixincind().trim().equals("1")) {
        log.debug("La operación no es un fondo de inversión.");
        respFondosVO.setError(ErrorKeys.ERR_NO_ES_FONDO_INVERSION);
        return respFondosVO;
      }

      if (respDAO.getRevDate() == null) {
        log.debug("La operacion ha sido cancelada.");
        respFondosVO.setError(ErrorKeys.ERR_OPERACION_CANCELADA);
        return respFondosVO;
      }

      respFondosVO.setOperacion(respDAO.getOperacion().trim());
      respFondosVO.setContrato(respDAO.getContrato().trim());
      respFondosVO.setInstitucion(respDAO.getInstitucion());
      respFondosVO.setMoneda(respDAO.getMoneda().trim());
      respFondosVO.setFechaValor(respDAO.getFechaValor());
      respFondosVO.setMonto(Math.abs(respDAO.getMonto()));
      respFondosVO.setTitulos(Math.abs(respDAO.getTitulos()));
      respFondosVO.setEmisora(respDAO.getEmisora().trim());
      respFondosVO.setCompraVenta(respDAO.getCompraVenta().trim());
      respFondosVO.setBitacora(respDAO.getBitacora().trim());
      respFondosVO.setEjecucion(respDAO.getEjecucion());
      respFondosVO.setFolio(respDAO.getFolio());

      /*
       * Se valida el contrato que se obtuvo en la consulta.
       */
      String ctaContrato = respFondosVO.getContrato();
      String user = sc.getPrivilegiosUsuario().getTrad();

      respFondosVO.setStatus(commonDAO.validaContrato(branch, ctaContrato, user).getStatus());

      return respFondosVO;
    } else {
      respFondosVO.setError(ErrorKeys.ERR_REGISTRO_NO_ENCONTRADO);
      return respFondosVO;
    }
  }
Esempio n. 3
0
  // 'Luis Gachuz, 29/Mar/2003
  // 'Modificaciòn para recibir el nuevo paràmetro ic_Trad
  public final RespuestaFondosVO calculaMontoFondos(
      final ParFondosVO fondosVO, final SantanderSecurityContext sc) throws Exception {
    /*
     * '15032002 GSP.
     * Calcula el monto de la operación si se proporcionan los títulos
     * 'Se regresa una cadena con el monto calculado
     */

    String rateCode = "";
    String strCountry = "";
    String strFundPrice = "";
    String icCon = "";
    String branch = "";
    String ctaContrato = "";
    String user = "";
    String vatrate = "";
    double dblComision = 0.0;
    double dblIva = 0.0;
    double dblMontoBruto = 0.0;
    double dblMontoNeto = 0.0;
    double dblCalcQty = 0.0;
    ValidaContratoVO contratoVO = new ValidaContratoVO();
    RespuestaFondosVO clientInformationVO = new RespuestaFondosVO();
    RespuestaFondosVO issuingVO = new RespuestaFondosVO();
    RespuestaFondosVO commRateVO = new RespuestaFondosVO();
    RespuestaFondosVO respFondosVO = new RespuestaFondosVO();

    /*
     * Se llama al método de validaContrato para obtener
     * valores que se necesitan
     * pasar como parametros para otros metodos.
     */
    branch = fondosVO.getBranch();
    ctaContrato = fondosVO.getContrato();
    user = sc.getPrivilegiosUsuario().getTrad();

    contratoVO = commonDAO.validaContrato(branch, ctaContrato, user);

    icCon = contratoVO.getCno();

    /*===================================================================*/
    /*             Obtenemos la información del cliente.                 */
    /*===================================================================*/
    clientInformationVO = capturaFondosDAO.readClientInformation(icCon.trim());
    if (clientInformationVO != null) {
      if (clientInformationVO.getStatus() != 0) {
        respFondosVO.setError(String.valueOf(clientInformationVO.getStatus()));
        if (!fondosVO.isBlError()) {
          return respFondosVO;
        }
      }
    } else {
      respFondosVO.setError(
          "Error al ejecutar el Store Procedure:" + "\n" + "SPS_READ_CLIENT_INFORMATION. ");
      if (!fondosVO.isBlError()) {
        return respFondosVO;
      }
    }

    log.debug("clientInformationVO[0]" + clientInformationVO.getStrClientInfo()[0]);
    log.debug("clientInformationVO[1]" + clientInformationVO.getStrClientInfo()[1]);

    /*===================================================================*/
    /*         Obtenemos la ciudad a la que corresponde el branch.       */
    /*===================================================================*/
    strCountry = capturaFondosDAO.readBranchCountry(branch);
    if (strCountry.trim().equals("Error")) {
      respFondosVO.setError("Error al obtener la ciudad del branch.");
      if (!fondosVO.isBlError()) {
        return respFondosVO;
      }
    } else if (strCountry == null) {
      strCountry = "";
    } else {
      strCountry = strCountry.trim();
    }
    log.debug("strCountry " + strCountry);
    /*===================================================================*/
    /*                  Valida la moneda de la emisora.                  */
    /*===================================================================*/
    issuingVO = validateIssuing(fondosVO.getEmisora(), fondosVO.getMoneda());
    DatosTabulares dt = null;

    if (issuingVO.getError() == null || issuingVO.getError().trim().length() == 0) {
      dt = issuingVO.getResp();
    } else {
      respFondosVO.setError(issuingVO.getError());
      if (!fondosVO.isBlError()) {
        return respFondosVO;
      }
    }

    /*===================================================================*/
    /*             Se obtiene el precio del fondo de inversión.          */
    /*===================================================================*/
    strFundPrice = capturaFondosDAO.readFundPrice(fondosVO.getBranch(), fondosVO.getEmisora());

    if (strFundPrice.trim().equals("Error")) {
      log.debug("No se encontro el precio del Fondo de Inversión.");
      respFondosVO.setError(ErrorKeys.ERR_NO_ENCONTRO_PRECIO_FONDO);
      if (!fondosVO.isBlError()) {
        return respFondosVO;
      }
    } else if (strFundPrice == null) {
      strFundPrice = "";
    }

    log.debug("strFundPrice " + strFundPrice);

    String ccode = "";

    if (clientInformationVO.getStrClientInfo()[1] != null) {
      ccode = clientInformationVO.getStrClientInfo()[1].trim();
    }

    /*===================================================================*/
    /*                          Obtenemos el IVA                         */
    /*===================================================================*/
    vatrate =
        capturaFondosDAO.getClientesVatRate(
            fondosVO.getBranch(), fondosVO.getContrato(), contratoVO.getCno(), ccode, strCountry);

    log.debug("==== vatrate " + vatrate);

    if (vatrate == null) {
      vatrate = "";
      // vatrate = "10";
    } else if (vatrate.trim().equals("Error")) {
      respFondosVO.setError("Error al ejecutar el Store Procedure SPS_OBTIENE_IVA.");
      if (!fondosVO.isBlError()) {
        return respFondosVO;
      }
    }
    // 'Luis Gachuz, 29/Mar/2003
    // 'Se le envìan nuevos paràmetros ic_Secid, ic_Trad
    /*===================================================================*/
    /*                      Obtenemos la comision.                       */
    /*===================================================================*/

    String product;
    String prodType;

    if (dt == null) {
      product = "";
      prodType = "";
    } else {
      product = dt.get(0, colProduct).toString().trim();
      prodType = dt.get(0, colProdType).toString().trim();
    }

    log.debug("product " + product);
    log.debug("prodType " + prodType);
    log.debug("Vatrate " + vatrate);

    commRateVO =
        capturaFondosDAO.getClientCommission(
            sc,
            fondosVO.getBranch(),
            fondosVO.getContrato(),
            product,
            prodType,
            rateCode,
            fondosVO.getTitulos(),
            fondosVO.getMonto(),
            vatrate,
            fondosVO.getCompraVenta(),
            fondosVO.getEmisora(),
            fondosVO.getPromotor());
    if (commRateVO != null) {
      if (commRateVO.getStatus() != 0 || commRateVO.getError() != null) {
        respFondosVO.setError(commRateVO.getError());
        if (!fondosVO.isBlError()) {
          return respFondosVO;
        }
      }
    } else {
      commRateVO.setOnCommrate(null);
    }

    log.debug("IVA " + commRateVO.getOnCommrate());
    /*===================================================================*/
    /*                         Se calcula el monto                       */
    /*===================================================================*/
    double fundPrice = 0;
    double dblCommrate = 0;
    double dblVatrate = 0;

    if (!strFundPrice.equals("") && !strFundPrice.equals("Error")) {
      fundPrice = Double.parseDouble(strFundPrice);
    }
    if (commRateVO.getOnCommrate() != null) {
      dblCommrate = Double.parseDouble(commRateVO.getOnCommrate());
    }
    if (!vatrate.equals("") && !vatrate.equals("Error")) {
      dblVatrate = Double.parseDouble(vatrate);
    }

    if (fondosVO.getTitulos() != 0) {
      dblComision = Math.abs((fondosVO.getTitulos() * fundPrice * dblCommrate) / 100);
      dblComision = Formateador.formatoDouble(dblComision, fondosVO.getDecimalsMoneda()) * (-1);
      dblIva = ((dblComision * dblVatrate) / 100);
      dblIva = Formateador.formatoDouble(dblIva, fondosVO.getDecimalsMoneda());
      dblMontoBruto =
          Formateador.formatoDouble(
              (fondosVO.getTitulos() * fundPrice), fondosVO.getDecimalsMoneda());
      dblMontoNeto = dblMontoBruto + dblComision + dblIva;
      dblCalcQty = fondosVO.getTitulos();

      log.debug("dblComision " + dblComision);
      log.debug("dblIva " + dblIva);
      log.debug("dblMontoBruto " + dblMontoBruto);
      log.debug("dblCalcQty " + dblCalcQty);

    } else if (fondosVO.getMonto() != 0) {
      if (fondosVO.getCompraVenta().equals("P")) {
        dblCalcQty =
            (fondosVO.getMonto()
                    / (fundPrice * (1 + dblCommrate / 100 + dblCommrate / 100 * dblVatrate / 100)))
                * (-1);
      } else {
        dblCalcQty =
            (fondosVO.getMonto()
                / (fundPrice * (1 - dblCommrate / 100 - dblCommrate / 100 * dblVatrate / 100))
                * (-1));
      }
      dblComision = Math.abs((dblCalcQty * fundPrice * dblCommrate) / 100);
      dblComision = Formateador.formatoDouble(dblComision, fondosVO.getDecimalsMoneda()) * (-1);
      dblIva = (dblComision * dblVatrate) / 100;
      dblIva = Formateador.formatoDouble(dblIva, fondosVO.getDecimalsMoneda());
      dblMontoBruto = (dblCalcQty * fundPrice) * (-1);
      dblMontoBruto = Formateador.formatoDouble(dblMontoBruto, fondosVO.getDecimalsMoneda());
      dblMontoNeto = dblMontoBruto + dblComision + dblIva;
    }

    dblComision = Math.abs(dblComision);

    /* Se debe formatear dblMontoNeto al
     * número de decimales de la moneda. */
    respFondosVO.setDblMontoNeto(
        Formateador.formatoDouble(dblMontoNeto, fondosVO.getDecimalsMoneda()));

    log.debug("dblMontoNeto VO " + respFondosVO.getDblMontoNeto());

    return respFondosVO;
  }
Esempio n. 4
0
  /**
   * Método para hacer una operación de un fondo de inversión.
   *
   * @param fondosVO Parametros para hacer la validación de la operación que se desea realizar.
   * @param sc Contexto de seguridad.
   * @param efectivoVO Parametros para hacer operaciones de Efectivo
   * @return RespuestaFondosVO Regresa los valores que se muestran en la pantalla de confirmación ó
   *     el número de operación.
   * @throws Exception Encaso de que ocurra un error.
   */
  public final RespuestaFondosVO procesamientoDatosFondos(
      final ParFondosVO fondosVO,
      final SantanderSecurityContext sc,
      final ParametrosEfectivoVO efectivoVO)
      throws Exception {

    String brContrato = "";
    String ctaContrato = "";
    String user = "";
    String contrapartesCom = "";
    String contrapartesIva = "";
    String perfil = "";

    ValidaContratoVO contratoVO = new ValidaContratoVO();
    RespuestaFondosVO respFondosVOConf = new RespuestaFondosVO();
    RespuestaFondosVO respProcesaFondos = new RespuestaFondosVO();
    RespuestaFondosVO respFondos = new RespuestaFondosVO();

    brContrato = fondosVO.getBranch();
    ctaContrato = fondosVO.getContrato();
    user = sc.getPrivilegiosUsuario().getTrad();

    contrapartesCom = getCommonService().contrapartes(brContrato, "COMM");
    contrapartesIva = getCommonService().contrapartes(brContrato, "IVA");

    /*
    if (contrapartesCom.equals("") || contrapartesIva.equals("")) {
    			log.debug("No se encontrarón definiciones"
    					+ " de las contrapartes para el sistema.");
    		}
    */

    try {
      contratoVO = commonDAO.validaContrato(brContrato, ctaContrato, user);

      respFondosVOConf =
          capturaFondosDAO.procesaFondosConfirmacion(
              fondosVO.getBranch(),
              fondosVO.getContrato(),
              contratoVO.getCno(),
              fondosVO.getEmisora(),
              fondosVO.getMoneda(),
              fondosVO.getMonto(),
              fondosVO.getTitulos(),
              fondosVO.getCompraVenta(),
              fondosVO.getFechaProc(),
              fondosVO.getPromotor(),
              contratoVO.getNostrovostro(),
              sc);

      if (respFondosVOConf != null) {

        if ((respFondosVOConf.getError() == null
                || respFondosVOConf.getError().trim().length() == 0)
            && respFondosVOConf.getStatus() == 0) {

          int decimales = fondosVO.getDecimalsMoneda();
          String strDec = "";
          for (int iter = 0; iter < decimales; iter++) {
            strDec = strDec + "0";
          }
          String pattern = "#,###,##0." + strDec;

          // Compra / Venta
          if (respFondosVOConf.getCompraVenta().equals("S")) {
            respFondos.setCompraVenta("Venta");
          } else {
            respFondos.setCompraVenta("Compra");
          }
          // Emisora
          respFondos.setEmisora(respFondosVOConf.getEmisora());
          // Moneda
          respFondos.setMoneda(respFondosVOConf.getMoneda());
          // Titulos
          respFondos.setStrCalcQty(
              Formateador.format(String.valueOf(respFondosVOConf.getDblCalcQty()), pattern));
          // Precio
          String patternPrice = "#,###,##0.########";
          respFondos.setStrFundPrice(
              Formateador.format(String.valueOf(respFondosVOConf.getStrFundPrice()), patternPrice));
          // Monto Neto
          // Se valida regla: Importes inferiores a 100,000
          Integer montoValue = Mensajes.MAX_MONTO_DEFAULT;
          if (capturaCapitalesDAO != null) {
            montoValue = capturaCapitalesDAO.getMontoInferior();
          }
          if (fondosVO.getEjecucion() != null
              && Ejecucion.formatString(fondosVO.getEjecucion())
                  .equalsIgnoreCase(Ejecucion.formatString(Ejecucion.EXCEPCIONES.getName()))
              && (montoUnsigned(respFondosVOConf.getDblMontoNeto()) >= montoValue)) {
            if (fondosVO.getBranch() == null
                || fondosVO.getContrato() == null
                || !capturaCapitalesDAO.isContratoDiscrecional(
                    fondosVO.getBranch(), fondosVO.getContrato())) {
              if (respFondos.getCompraVenta().equals("Venta")
                  || respFondosVOConf.getEmisora() == null
                  || respFondosVOConf.getEmisora().equals("")
                  || !capturaCapitalesDAO.existEmisora(respFondosVOConf.getEmisora())) {
                String serr = Mensajes.ERR_EJECUCION;
                log.error(serr);
                respFondos.setError(serr);
                throw new CondicionesInconsistentesException(respFondos.getError());
              }
            }
          }
          respFondos.setStrMontoNeto(
              Formateador.format(String.valueOf(respFondosVOConf.getDblMontoNeto()), pattern));
          // Porcentaje Comisión.
          if (!respFondosVOConf.getOnCommrate().equals("")) {
            respFondos.setOnCommrate(
                Formateador.formatCCY(respFondosVOConf.getOnCommrate(), decimales));
          } else {
            respFondos.setOnCommrate("0.00");
          }
          // Comisión
          String strComision = String.valueOf(respFondosVOConf.getDblComision());
          if (!strComision.equals("")) {
            respFondos.setStrComision(Formateador.formatCCY(strComision, decimales));
          } else {
            respFondos.setStrComision("0.00");
          }
          // IVA
          String strIva =
              Formateador.stringWithOutComma(String.valueOf(respFondosVOConf.getDblIva()));
          if (!strIva.equals("")) {
            respFondos.setStrIva(Formateador.formatCCY(strIva, decimales));
          } else {
            respFondos.setStrIva("0.00");
          }
          // Fecha de liquidación
          if (respFondosVOConf.getSettDate() != null) {
            respFondos.setFechaLiq(
                Formateador.formateaFechaDisplay(respFondosVOConf.getSettDate()));
          } else {
            respFondos.setFechaLiq("");
          }
          // Plazo de permanencia
          respFondos.setOcMinTerms(respFondosVOConf.getOcMinTerms());
          // Fecha de recompra
          if (respFondosVOConf.getExpirdate() != null) {
            respFondos.setFechaExpira(FechaUtils.dateToString(respFondosVOConf.getExpirdate()));
          } else {
            respFondos.setFechaExpira("");
          }
          // Producto.
          if (respFondosVOConf.getOcProduct() != null) {
            respFondos.setOcProduct(respFondosVOConf.getOcProduct());
          } else {
            respFondos.setOcProduct("");
          }
          // Tipo de Producto.
          if (respFondosVOConf.getOcProdType() != null) {
            respFondos.setOcProdType(respFondosVOConf.getOcProdType());
          } else {
            respFondos.setOcProdType("");
          }

          /*
           * Perfil.
           */
          perfil =
              getCommonService()
                  .validaPerfilContrato(
                      fondosVO.getBranch(),
                      fondosVO.getContrato(),
                      getCommonService().MDO_FONDOS,
                      fondosVO.getMoneda(),
                      fondosVO.getEmisora(),
                      fondosVO.getMonto(),
                      "", // Producto
                      "", // TipoProducto
                      getCommonService().CICLO_ANTES_DE_VALIDAR,
                      null);

          log.debug("Perfil '" + perfil + "'");

          respFondos.setPerfil(perfil);

        } else if (respFondosVOConf.getStatus() != 0) {
          log.debug("Status en respFondosVOConf");
          respFondos.setStatus(respFondosVOConf.getStatus());
          return respFondos; // ANZ OCT 2011
          // ANZ OCT 2011. Se comenta para que no mande Exception
          // throw new CondicionesInconsistentesException(
          //		String.valueOf(respFondos.getStatus()));
        } else {
          log.debug("Mensaje de error en respFondosVOConf " + respFondosVOConf.getError());
          respFondos.setError(respFondosVOConf.getError());
          return respFondos; // ANZ OCT 2011
          // ANZ OCT 2011. Se comenta para que no mande Exception
          // throw new CondicionesInconsistentesException(
          //		respFondos.getError());
        }

        /*
         * Se ejecuta cuando se le da click en aceptar
         * a la pantalla de Confirmación.
         */

        if (fondosVO.isConfirmacion()) {
          respProcesaFondos =
              capturaFondosDAO.procesaFondos(
                  fondosVO, contratoVO, respFondosVOConf, contrapartesCom, contrapartesIva, sc);
          if (respProcesaFondos != null) {
            if ((respProcesaFondos.getError() == null
                    || respProcesaFondos.getError().trim().length() == 0)
                && respProcesaFondos.getStatus() == 0) {
              respFondos.setOperacion(respProcesaFondos.getOperacion());
              log.info("Número de operación " + respProcesaFondos.getOperacion());

              /** Bitacora */
              log.debug("Bitacora " + fondosVO.getBitacora());
              getBitacoraService()
                  .registraFondos(
                      respProcesaFondos.getOperacion(),
                      fondosVO.getBranch(),
                      fondosVO.getBitacora(),
                      fondosVO.getEjecucion(),
                      fondosVO.getFolio(),
                      null,
                      FCBitacoraService.MODO_NUEVA_OPERACION,
                      sc);

              if (fondosVO.isEfectivo()) {
                RespuestaDepRet respbean = new RespuestaDepRet();
                try {
                  efectivoVO.setOperacion(respFondos.getOperacion().trim());
                  log.info(
                      "Entre a la operacion de efectivo. Operacion="
                          + efectivoVO.getOperacion()
                          + "; datos para efectivo ="
                          + efectivoVO.getDataList());
                  log.info("COMENZANDO A PROCESAR EFECTIVO");

                  respbean = capturaEfectivoService.procesaEfectivo(efectivoVO, sc);
                  respFondos.setOperacionEfe(respbean.getSemfyield());
                } catch (Exception e) {
                  String serr = "No se termino la operación " + "de fondos con efectivo";
                  if (e instanceof CondicionesInconsistentesException) {
                    log.error(serr, e);
                    respFondos.setError(e.getMessage());
                    throw new CondicionesInconsistentesException(respFondos.getError());
                  } else {
                    log.error(serr, e);
                    respFondos.setError(ErrorKeys.ERR_EFECTIVO);
                    throw new CondicionesInconsistentesException(respFondos.getError());
                  }
                }
              }

            } else if (respProcesaFondos.getStatus() != 0) {
              respFondos.setStatus(respProcesaFondos.getStatus());
              return respFondos; // ANZ OCT 2011
              // ANZ OCT 2011. Se comenta para que no mande Exception
              // throw new CondicionesInconsistentesException(
              //		String.valueOf(respFondos.getStatus()));
            } else {
              respFondos.setError(respProcesaFondos.getError());
              return respFondos; // ANZ OCT 2011
              // ANZ OCT 2011. Se comenta para que no mande Exception
              // throw new CondicionesInconsistentesException(
              //		respFondos.getError());
            }
          }
        }
      }
    } catch (Exception e) {
      log.error("ERROR", e);
      respFondos.setError(ErrorKeys.ERR_EFECTIVO);
      if (e instanceof CondicionesInconsistentesException) {
        throw e;
      } else {
        throw new CondicionesInconsistentesException(ErrorKeys.ERR_EFECTIVO);
      }
    }
    return respFondos;
  }