fixes bug #8806
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@67250 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
892c5799f6
commit
e501a4700c
|
@ -399,11 +399,11 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
BigDecimal totalOcd = BigDecimal.ZERO;
|
BigDecimal totalOcd = BigDecimal.ZERO;
|
||||||
if (lsBoletoComissao != null) {
|
if (lsBoletoComissao != null) {
|
||||||
for (BoletoComissao boletoComissao : lsBoletoComissao) {
|
for (BoletoComissao boletoComissao : lsBoletoComissao) {
|
||||||
if (boletoComissao.isOcd()) {
|
if (boletoComissao.isMotivocancelacionGeracaoOcd()) {
|
||||||
totalOcd = totalOcd.add(boletoComissao.getTotal());
|
totalOcd = totalOcd.add(boletoComissao.getTotal());
|
||||||
} else if (boletoComissao.isStatusCancelado() && boletoComissao.isMotivocancelacionDevolvido()) {
|
} else if (boletoComissao.isMotivocancelacionDevolvido()) {
|
||||||
totalDevolvidos = totalDevolvidos.add(boletoComissao.getTotal());
|
totalDevolvidos = totalDevolvidos.add(boletoComissao.getTotal());
|
||||||
} else if (boletoComissao.isStatusCancelado() && boletoComissao.isMotivocancelacionTrocado()) {
|
} else if (boletoComissao.isMotivocancelacionTrocado()) {
|
||||||
totalTroca = totalTroca.add(boletoComissao.getTotal());
|
totalTroca = totalTroca.add(boletoComissao.getTotal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -387,7 +387,7 @@ public class BoletoComissao {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSituacaoBilhete() {
|
public String getSituacaoBilhete() {
|
||||||
if (isOcd()) {
|
if (isMotivocancelacionGeracaoOcd()) {
|
||||||
return "OCD";
|
return "OCD";
|
||||||
} else if ((isStatusCancelado()) && (isMotivocancelacionDevolvido() || isMotivocancelacionCancelado())
|
} else if ((isStatusCancelado()) && (isMotivocancelacionDevolvido() || isMotivocancelacionCancelado())
|
||||||
&& StringUtils.isNotBlank(getDescmotivocancelacion())) {
|
&& StringUtils.isNotBlank(getDescmotivocancelacion())) {
|
||||||
|
@ -786,33 +786,33 @@ public class BoletoComissao {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isVendaGap(getTipoVentaOriginal()) && !isStatusEntregue()) {
|
if(isVendaGap(getTipoVenta()) && !isStatusEntregue()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return isStatusVendido() || isStatusEntregue() || isStatusTroca();
|
return isStatusVendido() || isStatusEntregue() || isStatusTroca();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Define bilhete na aba de venda manual cancelada */
|
/** Define bilhete na aba de venda cancelada */
|
||||||
public boolean isAbaBilheteCancelado() {
|
public boolean isAbaBilheteCancelado() {
|
||||||
if(!isStatusCancelado()) {
|
if(!isStatusCancelado()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isVendaGap(getTipoVentaOriginal()) && StringUtils.isBlank(getNumFolioPreImpreso())) {
|
if(isVendaGap(getTipoVenta()) && isNotNumFolioPreImpressoGerado()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return isMotivocancelacionCancelado();
|
return isMotivocancelacionCancelado();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Define bilhete na aba de venda manual devolvida */
|
/** Define bilhete na aba de venda devolvida */
|
||||||
public boolean isAbaBilheteDevolvido() {
|
public boolean isAbaBilheteDevolvido() {
|
||||||
if(!isStatusCancelado()) {
|
if(!isStatusCancelado()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isVendaGap(getTipoVentaOriginal()) && StringUtils.isBlank(getNumFolioPreImpreso())) {
|
if(isVendaGap(getTipoVenta()) && isNotNumFolioPreImpressoGerado()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -829,7 +829,7 @@ public class BoletoComissao {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isVendaGap(getTipoVentaOriginal())) {
|
if(!isVendaGap(getTipoVenta())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -842,11 +842,11 @@ public class BoletoComissao {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isVendaGap(getTipoVentaOriginal())) {
|
if(!isVendaGap(getTipoVenta())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return isMotivocancelacionCancelado() && StringUtils.isBlank(getNumFolioPreImpreso());
|
return isMotivocancelacionCancelado() && isNotNumFolioPreImpressoGerado();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Define bilhete na aba de gap devolvida */
|
/** Define bilhete na aba de gap devolvida */
|
||||||
|
@ -855,11 +855,11 @@ public class BoletoComissao {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!isVendaGap(getTipoVentaOriginal())) {
|
if(!isVendaGap(getTipoVenta())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (isMotivocancelacionDevolvido() || isMotivocancelacionGeracaoOcd() || isMotivocancelacionTrocado()) && StringUtils.isBlank(getNumFolioPreImpreso());
|
return (isMotivocancelacionDevolvido() || isMotivocancelacionGeracaoOcd() || isMotivocancelacionTrocado()) && isNotNumFolioPreImpressoGerado();
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getValorPagarOcd() {
|
public BigDecimal getValorPagarOcd() {
|
||||||
|
@ -902,4 +902,8 @@ public class BoletoComissao {
|
||||||
this.boletoAnteriorId = boletoAnteriorId;
|
this.boletoAnteriorId = boletoAnteriorId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isNotNumFolioPreImpressoGerado() {
|
||||||
|
return StringUtils.isBlank(getNumFolioPreImpreso());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue