diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAproveitamentoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAproveitamentoController.java index d226f2c45..2fa73b9d7 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAproveitamentoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/relatorios/RelatorioAproveitamentoController.java @@ -169,7 +169,6 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer @SuppressWarnings("deprecation") private void refreshLista() { - btnExecutarRelatorio.setDisabled(true); Parada origem = null; Comboitem cbiOrigem = cmbParadaOrigem.getSelectedItem(); @@ -190,12 +189,22 @@ public class RelatorioAproveitamentoController extends MyGenericForwardComposer data.setMinutes(00); data.setSeconds(00); } - Integer corridaId = null; if (txtCorridaId.getValue() != null && !txtCorridaId.getValue().isEmpty()) { corridaId = new Integer(txtCorridaId.getValue()); } + if((origem==null || destino==null) && corridaId==null ){ + try { + Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), + Labels.getLabel("relatorioAproveitamentoController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (Exception e) { + log.error("", e); + } + return; + } + btnExecutarRelatorio.setDisabled(true); List ls = null; try { ls = corridaService.buscarCorridaRelAproveitamento(