fixed bug #7837: Corrigido o filtro que mostra bilhetes agrupados
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@59646 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2f2319b53d
commit
a14b4d6be3
File diff suppressed because it is too large
Load Diff
|
@ -3,9 +3,7 @@ package com.rjconsultores.ventaboletos.vo.comissao;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
import com.rjconsultores.ventaboletos.constantes.DescricaoTipoVenta;
|
import com.rjconsultores.ventaboletos.constantes.DescricaoTipoVenta;
|
||||||
import com.rjconsultores.ventaboletos.enums.IndStatusBoleto;
|
import com.rjconsultores.ventaboletos.enums.IndStatusBoleto;
|
||||||
|
@ -15,12 +13,15 @@ import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
public class BoletoComissao {
|
public class BoletoComissao {
|
||||||
|
|
||||||
private Long boletoId;
|
private Long boletoId;
|
||||||
|
private Long boletoOriginalId;
|
||||||
private Integer empresaId;
|
private Integer empresaId;
|
||||||
private Integer puntoVentaId;
|
private Integer puntoVentaId;
|
||||||
private String datavenda;
|
private String datavenda;
|
||||||
private Integer tipoVenta;
|
private Integer tipoVenta;
|
||||||
private String indstatusboleto;
|
private String indstatusboleto;
|
||||||
private Integer motivoCancelacionId;
|
private Integer motivoCancelacionId;
|
||||||
|
private Integer motivoCancelacionOriginal1;
|
||||||
|
private Integer motivoCancelacionOriginal2;
|
||||||
private String descmotivocancelacion;
|
private String descmotivocancelacion;
|
||||||
private BigDecimal valorpagado;
|
private BigDecimal valorpagado;
|
||||||
private BigDecimal seguro;
|
private BigDecimal seguro;
|
||||||
|
@ -65,6 +66,7 @@ public class BoletoComissao {
|
||||||
private boolean conferido;
|
private boolean conferido;
|
||||||
|
|
||||||
private Date feccorrida;
|
private Date feccorrida;
|
||||||
|
|
||||||
private Integer corridaId;
|
private Integer corridaId;
|
||||||
|
|
||||||
public Integer getEmpresaId() {
|
public Integer getEmpresaId() {
|
||||||
|
@ -187,6 +189,14 @@ public class BoletoComissao {
|
||||||
this.boletoId = boletoId;
|
this.boletoId = boletoId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setBoletoOriginalId(Long boletoOriginalId) {
|
||||||
|
this.boletoOriginalId = boletoOriginalId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getBoletoOriginalId() {
|
||||||
|
return boletoOriginalId;
|
||||||
|
}
|
||||||
|
|
||||||
public String getNumAsiento() {
|
public String getNumAsiento() {
|
||||||
return numAsiento;
|
return numAsiento;
|
||||||
}
|
}
|
||||||
|
@ -285,7 +295,8 @@ public class BoletoComissao {
|
||||||
if (getBoletoId() == null) {
|
if (getBoletoId() == null) {
|
||||||
if (other.getBoletoId() != null)
|
if (other.getBoletoId() != null)
|
||||||
return false;
|
return false;
|
||||||
} else if (!getBoletoId().equals(other.getBoletoId()))
|
}
|
||||||
|
else if (!getBoletoId().equals(other.getBoletoId()))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -355,14 +366,12 @@ public class BoletoComissao {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getTotal() {
|
public BigDecimal getTotal() {
|
||||||
BigDecimal total = BigDecimal.ZERO;
|
return BigDecimal.ZERO
|
||||||
total = total.add(getValorpagado())
|
.add(getValorpagado())
|
||||||
.add(getEmbarque())
|
.add(getEmbarque())
|
||||||
.add(getSeguro())
|
.add(getSeguro())
|
||||||
.add(getPedagio())
|
.add(getPedagio())
|
||||||
.add(getSeguro());
|
.add(getSeguro());
|
||||||
|
|
||||||
return total;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescTipoVenta() {
|
public String getDescTipoVenta() {
|
||||||
|
@ -370,22 +379,30 @@ public class BoletoComissao {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSituacaoBilhete() {
|
public String getSituacaoBilhete() {
|
||||||
if(isOcd()) {
|
if (isOcd()) {
|
||||||
return "OCD";
|
return "OCD";
|
||||||
} else if((isStatusCancelado()) && (isMotivocancelacionDevolvido() || isMotivocancelacionCancelado()) && StringUtils.isNotBlank(getDescmotivocancelacion())) {
|
}
|
||||||
|
else if ((isStatusCancelado()) && (isMotivocancelacionDevolvido() || isMotivocancelacionCancelado())
|
||||||
|
&& StringUtils.isNotBlank(getDescmotivocancelacion())) {
|
||||||
return getDescmotivocancelacion();
|
return getDescmotivocancelacion();
|
||||||
} else if((isStatusVendido() || isStatusCancelado()) && !isMotivocancelacionDevolvido() && !isMotivocancelacionCancelado()) {
|
}
|
||||||
|
else if ((isStatusVendido() || isStatusCancelado())
|
||||||
|
&& !isMotivocancelacionDevolvido() && !isMotivocancelacionCancelado()) {
|
||||||
if (isStatusCancelado() && isMotivocancelacionTrocado()) {
|
if (isStatusCancelado() && isMotivocancelacionTrocado()) {
|
||||||
return "B. VENDIDO TROCADO";
|
return "B. VENDIDO TROCADO";
|
||||||
} else if (isStatusVendido() && isMotivocancelacionTransferido()) {
|
}
|
||||||
|
else if (isStatusVendido() && isMotivocancelacionTransferido()) {
|
||||||
return "B. VENDIDO TRANSFERIDO";
|
return "B. VENDIDO TRANSFERIDO";
|
||||||
}
|
}
|
||||||
} else if(isStatusTroca()) {
|
}
|
||||||
|
else if (isStatusTroca()) {
|
||||||
if (isVendaBilheteTroca(getTipoVenta()) || isVendaGap(getTipoVenta())) {
|
if (isVendaBilheteTroca(getTipoVenta()) || isVendaGap(getTipoVenta())) {
|
||||||
return "B. DA TROCA";
|
return "B. DA TROCA";
|
||||||
} else if (isVendaBilheteTransferencia(getTipoVenta()) || isVendaGap(getTipoVenta())) {
|
}
|
||||||
|
else if (isVendaBilheteTransferencia(getTipoVenta()) || isVendaGap(getTipoVenta())) {
|
||||||
return "B. DA TRANSFERENCIA";
|
return "B. DA TRANSFERENCIA";
|
||||||
} else if (isVendaBilheteConfirmaAberto(getTipoVenta())) {
|
}
|
||||||
|
else if (isVendaBilheteConfirmaAberto(getTipoVenta())) {
|
||||||
return "CONFIRMAÇÃO ABERTO";
|
return "CONFIRMAÇÃO ABERTO";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -463,7 +480,8 @@ public class BoletoComissao {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getTipoVentaOriginal() {
|
public Integer getTipoVentaOriginal() {
|
||||||
return tipoVentaOriginal2 != null ? tipoVentaOriginal2 : tipoVentaOriginal1 != null ? tipoVentaOriginal1 : tipoVenta;
|
return tipoVentaOriginal2 != null ? tipoVentaOriginal2
|
||||||
|
: tipoVentaOriginal1 != null ? tipoVentaOriginal1 : tipoVenta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getTipoVentaOriginal1() {
|
public Integer getTipoVentaOriginal1() {
|
||||||
|
@ -490,14 +508,40 @@ public class BoletoComissao {
|
||||||
this.ocdId = ocdId;
|
this.ocdId = ocdId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isBoletoOriginal() {
|
||||||
|
return boletoOriginalId == null
|
||||||
|
&& getMotivoCancelacionOriginal() != null
|
||||||
|
&& getMotivoCancelacionOriginal() == Constantes.MVO_CANCEL_BOLETO_AGRUPAMENTO.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMotivoCancelacionOriginal() {
|
||||||
|
return motivoCancelacionOriginal2 != null ? motivoCancelacionOriginal2 : motivoCancelacionOriginal1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMotivoCancelacionOriginal1() {
|
||||||
|
return motivoCancelacionOriginal1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMotivoCancelacionOriginal1(Integer motivoCancelacionOriginal1) {
|
||||||
|
this.motivoCancelacionOriginal1 = motivoCancelacionOriginal1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getMotivoCancelacionOriginal2() {
|
||||||
|
return motivoCancelacionOriginal2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMotivoCancelacionOriginal2(Integer motivoCancelacionOriginal2) {
|
||||||
|
this.motivoCancelacionOriginal2 = motivoCancelacionOriginal2;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isVendaManual(Integer tipoVenta) {
|
public boolean isVendaManual(Integer tipoVenta) {
|
||||||
return tipoVenta == Constantes.TPV_MANUAL.intValue();
|
return tipoVenta == Constantes.TPV_MANUAL.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVendaGap(Integer tipoVenta) {
|
public boolean isVendaGap(Integer tipoVenta) {
|
||||||
return tipoVenta == Constantes.TPV_BOLETO_REMOTO.intValue() ||
|
return tipoVenta == Constantes.TPV_BOLETO_REMOTO.intValue()
|
||||||
tipoVenta == Constantes.TPV_CALL_CENTER.intValue() ||
|
|| tipoVenta == Constantes.TPV_CALL_CENTER.intValue()
|
||||||
tipoVenta == Constantes.TPV_POR_INTERNET.intValue();
|
|| tipoVenta == Constantes.TPV_POR_INTERNET.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isVendaBilheteNormal(Integer tipoVenta) {
|
public boolean isVendaBilheteNormal(Integer tipoVenta) {
|
||||||
|
@ -541,25 +585,29 @@ public class BoletoComissao {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMotivocancelacionDevolvido() {
|
public boolean isMotivocancelacionDevolvido() {
|
||||||
return !isSemMotivocancelacion() && (getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO.intValue() ||
|
return !isSemMotivocancelacion() && (getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO.intValue()
|
||||||
getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_50.intValue() ||
|
|| getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_50.intValue()
|
||||||
getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_100.intValue());
|
|| getMotivoCancelacionId() == Constantes.MVO_CANCEL_DEVOLUCAO_CONTIGENCIA_100.intValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMotivocancelacionEntregaGap() {
|
public boolean isMotivocancelacionEntregaGap() {
|
||||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_BOLETO_ENTREGADO.intValue();
|
return !isSemMotivocancelacion()
|
||||||
|
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_BOLETO_ENTREGADO.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMotivocancelacionTransferido() {
|
public boolean isMotivocancelacionTransferido() {
|
||||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_TRANSFERENCIA.intValue();
|
return !isSemMotivocancelacion()
|
||||||
|
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_TRANSFERENCIA.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMotivocancelacionTrocado() {
|
public boolean isMotivocancelacionTrocado() {
|
||||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_TROCA.intValue();
|
return !isSemMotivocancelacion()
|
||||||
|
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_TROCA.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isMotivocancelacionCheckin() {
|
public boolean isMotivocancelacionCheckin() {
|
||||||
return !isSemMotivocancelacion() && getMotivoCancelacionId() == Constantes.MVO_CANCEL_CHECKIN.intValue();
|
return !isSemMotivocancelacion()
|
||||||
|
&& getMotivoCancelacionId() == Constantes.MVO_CANCEL_CHECKIN.intValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA BILHETE MANUAL */
|
/** ABA BILHETE MANUAL */
|
||||||
|
@ -569,27 +617,32 @@ public class BoletoComissao {
|
||||||
|
|
||||||
/** ABA BILHETE VENDIDO */
|
/** ABA BILHETE VENDIDO */
|
||||||
public boolean isBilheteNormalVendido() {
|
public boolean isBilheteNormalVendido() {
|
||||||
return (isVendaBilheteNormal(getTipoVenta()) && isSemMotivocancelacion() && isStatusVendido()) || // Venda sem alteração
|
if (nombpasajero.startsWith("ABILIO"))
|
||||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado()) || // Venda trocada
|
System.out.println("break point");
|
||||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido()) || // Venda transferida
|
|
||||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado()) || // Venda cancelada
|
return (isVendaBilheteNormal(getTipoVenta()) && isSemMotivocancelacion()
|
||||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido()) || // Venda devolvida
|
&& isStatusVendido()) // Venda sem alteração
|
||||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionAgrupamento()) || // Agrupamento de corrida
|
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado()) // Venda trocada
|
||||||
(isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCheckin()) || // Venda normal Checkin
|
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido()) // Venda transferida
|
||||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) || // Venda troca Checkin
|
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado()) // Venda cancelada
|
||||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) || // Venda transferencia Checkin
|
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido()) // Venda devolvida
|
||||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion()) || // Novo bilhete da troca
|
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionAgrupamento() && isBoletoOriginal()) // Agrupamento de corrida
|
||||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusVendido() && isSemMotivocancelacion()) || // Novo bilhete de agrupamento de corrida
|
|| (isVendaBilheteNormal(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCheckin()) // Venda normal Checkin
|
||||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) || // Novo bilhete da troca devolvido
|
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) // Venda troca Checkin
|
||||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) || // Novo bilhete transferido devolvido
|
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCheckin()) // Venda transferencia Checkin
|
||||||
(isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) || // Novo bilhete da troca cancelado
|
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion()) // Novo bilhete da troca
|
||||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) || // Novo bilhete transferido cancelado
|
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusVendido() && isSemMotivocancelacion()) // Novo bilhete de agrupamento de corrida
|
||||||
(isVendaBilheteTransferencia(getTipoVenta()) && isStatusEntregue() && isSemMotivocancelacion()); // bilhete transferido entregue
|
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) // Novo bilhete da troca devolvido
|
||||||
|
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) // Novo bilhete transferido devolvido
|
||||||
|
|| (isVendaBilheteTroca(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido()) // Novo bilhete da troca cancelado
|
||||||
|
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado()) // Novo bilhete transferido cancelado
|
||||||
|
|| (isVendaBilheteTransferencia(getTipoVenta()) && isStatusEntregue() && isSemMotivocancelacion()); // bilhete transferido entregue
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA BILHETE DEVOLVIDO */
|
/** ABA BILHETE DEVOLVIDO */
|
||||||
public boolean isBilheteNormalTrocado() {
|
public boolean isBilheteNormalTrocado() {
|
||||||
return isVendaBilheteNormal(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado();
|
return isVendaBilheteNormal(getTipoVenta()) && isStatusCancelado()
|
||||||
|
&& isMotivocancelacionTrocado();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA BILHETE VENDIDO */
|
/** ABA BILHETE VENDIDO */
|
||||||
|
@ -659,43 +712,49 @@ public class BoletoComissao {
|
||||||
|
|
||||||
/** ABA GAP VENDIDA */
|
/** ABA GAP VENDIDA */
|
||||||
public boolean isBilheteGapVendido() {
|
public boolean isBilheteGapVendido() {
|
||||||
return (isVendaGap(getTipoVenta()) && isSemMotivocancelacion() && isStatusVendido() && isSemNumFolioSistema()) || // Gap sem alteração
|
return (isVendaGap(getTipoVenta()) && isSemMotivocancelacion() && isStatusVendido()
|
||||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) || // Gap entregue
|
&& isSemNumFolioSistema()) // Gap sem alteração
|
||||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) || // Gap entregue
|
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) // Gap entregue
|
||||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado() && isSemNumFolioSistema()) || // Gap trocada
|
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionEntregaGap() && isSemNumFolioSistema()) // Gap entregue
|
||||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido() && isSemNumFolioSistema()) || // Gap transferida
|
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTrocado() && isSemNumFolioSistema()) // Gap trocada
|
||||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) || // Gap cancelada
|
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionTransferido() && isSemNumFolioSistema()) // Gap transferida
|
||||||
(isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) || // Gap devolvida
|
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) // Gap cancelada
|
||||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion() && isSemNumFolioSistema()) || // Gap Novo bilhete da troca
|
|| (isVendaGap(getTipoVenta()) && isStatusVendido() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) // Gap devolvida
|
||||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) || // Gap Novo bilhete da troca devolvido
|
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isSemMotivocancelacion() && isSemNumFolioSistema()) // Gap Novo bilhete da troca
|
||||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) || // Gap Novo bilhete transferido devolvido
|
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) // Gap Novo bilhete da troca devolvido
|
||||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) || // Gap Novo bilhete da troca cancelado
|
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()) // Gap Novo bilhete transferido devolvido
|
||||||
(isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()); // Gap Novo bilhete transferido cancelado
|
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionDevolvido() && isSemNumFolioSistema()) // Gap Novo bilhete da troca cancelado
|
||||||
|
|| (isVendaGap(getTipoVenta()) && isStatusTroca() && isMotivocancelacionCancelado() && isSemNumFolioSistema()); // Gap Novo bilhete transferido cancelado
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA GAP DEVOLVIDO */
|
/** ABA GAP DEVOLVIDO */
|
||||||
public boolean isBilheteGapTrocado() {
|
public boolean isBilheteGapTrocado() {
|
||||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado() && isSemNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||||
|
&& isMotivocancelacionTrocado() && isSemNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA GAP DEVOLVIDO */
|
/** ABA GAP DEVOLVIDO */
|
||||||
public boolean isBilheteGapTrocadoDevolvido() {
|
public boolean isBilheteGapTrocadoDevolvido() {
|
||||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionTrocado() && isStatusCancelado() && isSemNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isMotivocancelacionTrocado()
|
||||||
|
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA GAP CANCELADO */
|
/** ABA GAP CANCELADO */
|
||||||
public boolean isBilheteGapTrocadoCancelado() {
|
public boolean isBilheteGapTrocadoCancelado() {
|
||||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado() && isStatusCancelado() && isSemNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado()
|
||||||
|
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA GAP CANCELADO */
|
/** ABA GAP CANCELADO */
|
||||||
public boolean isBilheteGapCancelado() {
|
public boolean isBilheteGapCancelado() {
|
||||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado() && isStatusCancelado() && isSemNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isMotivocancelacionCancelado()
|
||||||
|
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA GAP DEVOLVIDO */
|
/** ABA GAP DEVOLVIDO */
|
||||||
public boolean isBilheteGapDevolvido() {
|
public boolean isBilheteGapDevolvido() {
|
||||||
return isVendaGap(getTipoVenta()) && isMotivocancelacionDevolvido() && isStatusCancelado() && isSemNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isMotivocancelacionDevolvido()
|
||||||
|
&& isStatusCancelado() && isSemNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA BILHETE VENDIDO */
|
/** ABA BILHETE VENDIDO */
|
||||||
|
@ -705,17 +764,20 @@ public class BoletoComissao {
|
||||||
|
|
||||||
/** ABA BILHETE DEVOLVIDO */
|
/** ABA BILHETE DEVOLVIDO */
|
||||||
public boolean isBilheteEntregaGapTrocado() {
|
public boolean isBilheteEntregaGapTrocado() {
|
||||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionTrocado() && isComNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||||
|
&& isMotivocancelacionTrocado() && isComNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA BILHETE DEVOLVIDO */
|
/** ABA BILHETE DEVOLVIDO */
|
||||||
public boolean isBilheteEntregaGapDevolvido() {
|
public boolean isBilheteEntregaGapDevolvido() {
|
||||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionDevolvido() && isComNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||||
|
&& isMotivocancelacionDevolvido() && isComNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ABA BILHETE CANCELADO */
|
/** ABA BILHETE CANCELADO */
|
||||||
public boolean isBilheteEntregaGapCancelado() {
|
public boolean isBilheteEntregaGapCancelado() {
|
||||||
return isVendaGap(getTipoVenta()) && isStatusCancelado() && isMotivocancelacionCancelado() && isComNumFolioSistema();
|
return isVendaGap(getTipoVenta()) && isStatusCancelado()
|
||||||
|
&& isMotivocancelacionCancelado() && isComNumFolioSistema();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isStatusVendido() {
|
public boolean isStatusVendido() {
|
||||||
|
@ -804,15 +866,13 @@ public class BoletoComissao {
|
||||||
|
|
||||||
public String getFeccorridaServico() {
|
public String getFeccorridaServico() {
|
||||||
StringBuilder str = new StringBuilder();
|
StringBuilder str = new StringBuilder();
|
||||||
if(getFeccorrida() != null) {
|
if (getFeccorrida() != null) {
|
||||||
str.append(DateUtil.getStringDate(getFeccorrida(), "dd/MM"));
|
str.append(DateUtil.getStringDate(getFeccorrida(), "dd/MM"));
|
||||||
}
|
}
|
||||||
|
if (getCorridaId() != null) {
|
||||||
if(getCorridaId() != null) {
|
if (str.length() > 0) {
|
||||||
if(str.length() > 0) {
|
|
||||||
str.append(" - ");
|
str.append(" - ");
|
||||||
}
|
}
|
||||||
|
|
||||||
str.append(getCorridaId());
|
str.append(getCorridaId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -820,36 +880,34 @@ public class BoletoComissao {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBilheteGap() {
|
public boolean isBilheteGap() {
|
||||||
return isBilheteGapVendido() ||
|
return isBilheteGapVendido()
|
||||||
isBilheteGapCancelado() ||
|
|| isBilheteGapCancelado()
|
||||||
isBilheteGapTrocado() ||
|
|| isBilheteGapTrocado()
|
||||||
isBilheteGapTrocadoCancelado() ||
|
|| isBilheteGapTrocadoCancelado()
|
||||||
isBilheteGapTrocadoDevolvido();
|
|| isBilheteGapTrocadoDevolvido();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isTotalizarFormapago() {
|
public boolean isTotalizarFormapago() {
|
||||||
boolean totalizar = isTotalizarTipovenda();
|
boolean totalizar = isTotalizarTipovenda();
|
||||||
if(totalizar) {
|
if (totalizar) {
|
||||||
totalizar = !isOcd();
|
totalizar = !isOcd();
|
||||||
}
|
}
|
||||||
return totalizar;
|
return totalizar;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isTotalizarTipovenda() {
|
private boolean isTotalizarTipovenda() {
|
||||||
return isBilhetesManualVendido() ||
|
return isBilhetesManualVendido()
|
||||||
isBilheteNormalVendido() ||
|
|| isBilheteNormalVendido()
|
||||||
isBilheteNormalTrocado() ||
|
|| isBilheteNormalTrocado()
|
||||||
isBilheteNormalTrocadoCancelado() ||
|
|| isBilheteNormalTrocadoCancelado()
|
||||||
isBilheteNormalTrocadoDevolvido() ||
|
|| isBilheteNormalTrocadoDevolvido()
|
||||||
isBilheteNormalCancelado() ||
|
|| isBilheteNormalCancelado()
|
||||||
isBilheteNormalDevolvido() ||
|
|| isBilheteNormalDevolvido()
|
||||||
isBilheteAberto() ||
|
|| isBilheteAberto()
|
||||||
isBilheteGapCancelado() ||
|
|| isBilheteGapCancelado()
|
||||||
isBilheteGapDevolvido() ||
|
|| isBilheteGapDevolvido()
|
||||||
isBilheteGapVendido() ||
|
|| isBilheteGapVendido()
|
||||||
isBilheteGapTrocadoCancelado() ||
|
|| isBilheteGapTrocadoCancelado()
|
||||||
isBilheteGapTrocadoDevolvido();
|
|| isBilheteGapTrocadoDevolvido();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue