gleimar 2017-02-10 19:21:24 +00:00
parent 948f746eb8
commit 3991b75fac
2 changed files with 24 additions and 6 deletions

View File

@ -704,7 +704,8 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
.append("B.FECCORRIDA AS \"feccorrida\", B.CORRIDA_ID \"corridaId\", B.BOLETOORIGINAL_ID AS \"boletoOriginalId\", ")
.append("BO1.MOTIVOCANCELACION_ID \"motivoCancelacionOriginal1\", BO2.MOTIVOCANCELACION_ID \"motivoCancelacionOriginal2\", ")
.append("NVL(tarifa.PRECIO,0) + NVL(tarifa.IMPORTEPEDAGIO,0) + NVL(tarifa.IMPORTETAXAEMBARQUE,0) + NVL(tarifa.IMPORTESEGURO,0) + NVL(tarifa.IMPORTEOUTROS,0) AS \"valorTabela\", ")
.append("NVL(OCD.VALOR_PAGAR,0) AS \"valorPagarOcd\", NVL(OCD.VALOR_TARJETA,0) AS \"valorTarjetaOcd\" ")
.append("NVL(OCD.VALOR_PAGAR,0) AS \"valorPagarOcd\", NVL(OCD.VALOR_TARJETA,0) AS \"valorTarjetaOcd\", ")
.append("B.INDCANCELACION AS \"indCancelacion\" ")
.append("FROM BOLETO B ")
.append("LEFT JOIN BOLETO BO1 ON BO1.BOLETO_ID = B.BOLETOORIGINAL_ID ")
.append("LEFT JOIN BOLETO BO2 ON BO2.BOLETO_ID = BO1.BOLETOORIGINAL_ID ")
@ -781,6 +782,7 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
.addScalar("corridaId", Hibernate.INTEGER)
.addScalar("valorPagarOcd", Hibernate.BIG_DECIMAL)
.addScalar("valorTarjetaOcd", Hibernate.BIG_DECIMAL)
.addScalar("indCancelacion", Hibernate.BOOLEAN)
.setResultTransformer(Transformers.aliasToBean(BoletoComissao.class));
setParametros(qr, parametros);
@ -900,17 +902,21 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
@Transactional
private void gerarLancamentoContaCorrente(Conferencia conferencia) throws BusinessException {
try {
Calendar cal = Calendar.getInstance();
cal.add(Calendar.DAY_OF_MONTH, 1);
Calendar calHoje = Calendar.getInstance();
Calendar calAmanha = Calendar.getInstance();
calAmanha.add(Calendar.DAY_OF_MONTH, 1);
List<LogConferencia> lsLogConferencia = carregarLogConferencia(conferencia.getConferenciaId());
String sDataMovimento = DateUtil.getStringDate(conferencia.getDatamovimento(), "dd/MM/yyyy");
String descOperacion = "CONFERENCIA MOVIMENTO DIA - " + sDataMovimento;
for (LogConferencia logConferencia : lsLogConferencia) {
Calendar cal =calHoje;
if(!Boolean.TRUE.equals(logConferencia.getIndmesmodia())){
cal.add(Calendar.DAY_OF_MONTH, 1);
cal = calAmanha;
}
if (logConferencia.getStatus().equals(StatusLogConferencia.CONFERIDO)

View File

@ -72,6 +72,8 @@ public class BoletoComissao {
private Integer corridaId;
private Boolean indCancelacion;
public Integer getEmpresaId() {
return empresaId;
}
@ -1066,4 +1068,14 @@ public class BoletoComissao {
this.valorTarjetaOcd = valorTarjetaOcd;
}
public Boolean getIndCancelacion() {
return indCancelacion;
}
public void setIndCancelacion(Boolean indCancelacion) {
this.indCancelacion = indCancelacion;
}
}