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 f475852a5..eb4be0b47 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
@@ -95,6 +95,7 @@ import com.rjconsultores.ventaboletos.service.PuntoVentaService;
import com.rjconsultores.ventaboletos.service.TipoPuntoVentaService;
import com.rjconsultores.ventaboletos.service.UsuarioBancarioService;
import com.rjconsultores.ventaboletos.service.UsuarioService;
+import com.rjconsultores.ventaboletos.utilerias.InscricaoEstadualUtil;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
import com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales.FechamentoParamptovtaListItemRenderer;
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
@@ -252,6 +253,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
private MyTextbox txtNumFax;
private MyTextbox txtCompl;
private MyTextbox txtNumAg;
+ private MyTextbox txtDigitoAg;
private MyTextbox txtConta;
private MyTextbox txtDigito;
private MyTextbox txtBilhetes;
@@ -710,7 +712,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
puntoVenta.setNumIEPuntoVenta("ISENTO");
txtNumIEPuntoVenta.setValue("ISENTO");
txtNumIEPuntoVenta.setDisabled(true);
-
+
} else {
puntoVenta.setNumIEPuntoVenta("");
txtNumIEPuntoVenta.setValue("");
@@ -938,6 +940,23 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
cmbTipoConta.getValue();
cmbPosicao.getValue();
+ if (!ckIsento.isChecked()) {
+ try {
+ String uf = puntoVenta.getColonia() == null ? null : puntoVenta.getColonia().getCiudad().getEstado().getCveestado();
+ String inscEstadual = puntoVenta.getNumIEPuntoVenta();
+
+ InscricaoEstadualUtil.valida(inscEstadual, uf);
+ } catch (Exception e) {
+ log.error("editarPuntoVentaController: ", e);
+ Messagebox.show(e.getMessage(), Labels.getLabel("editarPuntoVentaController.window.title"),
+ Messagebox.OK, Messagebox.ERROR);
+ return;
+ }
+ }
+
+ String numagencia = txtNumAg.getValue() + (StringUtils.isBlank(txtDigitoAg.getValue()) ? "" : "-" + txtDigitoAg.getValue());
+ puntoVenta.getAgenciaId().setNumagencia(numagencia);
+
if (puntoVenta.getPuntoVentaPadre() == null && !cmbPuntoVentaPadre.getValue().isEmpty()) {
cmbPuntoVentaPadre.getValue(true);
}
diff --git a/web/gui/catalogos/editarPuntoVenta.zul b/web/gui/catalogos/editarPuntoVenta.zul
index 1e6f41fe1..d05ca0de3 100644
--- a/web/gui/catalogos/editarPuntoVenta.zul
+++ b/web/gui/catalogos/editarPuntoVenta.zul
@@ -276,23 +276,24 @@
-
+
-
-
-
-
+
+
+
-
@@ -451,14 +452,33 @@
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+