Commit 43d2f4a33379fd0c226eb4519c3590d7c84232a6

Authored by Lucas Schmoeller da Silva
1 parent 0a5e02bb
Exists in master

Alterado cadastro de cliente Biblioteca

Corrigido validação impedindo cadastro de diversos clientes para a mesma pessoa;

portabilis/ieducar#109
Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
ieducar/intranet/educar_cliente_cad.php
@@ -232,7 +232,7 @@ class indice extends clsCadastro @@ -232,7 +232,7 @@ class indice extends clsCadastro
232 232
233 $this->ativo = 1; 233 $this->ativo = 1;
234 234
235 - $sql = "SELECT COUNT(0) FROM pmieducar.cliente_tipo_cliente WHERE ref_cod_cliente_tipo = {$this->cod_cliente} 235 + $sql = "SELECT COUNT(0) FROM pmieducar.cliente_tipo_cliente WHERE ref_cod_cliente = {$this->cod_cliente}
236 AND ref_cod_biblioteca = {$this->ref_cod_biblioteca} AND ativo = 1"; 236 AND ref_cod_biblioteca = {$this->ref_cod_biblioteca} AND ativo = 1";
237 237
238 $db = new clsBanco(); 238 $db = new clsBanco();
@@ -254,7 +254,6 @@ class indice extends clsCadastro @@ -254,7 +254,6 @@ class indice extends clsCadastro
254 } 254 }
255 } 255 }
256 else { 256 else {
257 - $this->Editar();  
258 $this->mensagem = "O cliente já está cadastrado!<br>"; 257 $this->mensagem = "O cliente já está cadastrado!<br>";
259 } 258 }
260 } 259 }