fixes bug #8826
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@67432 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
441fab21cf
commit
3236b93344
|
@ -39,6 +39,7 @@ import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
import com.rjconsultores.ventaboletos.service.PuntoVentaService;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
|
import com.rjconsultores.ventaboletos.utilerias.LocaleUtil;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.MoneyHelper;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.SendMail;
|
import com.rjconsultores.ventaboletos.utilerias.SendMail;
|
||||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
import com.rjconsultores.ventaboletos.vo.comissao.BoletoComissao;
|
import com.rjconsultores.ventaboletos.vo.comissao.BoletoComissao;
|
||||||
|
@ -392,8 +393,10 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((lStatusBilhete == null || lStatusBilhete.contains(boletoComissao.getIndstatusboletoEnum())) &&
|
if ((lStatusBilhete == null || lStatusBilhete.contains(boletoComissao.getIndstatusboletoEnum())) &&
|
||||||
!boletoComissao.isVendaBilheteConfirmaAberto(boletoComissao.getTipoVenta())) {
|
!boletoComissao.isVendaBilheteConfirmaAberto(boletoComissao.getTipoVenta())) {
|
||||||
|
//log.info(boletoComissao.toString());
|
||||||
total = total.add(boletoComissao.getTotal());
|
total = total.add(boletoComissao.getTotal());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -467,29 +470,34 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
|
|
||||||
subtrairOcdFormapagoDinheiro(totalOcd, resumoComissao);
|
subtrairOcdFormapagoDinheiro(totalOcd, resumoComissao);
|
||||||
|
|
||||||
resumoComissao.setValorDeposito(carregarTotalFormapagoDinheiro(resumoComissao));
|
resumoComissao.setValorDeposito(carregarTotalDeposito(resumoComissao));
|
||||||
resumoComissao.setQuantidadeEcf(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getEmpresa().getEmpresaId(), conferencia.getPuntoVenta().getPuntoventaId()));
|
resumoComissao.setQuantidadeEcf(puntoVentaDAO.quantidadeECFPorPuntoVenta(conferencia.getEmpresa().getEmpresaId(), conferencia.getPuntoVenta().getPuntoventaId()));
|
||||||
|
|
||||||
return resumoComissao;
|
return resumoComissao;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retorna o valor total de forma pago do tipo DINHEIRO
|
* Retorna o valor total de deposito
|
||||||
* @param resumoComissao
|
* @param resumoComissao
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private BigDecimal carregarTotalFormapagoDinheiro(ResumoComissao resumoComissao) {
|
private BigDecimal carregarTotalDeposito(ResumoComissao resumoComissao) {
|
||||||
for (FormapagoVO formapagoVO : resumoComissao.getTotalFormapago()) {
|
List<Integer> formaspagosDeposito = new ArrayList<Integer>(Arrays.asList(Constantes.FORMA_PAGO_DINHEIRO.intValue(),
|
||||||
if(formapagoVO.getFormapagoId().equals(Constantes.FORMA_PAGO_DINHEIRO.intValue())) {
|
Constantes.FORMA_PAGO_TROCA_PASSAGEM.intValue()));
|
||||||
return formapagoVO.getImporte();
|
|
||||||
|
BigDecimal total = BigDecimal.ZERO;
|
||||||
|
|
||||||
|
for (FormapagoVO formapago : resumoComissao.getTotalFormapago()) {
|
||||||
|
if(formaspagosDeposito.contains(formapago.getFormapagoId())) {
|
||||||
|
total = MoneyHelper.somar(total, formapago.getImporte());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return BigDecimal.ZERO;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Subtrai do total de forma pago o total pago das ocds.
|
* Subtrai do total de forma pago em dinheiro o valor total pago das ocds.
|
||||||
* @param totalOcd
|
* @param totalOcd
|
||||||
* @param resumoComissao
|
* @param resumoComissao
|
||||||
*/
|
*/
|
||||||
|
@ -514,9 +522,9 @@ public class ConferenciaComissaoServiceImpl implements ConferenciaComissaoServic
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Totaliza os valores conforme o forma pago, apenas do bilhetes que geraram registros em caixa
|
* Totaliza os valores conforme o forma pago, apenas do bilhetes que geraram registros em caixa<br>
|
||||||
* (+) Abas: Bilhetes Manual, Bilhetes, Gap Venda
|
* (+) Abas: Bilhetes Manual, Bilhetes, Gap Venda<br>
|
||||||
* (-) Abas: Bilhetes Cancelados, Bilhetes Devolvidos, Gap Cancelados, Gap Devolvidos
|
* (-) Abas: Bilhetes Cancelados, Bilhetes Devolvidos, Gap Cancelados, Gap Devolvidos<br>
|
||||||
* @param resumoComissao
|
* @param resumoComissao
|
||||||
* @param boletoComissaos
|
* @param boletoComissaos
|
||||||
* @param lsEventosFinanceiros
|
* @param lsEventosFinanceiros
|
||||||
|
|
|
@ -388,11 +388,15 @@ public class BoletoComissao {
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getSituacaoBilhete() {
|
public String getSituacaoBilhete() {
|
||||||
|
if("768596".equals(getNumFolioSistema())) {
|
||||||
|
System.out.println("");
|
||||||
|
}
|
||||||
|
|
||||||
if (isOcd()) {
|
if (isOcd()) {
|
||||||
return "OCD";
|
return "OCD";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isMotivocancelacionAgrupamento() || isMotivocancelacionCheckin()) {
|
if(isMotivocancelacionAgrupamento()) {
|
||||||
return getDescmotivocancelacion();
|
return getDescmotivocancelacion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -420,6 +424,8 @@ public class BoletoComissao {
|
||||||
return "B. DA TRANSFERENCIA";
|
return "B. DA TRANSFERENCIA";
|
||||||
} else if (isVendaBilheteConfirmaAberto(getTipoVenta())) {
|
} else if (isVendaBilheteConfirmaAberto(getTipoVenta())) {
|
||||||
return "CONFIRMAÇÃO ABERTO";
|
return "CONFIRMAÇÃO ABERTO";
|
||||||
|
} else if (isVendaBilheteCheckin(getTipoVenta())) {
|
||||||
|
return "CHECKIN";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -958,11 +964,19 @@ public class BoletoComissao {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(isStatusTroca() && isVendaBilheteCheckin(getTipoVenta())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isStatusTroca() && isVendaBilheteConfirmaAberto(getTipoVenta())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(isStatusEntregue()) {
|
if(isStatusEntregue()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isMotivocancelacionAgrupamento() || isMotivocancelacionCheckin()) {
|
if(isMotivocancelacionAgrupamento()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue