Foi Adcionado uma validação quando o usuario seleciona todas agencias, e trocado == por equals por segurança nessas validações.
fixes bug#11036 dev:fabio qua:renato git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@81982 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
bde97f3ebe
commit
01fc0fc64e
|
@ -153,7 +153,7 @@ public class RelatorioMovimentosAtraso extends Relatorio {
|
|||
sQuery.append("AND CO.EMPRESA_ID = :empresaId ");
|
||||
}
|
||||
|
||||
if(puntoventaId != null) {
|
||||
if(puntoventaId != null && !puntoventaId.equals(-1)) {
|
||||
sQuery.append("AND CO.PUNTOVENTA_ID = :puntoventaId ");
|
||||
}
|
||||
|
||||
|
@ -166,7 +166,7 @@ public class RelatorioMovimentosAtraso extends Relatorio {
|
|||
stmt.setInt("empresaId", empresaId);
|
||||
}
|
||||
|
||||
if(puntoventaId != null) {
|
||||
if(puntoventaId != null && !puntoventaId.equals(-1)) {
|
||||
stmt.setInt("puntoventaId", puntoventaId);
|
||||
}
|
||||
stmt.setDate("dataInicial", new java.sql.Date(dataInicial.getTime()));
|
||||
|
@ -221,7 +221,7 @@ public class RelatorioMovimentosAtraso extends Relatorio {
|
|||
sQuery.append("AND M.EMPRESA_ID = :empresaId ");
|
||||
}
|
||||
|
||||
if(puntoventaId != null && puntoventaId != -1) {
|
||||
if(puntoventaId != null && !puntoventaId.equals(-1)) {
|
||||
sQuery.append("AND C.PUNTOVENTA_ID = :puntoventaId ");
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ public class RelatorioMovimentosAtraso extends Relatorio {
|
|||
stmt.setInt("empresaId", empresaId);
|
||||
}
|
||||
|
||||
if(puntoventaId != null && puntoventaId != -1) {
|
||||
if(puntoventaId != null && !puntoventaId.equals(-1)) {
|
||||
stmt.setInt("puntoventaId", puntoventaId);
|
||||
}
|
||||
stmt.setDate("dataInicial", new java.sql.Date(dataInicial.getTime()));
|
||||
|
@ -288,7 +288,7 @@ public class RelatorioMovimentosAtraso extends Relatorio {
|
|||
sQuery.append("AND PTE.EMPRESA_ID = :empresaId ");
|
||||
}
|
||||
|
||||
if(puntoventaId != null && puntoventaId != -1) {
|
||||
if(puntoventaId != null && !puntoventaId.equals(-1)) {
|
||||
sQuery.append("AND PV.PUNTOVENTA_ID = :puntoventaId ");
|
||||
}
|
||||
|
||||
|
@ -301,7 +301,7 @@ public class RelatorioMovimentosAtraso extends Relatorio {
|
|||
stmt.setInt("empresaId", empresaId);
|
||||
}
|
||||
|
||||
if(puntoventaId != null && puntoventaId != -1) {
|
||||
if(puntoventaId != null && !puntoventaId.equals(-1)) {
|
||||
stmt.setInt("puntoventaId", puntoventaId);
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ public class RelatorioMovimentosAtraso extends Relatorio {
|
|||
if(empresaId != null) {
|
||||
this.empresaId = empresaId;
|
||||
}
|
||||
if(puntoventaId != null) {
|
||||
if(puntoventaId != null && !puntoventaId.equals(-1)) {
|
||||
this.puntoventaId = puntoventaId;
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,8 @@ public class RelatorioMovimentosAtrasoController extends MyGenericForwardCompose
|
|||
public void onClick$btnRelatorio(Event ev) {
|
||||
try {
|
||||
Map<String, Object> parametros = new HashMap<String, Object>();
|
||||
|
||||
|
||||
parametros.put("competencia", txtCompetencia.getValue());
|
||||
parametros.put("empresaId", empresa.getEmpresaId());
|
||||
parametros.put("empresa", empresa.getNombempresa());
|
||||
|
@ -90,6 +92,8 @@ public class RelatorioMovimentosAtrasoController extends MyGenericForwardCompose
|
|||
Map<String, Object> args = new HashMap<String, Object>();
|
||||
args.put("relatorio", relatorio);
|
||||
|
||||
puntoVenta = new PuntoVenta();
|
||||
|
||||
openWindow("/component/reportView.zul",
|
||||
Labels.getLabel("relatorioMovimentosAtrasoController.window.title"), args, MODAL);
|
||||
} catch (Exception e) {
|
||||
|
|
Loading…
Reference in New Issue