fixes bug #8826
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@67360 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
260cfc451e
commit
5345139af2
|
@ -63,7 +63,8 @@ public interface ConferenciaComissaoService extends GenericService<Conferencia,
|
|||
|
||||
public ResumoComissao gerarResumo(Conferencia conferencia, List<BoletoComissao> boletoComissaos, List<EventosFinanceirosVO> lsEventosFinanceiros, BigDecimal totalBilhetesManual, BigDecimal totalBilhetesVendidos, BigDecimal totalBilhetesCancelados,
|
||||
BigDecimal totalBilhetesDevolvidos, BigDecimal totalBilhetesGap, BigDecimal totalBilhetesGapCancelados, BigDecimal totalBilhetesGapDevolvidos,
|
||||
BigDecimal totalCreditosEventoFinanceiros, BigDecimal totalDebitosEventoFinanceiros, OcdVO totalOcd) throws BusinessException;
|
||||
BigDecimal totalCreditosEventoFinanceiros, BigDecimal totalDebitosEventoFinanceiros, OcdVO totalOcd,
|
||||
BigDecimal totalBilhetesTrocados, BigDecimal totalBilhetesGapTrocados) throws BusinessException;
|
||||
|
||||
public EtiquetaMalote decodificarEtiquetaMalote(String codigoBarras) throws BusinessException;
|
||||
|
||||
|
|
|
@ -384,6 +384,10 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
BigDecimal total = BigDecimal.ZERO;
|
||||
if (lsBoletoComissao != null) {
|
||||
for (BoletoComissao boletoComissao : lsBoletoComissao) {
|
||||
if(boletoComissao.isNaoSomarBilhete()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if(indreimpression != null && !indreimpression.equals(boletoComissao.getIndreimpresion())) {
|
||||
continue;
|
||||
}
|
||||
|
@ -448,13 +452,15 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
|||
@Override
|
||||
public ResumoComissao gerarResumo(Conferencia conferencia, List<BoletoComissao> boletoComissaos, List<EventosFinanceirosVO> lsEventosFinanceiros, BigDecimal totalBilhetesManual, BigDecimal totalBilhetesVendidos,
|
||||
BigDecimal totalBilhetesCancelados, BigDecimal totalBilhetesDevolvidos, BigDecimal totalBilhetesGap, BigDecimal totalBilhetesGapCancelados,
|
||||
BigDecimal totalBilhetesGapDevolvidos, BigDecimal totalCreditosEventoFinanceiros, BigDecimal totalDebitosEventoFinanceiros, OcdVO totalOcd) throws BusinessException {
|
||||
BigDecimal totalBilhetesGapDevolvidos, BigDecimal totalCreditosEventoFinanceiros, BigDecimal totalDebitosEventoFinanceiros, OcdVO totalOcd,
|
||||
BigDecimal totalBilhetesTrocados, BigDecimal totalBilhetesGapTrocados) throws BusinessException {
|
||||
ResumoComissao resumoComissao = new ResumoComissao();
|
||||
resumoComissao.setTotalDevolvidos(totalBilhetesDevolvidos.add(totalBilhetesGapDevolvidos));
|
||||
resumoComissao.setTotalCancelados(totalBilhetesCancelados.add(totalBilhetesGapCancelados));
|
||||
resumoComissao.setTotalVendas(totalBilhetesVendidos.add(totalBilhetesManual).add(totalBilhetesGap));
|
||||
resumoComissao.setTotalReceitas(totalCreditosEventoFinanceiros);
|
||||
resumoComissao.setTotalDespesas(totalDebitosEventoFinanceiros);
|
||||
resumoComissao.setTotalTroca(totalBilhetesTrocados.add(totalBilhetesGapTrocados));
|
||||
resumoComissao.setTotalOcd(totalOcd);
|
||||
|
||||
carregarTotalFormapago(resumoComissao, boletoComissaos, lsEventosFinanceiros);
|
||||
|
|
|
@ -392,6 +392,10 @@ public class BoletoComissao {
|
|||
return "OCD";
|
||||
}
|
||||
|
||||
if(isMotivocancelacionAgrupamento() || isMotivocancelacionCheckin()) {
|
||||
return getDescmotivocancelacion();
|
||||
}
|
||||
|
||||
if(isStatusVendido()) {
|
||||
return IndStatusBoleto.getIndStatusBoleto(getIndstatusboleto()).getValue();
|
||||
}
|
||||
|
@ -759,8 +763,18 @@ public class BoletoComissao {
|
|||
|
||||
public boolean isTotalizarFormapago() {
|
||||
boolean totalizar = isTotalizarTipovenda();
|
||||
totalizar = !isOcd();
|
||||
totalizar = !getIndreimpresion();
|
||||
if(totalizar) {
|
||||
totalizar = !isOcd();
|
||||
}
|
||||
if(totalizar) {
|
||||
totalizar = !getIndreimpresion();
|
||||
}
|
||||
if(totalizar) {
|
||||
totalizar = !(isStatusTroca() && isVendaBilheteTransferencia(getTipoVenta()));
|
||||
}
|
||||
if(totalizar) {
|
||||
totalizar = !isVendaBilheteConfirmaAberto(getTipoVenta());
|
||||
}
|
||||
return totalizar;
|
||||
}
|
||||
|
||||
|
@ -851,7 +865,7 @@ public class BoletoComissao {
|
|||
if(isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(!isVendaGap(getTipoVenta()) && !isVendaBilheteTransferencia(getTipoVenta())) {
|
||||
return false;
|
||||
}
|
||||
|
@ -868,7 +882,7 @@ public class BoletoComissao {
|
|||
if(!isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(!isVendaGap(getTipoVenta())) {
|
||||
return false;
|
||||
}
|
||||
|
@ -881,7 +895,7 @@ public class BoletoComissao {
|
|||
if(!isStatusCancelado()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if(!isVendaGap(getTipoVenta())) {
|
||||
return false;
|
||||
}
|
||||
|
@ -933,4 +947,25 @@ public class BoletoComissao {
|
|||
this.indreimpresion = indreimpresion;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "BoletoComissao [boletoId=" + boletoId + ", tipoVenta=" + tipoVenta + ", indstatusboleto=" + indstatusboleto + ", motivoCancelacionId=" + motivoCancelacionId + ", descmotivocancelacion=" + descmotivocancelacion + ", tipoVentaOriginal1=" + tipoVentaOriginal1 + ", tipoVentaOriginal2=" + tipoVentaOriginal2 + ", indCancelacion=" + indCancelacion + ", indreimpresion=" + indreimpresion + "]";
|
||||
}
|
||||
|
||||
public boolean isNaoSomarBilhete() {
|
||||
if(isStatusTroca() && isVendaBilheteTransferencia(getTipoVenta())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(isStatusEntregue()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if(isMotivocancelacionAgrupamento() || isMotivocancelacionCheckin()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue