OCD - Relatório de perfil restrito com as OCD's não resgatadas (por empresa) (fixed bug #5432)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@36534 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
f6976226b9
commit
170881b2af
|
@ -39,8 +39,8 @@ public class RelatorioOCDNaoResgatadaEmpresa extends Relatorio {
|
||||||
ResultSet rset = null;
|
ResultSet rset = null;
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
|
SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss");
|
||||||
stmt.setDate("fecInicio", new java.sql.Date(sdf.parse(fecInicio).getTime()));
|
stmt.setTimestamp("fecInicio", new java.sql.Timestamp(sdf.parse(fecInicio).getTime()));
|
||||||
stmt.setDate("fecFinal", new java.sql.Date(sdf.parse(fecFinal).getTime()));
|
stmt.setTimestamp("fecFinal", new java.sql.Timestamp(sdf.parse(fecFinal).getTime()));
|
||||||
if (empresaId != null){
|
if (empresaId != null){
|
||||||
stmt.setInt("empresaId", empresaId);
|
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("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("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("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){
|
if (empresaId != null){
|
||||||
sql.append("and e.empresa_id = :empresaId ");
|
sql.append("and e.empresa_id = :empresaId ");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue