diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java index 859ea8dd5..8ef147481 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java @@ -430,9 +430,8 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic @Override public boolean isEventosFinanceirosSemConferencia(List lsEventosFinanceiros) throws BusinessException { for (EventosFinanceirosVO eventosFinanceiros : lsEventosFinanceiros) { - if ((eventosFinanceiros.isExigeConferencia() || (eventosFinanceiros.getExigeConferenciaAba() != null && eventosFinanceiros.getExigeConferenciaAba()) - || eventosFinanceiros.getTipoeventoextradebcred().intValue() != 0) && - (!eventosFinanceiros.isConferido() && eventosFinanceiros.getLogconferenciaId() == null)) { + if ((eventosFinanceiros.isExigeConferencia() || eventosFinanceiros.getExigeConferenciaAba()) && + (!eventosFinanceiros.isConferido() && eventosFinanceiros.getLogconferenciaId() == null)) { return true; } } @@ -599,35 +598,6 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic } - /** - * Subtrai do total de forma pago em dinheiro o valor total pago das ocds. - * @param totalOcd - * @param resumoComissao - */ - private void subtrairOcdFormapagoDinheiro(OcdVO totalOcd, ResumoComissao resumoComissao) { - if(totalOcd == null || totalOcd.getValorPagar() == null) { - return; - } - - FormapagoVO formapagoDinheiro = null; - for (FormapagoVO formapagoVO : resumoComissao.getTotalFormapago()) { - if(formapagoVO.getFormapagoId().equals(Constantes.FORMA_PAGO_DINHEIRO.intValue())) { - formapagoDinheiro = formapagoVO; - break; - } - } - - if(formapagoDinheiro == null) { - formapagoDinheiro = new FormapagoVO(Constantes.FORMA_PAGO_DINHEIRO.intValue(), "DINHEIRO", null, BigDecimal.ZERO); - } - - formapagoDinheiro.subtract(totalOcd.getValorPagar()); - - if(!resumoComissao.getTotalFormapago().contains(formapagoDinheiro)) { - resumoComissao.getTotalFormapago().add(formapagoDinheiro); - } - } - /** * Totaliza os valores conforme o forma pago, apenas do bilhetes que geraram registros em caixa
* (+) Abas: Bilhetes Manual, Bilhetes, Gap Venda
diff --git a/src/com/rjconsultores/ventaboletos/vo/comissao/EventosFinanceirosVO.java b/src/com/rjconsultores/ventaboletos/vo/comissao/EventosFinanceirosVO.java index 325a69e88..86bb4d283 100644 --- a/src/com/rjconsultores/ventaboletos/vo/comissao/EventosFinanceirosVO.java +++ b/src/com/rjconsultores/ventaboletos/vo/comissao/EventosFinanceirosVO.java @@ -4,7 +4,6 @@ import java.math.BigDecimal; import java.util.Date; import org.apache.commons.lang.StringUtils; -import org.hibernate.Hibernate; import org.zkoss.util.resource.Labels; import com.rjconsultores.ventaboletos.entidad.Conferencia; @@ -204,7 +203,20 @@ public class EventosFinanceirosVO { } public boolean isExigeConferencia() { - return getComemptipoeventoextraId() != null || getComempformapagoId() != null; + return getComemptipoeventoextraId() != null || getComempformapagoId() != null || isExigeConferenciaTipoEvento(); + } + + public boolean isExigeConferenciaTipoEvento() { + if(getTipoeventoextradebcred() != null && getTipoeventoextradebcred() != 0) { + if(getTipoeventoextradebcred() == 1){ + return true; + }else if(isDebito() && getTipoeventoextradebcred() == 2){ + return true; + }else if(isCredito() && getTipoeventoextradebcred() == 3){ + return true; + } + } + return false; } public Boolean getExigeConferenciaAba() {