fixes bug #6688
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@49540 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
91c34e2a59
commit
445742dd97
|
@ -549,7 +549,7 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
logConferencia.setConferencia(confirmarChegadaMalote(logConferencia.getConferencia()));
|
logConferencia.setConferencia(confirmarChegadaMalote(logConferencia.getConferencia()));
|
||||||
}
|
}
|
||||||
|
|
||||||
getSession().save(logConferencia);
|
getSession().merge(logConferencia);
|
||||||
return logConferencia;
|
return logConferencia;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error(e.getMessage(), e);
|
log.error(e.getMessage(), e);
|
||||||
|
@ -567,7 +567,7 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
contaCorrentePtoVta.setFecmodif(logConferencia.getFecmodif());
|
contaCorrentePtoVta.setFecmodif(logConferencia.getFecmodif());
|
||||||
contaCorrentePtoVta.setUsuario(logConferencia.getUsuario());
|
contaCorrentePtoVta.setUsuario(logConferencia.getUsuario());
|
||||||
|
|
||||||
contaCorrenteAgenciaDAO.borrar(contaCorrentePtoVta);
|
contaCorrenteAgenciaDAO.actualizacion(contaCorrentePtoVta);
|
||||||
}
|
}
|
||||||
getSession().merge(logConferencia);
|
getSession().merge(logConferencia);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -792,7 +792,10 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
String descOperacion = "CONFERENCIA MOVIMENTO DIA - " + sDataMovimento;
|
String descOperacion = "CONFERENCIA MOVIMENTO DIA - " + sDataMovimento;
|
||||||
|
|
||||||
for (LogConferencia logConferencia : lsLogConferencia) {
|
for (LogConferencia logConferencia : lsLogConferencia) {
|
||||||
if(logConferencia.getStatus().equals(StatusLogConferencia.CONFERIDO)) {
|
if(logConferencia.getStatus().equals(StatusLogConferencia.CONFERIDO) ||
|
||||||
|
(logConferencia.getContaCorrentePtoVta() != null &&
|
||||||
|
logConferencia.getContaCorrentePtoVta().getActivo() != null &&
|
||||||
|
logConferencia.getContaCorrentePtoVta().getActivo())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -822,10 +825,8 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
StringBuilder sQuery = new StringBuilder();
|
StringBuilder sQuery = new StringBuilder();
|
||||||
sQuery.append("SELECT DISTINCT log ")
|
sQuery.append("SELECT DISTINCT log ")
|
||||||
.append("FROM LogConferencia log ")
|
.append("FROM LogConferencia log ")
|
||||||
.append("LEFT JOIN log.contaCorrentePtoVta co ")
|
|
||||||
.append("WHERE log.activo = 1 ")
|
.append("WHERE log.activo = 1 ")
|
||||||
.append("AND log.conferencia.conferenciaId = :conferenciaId ")
|
.append("AND log.conferencia.conferenciaId = :conferenciaId ");
|
||||||
.append("AND (co.contaCorrentePtoVtaId is null OR co.activo = 0) ");
|
|
||||||
Query qr = getSession().createQuery(sQuery.toString());
|
Query qr = getSession().createQuery(sQuery.toString());
|
||||||
qr.setParameter("conferenciaId", conferenciaId);
|
qr.setParameter("conferenciaId", conferenciaId);
|
||||||
return qr.list();
|
return qr.list();
|
||||||
|
@ -845,11 +846,12 @@ public class ConferenciaComissaoHibernateDAO extends GenericHibernateDAO<Confere
|
||||||
sQuery.append("SELECT B.BOLETO_ID AS \"boletoId\" ")
|
sQuery.append("SELECT B.BOLETO_ID AS \"boletoId\" ")
|
||||||
.append("FROM BOLETO B ")
|
.append("FROM BOLETO B ")
|
||||||
.append("LEFT JOIN LOG_CONFERENCIA LOG ON LOG.BOLETO_ID = B.BOLETO_ID AND LOG.ACTIVO = 1 ")
|
.append("LEFT JOIN LOG_CONFERENCIA LOG ON LOG.BOLETO_ID = B.BOLETO_ID AND LOG.ACTIVO = 1 ")
|
||||||
|
.append("INNER JOIN CATEGORIA CAT ON CAT.CATEGORIA_ID = B.CATEGORIA_ID ")
|
||||||
.append("INNER JOIN BOLETO_FORMAPAGO BF ON BF.BOLETO_ID = B.BOLETO_ID ")
|
.append("INNER JOIN BOLETO_FORMAPAGO BF ON BF.BOLETO_ID = B.BOLETO_ID ")
|
||||||
.append("INNER JOIN FORMA_PAGO FP ON FP.FORMAPAGO_ID = BF.FORMAPAGO_ID ")
|
.append("INNER JOIN FORMA_PAGO FP ON FP.FORMAPAGO_ID = BF.FORMAPAGO_ID ")
|
||||||
.append("WHERE B.ACTIVO = 1 ")
|
.append("WHERE B.ACTIVO = 1 ")
|
||||||
.append("AND LOG.LOGCONFERENCIA_ID IS NULL ")
|
.append("AND LOG.LOGCONFERENCIA_ID IS NULL ")
|
||||||
.append("AND FP.INDCONFERENCIAFISICACOMISSAO = 1 ")
|
.append("AND (FP.INDCONFERENCIAFISICACOMISSAO = 1 OR CAT.INDCONFERENCIAFISICACOMISSAO = 1) ")
|
||||||
.append("AND TO_DATE(B.FECHORVENTA,'DD/MM/YY') = :datamovimento ")
|
.append("AND TO_DATE(B.FECHORVENTA,'DD/MM/YY') = :datamovimento ")
|
||||||
.append("AND B.TIPOVENTA_ID IN (:tipoVenta) ")
|
.append("AND B.TIPOVENTA_ID IN (:tipoVenta) ")
|
||||||
.append("AND ( ")
|
.append("AND ( ")
|
||||||
|
|
|
@ -62,8 +62,8 @@ public class Categoria implements Serializable {
|
||||||
@ManyToOne()
|
@ManyToOne()
|
||||||
private GrupoCategoria grupoCategoria;
|
private GrupoCategoria grupoCategoria;
|
||||||
|
|
||||||
/*@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
@Column(name = "INDCONFERENCIAFISICACOMISSAO")
|
||||||
private Boolean indconferenciafisicacomissao;*/
|
private Boolean indconferenciafisicacomissao;
|
||||||
|
|
||||||
public Categoria() {
|
public Categoria() {
|
||||||
}
|
}
|
||||||
|
@ -176,12 +176,12 @@ public class Categoria implements Serializable {
|
||||||
return this.getDesccategoria();
|
return this.getDesccategoria();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* public Boolean getIndconferenciafisicacomissao() {
|
public Boolean getIndconferenciafisicacomissao() {
|
||||||
return indconferenciafisicacomissao;
|
return indconferenciafisicacomissao;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setIndconferenciafisicacomissao(Boolean indconferenciafisicacomissao) {
|
public void setIndconferenciafisicacomissao(Boolean indconferenciafisicacomissao) {
|
||||||
this.indconferenciafisicacomissao = indconferenciafisicacomissao;
|
this.indconferenciafisicacomissao = indconferenciafisicacomissao;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue