예제 #1
0
  public void distribuirAportes2() {
    /*BigDecimal totalAportes = comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo().add(comprobanteSeleccionado.getAportecomitente()));
    System.out.println("Total Aportes Sumados = " + totalAportes.floatValue());*/

    if (comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f) {
      comprobanteSeleccionado.setAportecomitente(
          comprobanteSeleccionado
              .getMontoaprobado()
              .subtract(
                  comprobanteSeleccionado
                      .getAporteuniversidad()
                      .add(comprobanteSeleccionado.getAporteorganismo())));
    }
  }
예제 #2
0
  public void distribuirAportes1() {

    /*BigDecimal totalAportes = comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo().add(comprobanteSeleccionado.getAportecomitente()));
    System.out.println("Total Aportes Sumados = " + totalAportes.floatValue());*/

    if (null == comprobanteSeleccionado.getAporteuniversidad()) {
      System.out.println("comprobanteSeleccionado.getAporteuniversidad() >> NULO");
    }

    if (null == comprobanteSeleccionado.getAporteorganismo()) {
      System.out.println("comprobanteSeleccionado.getAporteorganismo() >> NULO");
    }

    if (null == comprobanteSeleccionado.getMontoaprobado()) {
      System.out.println("comprobanteSeleccionado.getMontoaprobado() >> NULO");
    }

    try {
      if (comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f) {
        comprobanteSeleccionado.setAporteorganismo(
            comprobanteSeleccionado
                .getMontoaprobado()
                .subtract(comprobanteSeleccionado.getAporteuniversidad()));
        comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);
      }
    } catch (NullPointerException npe) {
      System.out.println("Error de NullPointerException");
      npe.printStackTrace();
    }
  }