diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDNaoResgatadaEmpresa.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDNaoResgatadaEmpresa.java index 5a45fbd66..c85900d59 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDNaoResgatadaEmpresa.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioOCDNaoResgatadaEmpresa.java @@ -39,8 +39,8 @@ public class RelatorioOCDNaoResgatadaEmpresa extends Relatorio { ResultSet rset = null; SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss"); - stmt.setDate("fecInicio", new java.sql.Date(sdf.parse(fecInicio).getTime())); - stmt.setDate("fecFinal", new java.sql.Date(sdf.parse(fecFinal).getTime())); + stmt.setTimestamp("fecInicio", new java.sql.Timestamp(sdf.parse(fecInicio).getTime())); + stmt.setTimestamp("fecFinal", new java.sql.Timestamp(sdf.parse(fecFinal).getTime())); if (empresaId != null){ stmt.setInt("empresaId", empresaId); } @@ -101,6 +101,7 @@ public class RelatorioOCDNaoResgatadaEmpresa extends Relatorio { sql.append("join punto_venta p on p.puntoventa_id = o.puntoventa_id "); sql.append("left join punto_venta pp on pp.puntoventa_id = o.puntoventapago_id "); sql.append("where o.fecpago is null and o.fecpagar between :fecInicio and :fecFinal "); + sql.append("and o.activo = 1 and o.indpago = 0 "); if (empresaId != null){ sql.append("and e.empresa_id = :empresaId "); }