bug#11600

dev: julio
qua:

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@85057 d1611594-4594-4d17-8e1d-87c2c4800839
master
julio 2018-09-04 13:19:11 +00:00
parent b7a3d1c686
commit 406b1274c4
1 changed files with 2 additions and 2 deletions

View File

@ -604,7 +604,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
sql.append(" inner join ciudad cd on d.ciudad_id = cd.ciudad_id ");
sql.append(" inner join estado ed on ed.estado_id = cd.estado_id ");
sql.append(" left join empresa_imposto ei on ei.empresa_id = ep.empresa_id and ei.estado_id = e.estado_id and ei.activo = 1 ");
sql.append("where c.activo = 1 and bpe.tipoamb = 1 bpe.codstat in (100,150) ");
sql.append("where c.activo = 1 and bpe.tipoamb = 1 and bpe.codstat in (100,150) ");
sql.append(" and (bpe.tipoevento <> 110115 or bpe.tipoevento is null) ");
sql.append(" and (to_char(bpe.fecmodif, 'mm/yyyy') < to_char(bpecan.fecmodif, 'mm/yyyy') or bpecan.fecmodif is null) ");
sql.append(" and (case when ei.indtribviagem = 1 then c.fechorviaje else c.feccreacion end) >= :DATE_INICIO ");
@ -685,7 +685,7 @@ public class BpeHibernateDAO extends HibernateDaoSupport implements BpeDAO {
sql.append(" left join boleto bant on bant.boleto_id = (case when bpeori.tipoevento is not null then coalesce(b.boletoanterior_id, b.boletooriginal_id) else null end) ");
sql.append(" left join bpe bpeant on bpeant.boleto_id = bant.boleto_id ");
sql.append(" left join punto_venta ptvo on ptvo.puntoventa_id = coalesce(bant.puntoventa_id, bori.puntoventa_id,b.ptovtaventa_id) ");
sql.append("where (bpe.codstat in (100,135,150) and bpe.chbpe_substituicao is not null ");
sql.append("where ( (bpe.codstat in (100,135,150) and bpe.chbpe_substituicao is not null) ");
sql.append(" or (bpe.codstat = 135 and to_char(b.feccreacion, 'mm/yyyy') < to_char(bori.feccreacion, 'mm/yyyy')) ) ");
sql.append(" and (bpe.codstat in (100,135,150) and bpe.tipoevento <> 110115 or bpe.tipoevento is null) ");
sql.append(" and (bpe.codstat in (100,135,150) and bpeori.tipoevento <> 110115 or bpeori.tipoevento is null) ");