Commit 6617bc2cea14bc6d7ba2e769164345b40ce2baea
1 parent
bcf80f19
Exists in
master
Adicionado campo novo padrão certidao de nascimento
Showing
1 changed file
with
25 additions
and
4 deletions
Show diff stats
ieducar/intranet/include/pessoa/clsDocumento.inc.php
@@ -56,6 +56,7 @@ class clsDocumento | @@ -56,6 +56,7 @@ class clsDocumento | ||
56 | var $zona_tit_eleitor; | 56 | var $zona_tit_eleitor; |
57 | var $secao_tit_eleitor; | 57 | var $secao_tit_eleitor; |
58 | var $idorg_exp_rg; | 58 | var $idorg_exp_rg; |
59 | + var $certidao_nascimento; | ||
59 | 60 | ||
60 | var $tabela; | 61 | var $tabela; |
61 | var $schema = "cadastro"; | 62 | var $schema = "cadastro"; |
@@ -65,8 +66,8 @@ class clsDocumento | @@ -65,8 +66,8 @@ class clsDocumento | ||
65 | * | 66 | * |
66 | * @return Object:clsDocumento | 67 | * @return Object:clsDocumento |
67 | */ | 68 | */ |
68 | - function clsDocumento( $int_idpes = false, $int_rg = false, $str_data_exp_rg = false, $str_sigla_uf_exp_rg = false, $int_tipo_cert_civil = false, $int_num_termo = false, $int_num_livro = false, $int_num_folha = false, $str_data_emissao_cert_civil = false, $str_sigla_uf_cert_civil = false, $str_cartorio_cert_civil = false, $int_num_cart_trabalho = false, $int_serie_cart_trabalho = false, $str_data_emissao_cart_trabalho = false, $str_sigla_uf_cart_trabalho = false, $int_num_tit_eleitor = false, $int_zona_tit_eleitor = false, $int_secao_tit_eleitor = false, $int_idorg_exp_rg = false ) | ||
69 | - { | 69 | + function clsDocumento( $int_idpes = false, $int_rg = false, $str_data_exp_rg = false, $str_sigla_uf_exp_rg = false, $int_tipo_cert_civil = false, $int_num_termo = false, $int_num_livro = false, $int_num_folha = false, $str_data_emissao_cert_civil = false, $str_sigla_uf_cert_civil = false, $str_cartorio_cert_civil = false, $int_num_cart_trabalho = false, $int_serie_cart_trabalho = false, $str_data_emissao_cart_trabalho = false, $str_sigla_uf_cart_trabalho = false, $int_num_tit_eleitor = false, $int_zona_tit_eleitor = false, $int_secao_tit_eleitor = false, $int_idorg_exp_rg = false, $str_certidao_nascimento = null) |
70 | + { | ||
70 | $objPessoa = new clsFisica($int_idpes); | 71 | $objPessoa = new clsFisica($int_idpes); |
71 | if($objPessoa->detalhe()) | 72 | if($objPessoa->detalhe()) |
72 | { | 73 | { |
@@ -112,6 +113,8 @@ class clsDocumento | @@ -112,6 +113,8 @@ class clsDocumento | ||
112 | $this->idorg_exp_rg = $int_idorg_exp_rg; | 113 | $this->idorg_exp_rg = $int_idorg_exp_rg; |
113 | } | 114 | } |
114 | 115 | ||
116 | + $this->certidao_nascimento = $str_certidao_nascimento; | ||
117 | + | ||
115 | $this->tabela = "documento"; | 118 | $this->tabela = "documento"; |
116 | } | 119 | } |
117 | 120 | ||
@@ -219,6 +222,11 @@ class clsDocumento | @@ -219,6 +222,11 @@ class clsDocumento | ||
219 | $campos .= ", idorg_exp_rg"; | 222 | $campos .= ", idorg_exp_rg"; |
220 | $values .= ", '{$this->idorg_exp_rg}'"; | 223 | $values .= ", '{$this->idorg_exp_rg}'"; |
221 | } | 224 | } |
225 | + if( is_string( $this->certidao_nascimento ) and (!empty($this->certidao_nascimento))) | ||
226 | + { | ||
227 | + $campos .= ", certidao_nascimento"; | ||
228 | + $values .= ", '{$this->certidao_nascimento}'"; | ||
229 | + } | ||
222 | 230 | ||
223 | $db->Consulta( "INSERT INTO {$this->schema}.{$this->tabela} ( idpes , origem_gravacao, idsis_cad, data_cad, operacao $campos ) VALUES ( '{$this->idpes}', 'M', 17, NOW(), 'I' $values )" ); | 231 | $db->Consulta( "INSERT INTO {$this->schema}.{$this->tabela} ( idpes , origem_gravacao, idsis_cad, data_cad, operacao $campos ) VALUES ( '{$this->idpes}', 'M', 17, NOW(), 'I' $values )" ); |
224 | 232 | ||
@@ -434,6 +442,18 @@ class clsDocumento | @@ -434,6 +442,18 @@ class clsDocumento | ||
434 | $gruda = ", "; | 442 | $gruda = ", "; |
435 | } | 443 | } |
436 | 444 | ||
445 | + | ||
446 | + if( ! is_null( $this->certidao_nascimento )) | ||
447 | + { | ||
448 | + $set .= $gruda."certidao_nascimento = '{$this->certidao_nascimento}'"; | ||
449 | + $gruda = ", "; | ||
450 | + } | ||
451 | + #else | ||
452 | + #{ | ||
453 | + # $set .= $gruda."certidao_nascimento = NULL"; | ||
454 | + # $gruda = ", "; | ||
455 | + #} | ||
456 | + | ||
437 | if($set) | 457 | if($set) |
438 | { | 458 | { |
439 | $db = new clsBanco(); | 459 | $db = new clsBanco(); |
@@ -617,7 +637,7 @@ class clsDocumento | @@ -617,7 +637,7 @@ class clsDocumento | ||
617 | if($objPessoa->detalhe()) | 637 | if($objPessoa->detalhe()) |
618 | { | 638 | { |
619 | $db = new clsBanco(); | 639 | $db = new clsBanco(); |
620 | - $db->Consulta("SELECT rg, data_exp_rg, sigla_uf_exp_rg, tipo_cert_civil, num_termo, num_livro, num_folha, data_emissao_cert_civil, sigla_uf_cert_civil, cartorio_cert_civil, num_cart_trabalho, serie_cart_trabalho, data_emissao_cart_trabalho, sigla_uf_cart_trabalho, num_tit_eleitor, zona_tit_eleitor, secao_tit_eleitor, idorg_exp_rg FROM {$this->schema}.{$this->tabela} WHERE idpes = '{$this->idpes}'"); | 640 | + $db->Consulta("SELECT rg, data_exp_rg, sigla_uf_exp_rg, tipo_cert_civil, num_termo, num_livro, num_folha, data_emissao_cert_civil, sigla_uf_cert_civil, cartorio_cert_civil, num_cart_trabalho, serie_cart_trabalho, data_emissao_cart_trabalho, sigla_uf_cart_trabalho, num_tit_eleitor, zona_tit_eleitor, secao_tit_eleitor, idorg_exp_rg, certidao_nascimento FROM {$this->schema}.{$this->tabela} WHERE idpes = '{$this->idpes}'"); |
621 | if( $db->ProximoRegistro() ) | 641 | if( $db->ProximoRegistro() ) |
622 | { | 642 | { |
623 | $tupla = $db->Tupla(); | 643 | $tupla = $db->Tupla(); |
@@ -636,6 +656,7 @@ class clsDocumento | @@ -636,6 +656,7 @@ class clsDocumento | ||
636 | $this->num_tit_eleitor = $tupla["num_tit_eleitor"]; | 656 | $this->num_tit_eleitor = $tupla["num_tit_eleitor"]; |
637 | $this->zona_tit_eleitor = $tupla["zona_tit_eleitor"]; | 657 | $this->zona_tit_eleitor = $tupla["zona_tit_eleitor"]; |
638 | $this->secao_tit_eleitor = $tupla["secao_tit_eleitor"]; | 658 | $this->secao_tit_eleitor = $tupla["secao_tit_eleitor"]; |
659 | + $this->certidao_nascimento = $tupla["certidao_nascimento"]; | ||
639 | 660 | ||
640 | $tupla["idpes"] = $tupla["idpes"]; | 661 | $tupla["idpes"] = $tupla["idpes"]; |
641 | $tupla["idorg_exp_rg"] = $tupla["idorg_exp_rg"]; | 662 | $tupla["idorg_exp_rg"] = $tupla["idorg_exp_rg"]; |
@@ -649,4 +670,4 @@ class clsDocumento | @@ -649,4 +670,4 @@ class clsDocumento | ||
649 | return false; | 670 | return false; |
650 | } | 671 | } |
651 | } | 672 | } |
652 | -?> | ||
653 | \ No newline at end of file | 673 | \ No newline at end of file |
674 | +?> |