diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/gr/EditarAidfController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/gr/EditarAidfController.java index 4c5062109..414f5af4e 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/gr/EditarAidfController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/gr/EditarAidfController.java @@ -156,8 +156,10 @@ public class EditarAidfController extends MyGenericForwardComposer { } } - if (ApplicationProperties.getInstance().exibirPuntoVentaCadastroAIDF()) { - + if (ApplicationProperties.getInstance().exibirPuntoVentaCadastroAIDF()) { + if(ApplicationProperties.getInstance().isPuntoVentaCadastroAIDFObrigatorio()){ + cmbPuntoVenta.setConstraint("no empty");; + } rowPuntoVenta.setVisible(true); PuntoVenta puntoVenta = aidf.getPuntoVenta(); if (puntoVenta != null) { @@ -234,7 +236,9 @@ public class EditarAidfController extends MyGenericForwardComposer { txtFormfinal.getValue(); txtDocFiscal.getValue(); if (ApplicationProperties.getInstance().exibirPuntoVentaCadastroAIDF()) { - cmbPuntoVenta.getValue(); + if(ApplicationProperties.getInstance().isPuntoVentaCadastroAIDFObrigatorio()){ + cmbPuntoVenta.getValue(); + } } cmbTipoValidaVenta.getValue(); @@ -259,14 +263,16 @@ public class EditarAidfController extends MyGenericForwardComposer { especieId = aidf.getAidfEspecie().getAidfespId(); } if (ApplicationProperties.getInstance().exibirPuntoVentaCadastroAIDF()) { - PuntoVenta puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue(); - aidf.setPuntoVenta(puntoVenta); - if (!validarDocFiscalPorEstadoAgencia(aidf.getAidfId(), especieId, txtDocFiscal.getValue(), aidf.getForminicial(), aidf.getFormfinal(), aidf.getEstado(), aidf.getPuntoVenta())) { - Messagebox.show( - Labels.getLabel("editarAidfController.btnSalvar.MSG.conflitoDocFiscalEstadoAgencia"), - Labels.getLabel("editarAidfController.window.title"), - Messagebox.OK, Messagebox.EXCLAMATION); - return; + if(ApplicationProperties.getInstance().isPuntoVentaCadastroAIDFObrigatorio()){ + PuntoVenta puntoVenta = (PuntoVenta) cmbPuntoVenta.getSelectedItem().getValue(); + aidf.setPuntoVenta(puntoVenta); + if (!validarDocFiscalPorEstadoAgencia(aidf.getAidfId(), especieId, txtDocFiscal.getValue(), aidf.getForminicial(), aidf.getFormfinal(), aidf.getEstado(), aidf.getPuntoVenta())) { + Messagebox.show( + Labels.getLabel("editarAidfController.btnSalvar.MSG.conflitoDocFiscalEstadoAgencia"), + Labels.getLabel("editarAidfController.window.title"), + Messagebox.OK, Messagebox.EXCLAMATION); + return; + } } } else { if (!validarDocFiscalEstado(aidf.getAidfId(), especieId, txtDocFiscal.getValue(), aidf.getEstado())) { diff --git a/web/gui/gr/editarAidf.zul b/web/gui/gr/editarAidf.zul index a1ae14a5a..849bf85ca 100644 --- a/web/gui/gr/editarAidf.zul +++ b/web/gui/gr/editarAidf.zul @@ -112,7 +112,7 @@