diff --git a/ieducar/modules/Api/Views/MatriculaController.php b/ieducar/modules/Api/Views/MatriculaController.php index 058b297..a9b93e8 100644 --- a/ieducar/modules/Api/Views/MatriculaController.php +++ b/ieducar/modules/Api/Views/MatriculaController.php @@ -66,7 +66,7 @@ class MatriculaController extends ApiCoreController pmieducar.aluno, cadastro.pessoa where aluno.cod_aluno = matricula.ref_cod_aluno and pessoa.idpes = aluno.ref_idpes and aluno.ativo = matricula.ativo and matricula.ativo = 1 and matricula.aprovado in (1, 2, 3, 4, 7, 8, 9) and - (matricula.cod_matricula like $1||'%' or matricula.ref_cod_aluno like $1||'%') and + (matricula.cod_matricula::varchar like $1||'%' or matricula.ref_cod_aluno::varchar like $1||'%') and (select case when $2 != 0 then matricula.ref_ref_cod_escola = $2 else 1=1 end) and (select case when $3 != 0 then matricula.ano = $3 else 1=1 end) group by aluno.cod_aluno, pessoa.nome limit 15"; } @@ -79,7 +79,7 @@ class MatriculaController extends ApiCoreController pmieducar.aluno, cadastro.pessoa where aluno.cod_aluno = matricula.ref_cod_aluno and pessoa.idpes = aluno.ref_idpes and aluno.ativo = matricula.ativo and matricula.ativo = 1 and matricula.aprovado in (1, 2, 3, 4, 7, 8, 9) and - lower(to_ascii(pessoa.nome)) like lower(to_ascii($1))||'%' and + lower(pessoa.nome) like lower($1)||'%' and (select case when $2 != 0 then matricula.ref_ref_cod_escola = $2 else 1=1 end) and (select case when $3 != 0 then matricula.ano = $3 else 1=1 end) group by aluno.cod_aluno, pessoa.nome limit 15"; } @@ -198,7 +198,7 @@ class MatriculaController extends ApiCoreController $objBanco = new clsBanco(); $frequencia = $objBanco->unicoCampo(" SELECT modules.frequencia_da_matricula({$cod_matricula}); "); return array('frequencia' => $frequencia); - } + } protected function deleteAbandono() { if ($this->canDeleteAbandono()) { -- libgit2 0.21.2