diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java index 5a090a505..12aa798da 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java @@ -807,13 +807,16 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { cmbColonia.getValue(); cmbCiudad.getValue(); cmbBanco.getValue(); - cmbPessoa.getValue(); + cmbPessoa.getValue(); cmbTipoConta.getValue(); - cmbPosicao.getValue(); - cmbPuntoVentaPadre.getValue(true); + cmbPosicao.getValue(); + + if(puntoVenta.getPuntoVentaPadre() == null && !cmbPuntoVentaPadre.getValue().isEmpty()){ + cmbPuntoVentaPadre.getValue(true); + } // checar uma forma onde o proprio componente coloque como null o atributo - if (cmbPuntoVentaPadre.getSelectedItem() == null) { + if (cmbPuntoVentaPadre.getValue().isEmpty()) { puntoVenta.setPuntoVentaPadre(null); } List lsPuntoVenta = puntoVentaService.buscaPuntoVenta(txtNumPtoVta.getValue()); @@ -2102,7 +2105,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer { public void onChange$cmbPuntoVentaPadre(Event ev) throws InterruptedException { if (puntoVenta.getPuntoventaId() != null) { List lsPuntosSubordinados = puntoVentaService.buscarPuntoVentaSubordinados(puntoVenta); - + if (!lsPuntosSubordinados.isEmpty()) { StringBuilder sbPuntosSubordinados = new StringBuilder("\n"); for (PuntoVenta pv : lsPuntosSubordinados) {