Commit 8165a68f30d7677e4e4a392b3515281a9670debe
1 parent
1eecc992
Exists in
2.8
and in
6 other branches
Adiciona campos da modal na query de update
Showing
1 changed file
with
8 additions
and
3 deletions
Show diff stats
ieducar/intranet/include/pmieducar/clsPmieducarCandidatoReservaVaga.inc.php
... | ... | @@ -632,20 +632,25 @@ class clsPmieducarCandidatoReservaVaga extends Model |
632 | 632 | * |
633 | 633 | * @throws Exception |
634 | 634 | */ |
635 | - public function alteraSituacao($situacao, $motivo = null) | |
635 | + public function alteraSituacao($situacao, $motivo = null, $data = null) | |
636 | 636 | { |
637 | 637 | if (!$this->cod_candidato_reserva_vaga) { |
638 | 638 | return false; |
639 | 639 | } |
640 | 640 | |
641 | 641 | $situacao = $situacao ?: 'NULL'; |
642 | - $motivo = $motivo ?: 'NULL'; | |
642 | + $motivo = $motivo ?: null; | |
643 | + if ($data) { | |
644 | + $data = "data_solicitacao = '{$data}',"; | |
645 | + } | |
646 | + | |
643 | 647 | $historico = $this->montaHistorico(); |
644 | 648 | |
645 | 649 | $db = new clsBanco(); |
646 | 650 | $db->Consulta("UPDATE pmieducar.candidato_reserva_vaga |
647 | 651 | SET situacao = {$situacao}, |
648 | - motivo = {$motivo}, | |
652 | + motivo = '{$motivo}', | |
653 | + {$data} | |
649 | 654 | data_situacao = NOW(), |
650 | 655 | historico = '{$historico}' |
651 | 656 | WHERE cod_candidato_reserva_vaga = '{$this->cod_candidato_reserva_vaga}'"); | ... | ... |