diff --git a/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java index 49a854ca7..9480d4d72 100644 --- a/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java +++ b/src/com/rjconsultores/ventaboletos/service/impl/ConferenciaComissaoServiceImpl.java @@ -499,11 +499,11 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic } public boolean isBilhetesNormalVendido(BoletoComissao boletoComissao) { - return (boletoComissao.getTipoVenta() == Constantes.TPV_DIRECTO_NORMAL.intValue() || - boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue()) && - (boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()) || - (boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue()) && - boletoComissao.getMotivoCancelacionId() == null)); + return (boletoComissao.getTipoVenta() == Constantes.TPV_DIRECTO_NORMAL.intValue() || boletoComissao.getTipoVenta() == Constantes.TPV_CHECKIN_VIAGEM.intValue()) + && + (boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()) && + (boletoComissao.getMotivoCancelacionId() == null || + boletoComissao.getMotivoCancelacionId() == Constantes.MVO_CANCEL_TROCA.intValue())); } public boolean isBilhetesImpresso(BoletoComissao boletoComissao) { @@ -528,7 +528,6 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic public boolean isBilhetesNormalTrocado(BoletoComissao boletoComissao) { return (boletoComissao.getTipoVenta() == Constantes.TPV_TRANSFERENCIAS.intValue() && (boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue()) && - boletoComissao.getMotivoCancelacionId() != null && boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue())) || (boletoComissao.getTipoVenta() == Constantes.TPV_TRANSFERENCIAS.intValue() && @@ -543,14 +542,15 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic } public boolean isBilhetesNormalTranferido(BoletoComissao boletoComissao) { - return boletoComissao.getTipoVenta() == Constantes.TPV_CAMBIO_VIAJE.intValue() && + return (boletoComissao.getTipoVenta() == Constantes.TPV_CAMBIO_VIAJE.intValue()) && boletoComissao.getTipoVentaOriginal() == Constantes.TPV_DIRECTO_NORMAL.intValue() && boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue()); } public boolean isBilhetesGapVendido(BoletoComissao boletoComissao) { return boletoComissao.getTipoVenta() == Constantes.TPV_BOLETO_REMOTO.intValue() && - boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()); + (boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.V.getShortValue()) || + boletoComissao.getIndstatusboleto().equals(IndStatusBoleto.T.getShortValue())); } public boolean isBilhetesGapCancelado(BoletoComissao boletoComissao) { diff --git a/src/com/rjconsultores/ventaboletos/vo/comissao/BoletoComissao.java b/src/com/rjconsultores/ventaboletos/vo/comissao/BoletoComissao.java index 64d510972..716be5667 100644 --- a/src/com/rjconsultores/ventaboletos/vo/comissao/BoletoComissao.java +++ b/src/com/rjconsultores/ventaboletos/vo/comissao/BoletoComissao.java @@ -366,6 +366,15 @@ public class BoletoComissao { } else if(getIndstatusboleto().equalsIgnoreCase(IndStatusBoleto.C.getShortValue()) && StringUtils.isNotBlank(getDescmotivocancelacion())) { return getDescmotivocancelacion(); + } else if(getIndstatusboleto().equalsIgnoreCase(IndStatusBoleto.T.getShortValue())) { + if (tipoVenta == Constantes.TPV_TRANSFERENCIAS.intValue()) { + return "TROCADO"; + } else if (tipoVenta == Constantes.TPV_CAMBIO_VIAJE.intValue()) { + return "TRANSFERIDO"; + } else { + IndStatusBoleto indStatusBoleto = IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto()); + return indStatusBoleto != null ? indStatusBoleto.getValue() : ""; + } } else { IndStatusBoleto indStatusBoleto = IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto()); return indStatusBoleto != null ? indStatusBoleto.getValue() : "";