13240: 11754 - Cadastro de cliente validando RG.

fixed bug#13240
dev:thiago
qua:renato

git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@89364 d1611594-4594-4d17-8e1d-87c2c4800839
master
leonardo 2019-01-29 17:57:56 +00:00
parent 13785ed74c
commit fbf5362355
1 changed files with 18 additions and 10 deletions

View File

@ -872,8 +872,12 @@ public class EditarClienteController extends MyGenericForwardComposer {
}
}
}
List<Cliente> lsCliente = clienteService.buscarPorDocumento(txtNumRfc.getValue());
List<Cliente> lsCliente = new ArrayList<Cliente>();
if ((txtNumRfc.getText() != null && !txtNumRfc.getText().isEmpty()) && cmbTipoIdentificacion != null
&& cmbTipoIdentificacion.getSelectedItem() != null
&& cmbTipoIdentificacion.getSelectedItem().getValue() != null
&& CPF.equals(cmbTipoIdentificacion.getSelectedItem().getValue().toString())){
lsCliente = clienteService.buscarPorDocumento(txtNumRfc.getValue());
if (lsCliente.size() > 1
|| (lsCliente.size() == 1 && !lsCliente.get(0).getClienteId().equals(cliente.getClienteId()))) {
Messagebox.show(Labels.getLabel("editarClienteController.MSG.documentoexiste"),
@ -882,8 +886,12 @@ public class EditarClienteController extends MyGenericForwardComposer {
txtNumRfc.focus();
return;
}
}
if (txtNumRfc2.getText() != null && !txtNumRfc2.getText().isEmpty()) {
if (txtNumRfc2.getText() != null && !txtNumRfc2.getText().isEmpty() && cmbTipoIdentificacion2 != null
&& cmbTipoIdentificacion2.getSelectedItem() != null
&& cmbTipoIdentificacion2.getSelectedItem().getValue() != null
&& CPF.equals(cmbTipoIdentificacion2.getSelectedItem().getValue().toString())) {
lsCliente = clienteService.buscarPorDocumento(txtNumRfc2.getValue());
if (lsCliente.size() > 1
|| (lsCliente.size() == 1 && !lsCliente.get(0).getClienteId().equals(cliente.getClienteId()))) {