eduardo.dicarde 2017-03-31 20:30:21 +00:00
parent e17d837f02
commit 79c3f62f11
1 changed files with 3 additions and 2 deletions

View File

@ -41,7 +41,8 @@ public class RelatorioDescontos extends Relatorio {
NamedParameterStatement statement = new NamedParameterStatement(coneConnection, query);
statement.setTimestamp("fecVentaInicial", fecVentaInicial);
statement.setTimestamp("fecVentaFinal", fecVentaFinal);
if(idPuntoVenta != null) {
if(idPuntoVenta != null && idPuntoVenta != -1) {
statement.setInt("idPuntoVenta", idPuntoVenta);
}
if(codconvenio != null && !codconvenio.isEmpty()) {
@ -119,7 +120,7 @@ public class RelatorioDescontos extends Relatorio {
query +=" AND BOL.EMPRESACORRIDA_ID IN ( " + (String)parametros.get("EMPRESAIDS") + ")" ;
}
if(idPuntoVenta != null) {
if(idPuntoVenta != null && idPuntoVenta != -1) {
query += " AND (BOL.PUNTOVENTA_ID = :idPuntoVenta) ";
}
if (codconvenio != null && !codconvenio.isEmpty()) {