Commit 5c4c97dd4aaf0d2b6e4e249be477275178dc1520
1 parent
b3b5475c
Exists in
2.9
and in
7 other branches
Considera apenas último sequencial na turma
Showing
2 changed files
with
18 additions
and
1 deletions
Show diff stats
ieducar/intranet/include/pmieducar/clsPmieducarMatriculaTurma.inc.php
... | ... | @@ -359,7 +359,8 @@ class clsPmieducarMatriculaTurma extends Model |
359 | 359 | $int_ano_turma = false, |
360 | 360 | $dependencia = null, |
361 | 361 | $apenasTurmasMultiSeriadas = false, |
362 | - $apenasTurmasUnificadas = false | |
362 | + $apenasTurmasUnificadas = false, | |
363 | + $ultimoSequencialNaTurma = false | |
363 | 364 | ) { |
364 | 365 | $nome = ''; |
365 | 366 | $tab_aluno = ''; |
... | ... | @@ -623,6 +624,16 @@ class clsPmieducarMatriculaTurma extends Model |
623 | 624 | $whereAnd = ' AND '; |
624 | 625 | } |
625 | 626 | |
627 | + if ($ultimoSequencialNaTurma) { | |
628 | + $filtros .= "{$whereAnd} mt.sequencial = ( | |
629 | + SELECT max(sequencial) | |
630 | + FROM pmieducar.matricula_turma | |
631 | + WHERE matricula_turma.ref_cod_turma = mt.ref_cod_turma | |
632 | + AND matricula_turma.ref_cod_matricula = m.cod_matricula | |
633 | + )"; | |
634 | + $whereAnd = ' AND '; | |
635 | + } | |
636 | + | |
626 | 637 | $db = new clsBanco(); |
627 | 638 | $countCampos = count(explode(',', $this->_campos_lista)); |
628 | 639 | $resultado = []; | ... | ... |
ieducar/modules/Avaliacao/Views/DiarioApiController.php