0013027: erro na geracao de relatorio

bug#0013027
dev:Leo
qua:Fabim

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@88176 d1611594-4594-4d17-8e1d-87c2c4800839
master
daniel.zauli 2018-12-20 16:49:43 +00:00
parent c2cd5251c4
commit 7cc30a7b83
1 changed files with 4 additions and 3 deletions

View File

@ -112,7 +112,7 @@ public class RelatorioVendasBilheteiroSintetico extends Relatorio {
sql.append(" join MARCA m on m.marca_id = ca.marca_id ");
sql.append("where ");
sql.append(" ca.indreimpresion = 0 ");
sql.append(" and ca.feccorte >= to_char(to_date(:DATA_INICIAL), 'dd/MM/YYYY')");
sql.append(" and ca.feccorte >= :DATA_INICIAL ");
sql.append(" and ca.feccorte <= :DATA_FINAL ");
if (parametros.get("EMPRESA_ID") != null) {
sql.append(" and m.EMPRESA_ID = :EMPRESA_ID");
@ -131,8 +131,9 @@ public class RelatorioVendasBilheteiroSintetico extends Relatorio {
if (parametros.get("EMPRESA_ID") != null) {
stmt.setInt("EMPRESA_ID", Integer.valueOf(parametros.get("EMPRESA_ID").toString()));
}
stmt.setString("DATA_INICIAL", DateUtil.getStringDate((Date)parametros.get("DATA_INICIAL"), "dd/MM/yyyy"));
java.sql.Date d = new java.sql.Date(((Date) parametros.get("DATA_INICIAL")).getTime());
stmt.setDate("DATA_INICIAL", d);
stmt.setTimestamp("DATA_FINAL", new Timestamp(DateUtil.fimFecha((Date) parametros.get("DATA_FINAL")).getTime()));
if (parametros.get("TIPOPUNTOVENTA_ID") != null && !parametros.get("TIPOPUNTOVENTA_ID").toString().equals("-1")) {
stmt.setInt("TIPOPUNTOVENTA_ID", Integer.valueOf(parametros.get("TIPOPUNTOVENTA_ID").toString()));