fixes bug#0016363
dev: Lucas Taia qua: xxx git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@98486 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
4ba444aca7
commit
338038ea24
|
@ -51,6 +51,7 @@ import com.rjconsultores.ventaboletos.entidad.FormaPago;
|
|||
import com.rjconsultores.ventaboletos.entidad.InscricaoEstadual;
|
||||
import com.rjconsultores.ventaboletos.entidad.InstiFinanceira;
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoEventoExtra;
|
||||
import com.rjconsultores.ventaboletos.exception.BusinessException;
|
||||
import com.rjconsultores.ventaboletos.service.CategoriaService;
|
||||
import com.rjconsultores.ventaboletos.service.CiudadService;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaEmailConfigService;
|
||||
|
@ -402,6 +403,9 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|||
// Contas Bancárias das Empresas
|
||||
lsEmpresaContaBancaria = empresa.getEmpresaContaBancaria();
|
||||
empresaContaBancariaList.setData(lsEmpresaContaBancaria);
|
||||
|
||||
//retirar caracteres cnpj - mantis: 16363
|
||||
retirarCaracteresEspeciaisCNPJ();
|
||||
}
|
||||
|
||||
txtNome.focus();
|
||||
|
@ -1389,7 +1393,20 @@ public class EditarEmpresaController extends MyGenericForwardComposer {
|
|||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
private void retirarCaracteresEspeciaisCNPJ() {
|
||||
if(empresa != null && empresa.getCnpj() != null && empresa.getCnpj().contains("-")
|
||||
|| empresa.getCnpj().contains(".") || empresa.getCnpj().contains("/")) {
|
||||
empresa.setCnpj(empresa.getCnpj().replaceAll("[^\\d ]", ""));
|
||||
try {
|
||||
empresaService.suscribirActualizacion(empresa);
|
||||
} catch (BusinessException e) {
|
||||
log.error("Ocorreu um erro ao retirar os caracteres especiais do cnpj e atualizar o objeto empresa");
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public List<Categoria> getLsCategorias() {
|
||||
return lsCategorias;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@
|
|||
<label
|
||||
value="${c:l('editarEmpresaController.cnpj.label')}" />
|
||||
<textbox id="txtCNPJ" width="100px"
|
||||
maxlength="18" constraint="no empty"
|
||||
maxlength="18" constraint="no empty, /[0-9]/"
|
||||
value="@{winEditarEmpresa$composer.empresa.cnpj}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" />
|
||||
</row>
|
||||
|
|
Loading…
Reference in New Issue