frederico 2016-10-26 17:14:24 +00:00
parent 2f3821251b
commit acd78f9b61
1 changed files with 8 additions and 3 deletions

View File

@ -84,13 +84,16 @@ public class RelatorioConferenciaFormularioFisicoController extends MyGenericFo
} }
private void executarRelatorio() throws Exception { private void executarRelatorio() throws Exception {
Connection con = dataSourceRead.getConnection();
Integer puntoVentaId = null; Integer puntoVentaId = null;
if (cmbPuntoVenta.getSelectedIndex() != -1){ if (cmbPuntoVenta.getSelectedIndex() != -1){
((PuntoVenta)cmbPuntoVenta.getSelectedItem().getValue()).getPuntoventaId(); ((PuntoVenta)cmbPuntoVenta.getSelectedItem().getValue()).getPuntoventaId();
} }
Integer empresaId = ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId(); Integer empresaId = ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId();
Connection con = dataSourceRead.getConnection();
if (datInicial.getValue() == null && datFinal.getValue() == null) { if (datInicial.getValue() == null && datFinal.getValue() == null) {
@ -110,13 +113,15 @@ public class RelatorioConferenciaFormularioFisicoController extends MyGenericFo
parametros.put("EMPRESA_ID", ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId()); parametros.put("EMPRESA_ID", ((Empresa)cmbEmpresa.getSelectedItem().getValue()).getEmpresaId());
parametros.put("NOME_RELATORIO", Labels.getLabel("indexController.mniRelatorioConferenciaFormularioFisico.label")); parametros.put("NOME_RELATORIO", Labels.getLabel("indexController.mniRelatorioConferenciaFormularioFisico.label"));
Relatorio relatorio = new RelatorioConferenciaFormularioFisico(parametros, dataSourceRead.getConnection()); Relatorio relatorio = new RelatorioConferenciaFormularioFisico(parametros, con);
Map<String, Object> args = new HashMap<String, Object>(); Map<String, Object> args = new HashMap<String, Object>();
args.put("relatorio", relatorio); args.put("relatorio", relatorio);
openWindow("/component/reportView.zul", openWindow("/component/reportView.zul",
Labels.getLabel("indexController.mniRelatorioConferenciaFormularioFisico.label"), args, MODAL); Labels.getLabel("indexController.mniRelatorioConferenciaFormularioFisico.label"), args, MODAL);
} }
public MyComboboxEstandar getCmbEmpresa() { public MyComboboxEstandar getCmbEmpresa() {