Commit e7518d3f915e231e81b0ae1eb982df1a0f200352
1 parent
c8cbb836
Exists in
master
#24 by Eriksen Costa: Corrigido bug de cadastro de compensação de falta do Servidor
Showing
2 changed files
with
24 additions
and
14 deletions
Show diff stats
ieducar/intranet/educar_falta_atraso_cad.php
... | ... | @@ -134,9 +134,9 @@ class indice extends clsCadastro |
134 | 134 | $this->campoOculto('ref_cod_servidor', $this->ref_cod_servidor); |
135 | 135 | |
136 | 136 | // Foreign keys |
137 | - $obrigatorio = true; | |
138 | - $get_instituicao = true; | |
139 | - $get_escola = true; | |
137 | + $obrigatorio = TRUE; | |
138 | + $get_instituicao = TRUE; | |
139 | + $get_escola = TRUE; | |
140 | 140 | include 'include/pmieducar/educar_campo_lista.php'; |
141 | 141 | |
142 | 142 | // Text | ... | ... |
ieducar/intranet/educar_falta_atraso_lst.php
... | ... | @@ -32,6 +32,7 @@ require_once 'include/clsBase.inc.php'; |
32 | 32 | require_once 'include/clsListagem.inc.php'; |
33 | 33 | require_once 'include/clsBanco.inc.php'; |
34 | 34 | require_once 'include/pmieducar/geral.inc.php'; |
35 | +require_once 'CoreExt/View/Helper/UrlHelper.php'; | |
35 | 36 | |
36 | 37 | /** |
37 | 38 | * clsIndexBase class. |
... | ... | @@ -145,15 +146,15 @@ class indice extends clsListagem |
145 | 146 | |
146 | 147 | $obj_comp = new clsPmieducarFaltaAtrasoCompensado(); |
147 | 148 | $horas = $obj_comp->ServidorHorasCompensadas($this->ref_cod_servidor, |
148 | - $registro["ref_cod_escola"], $registro["ref_ref_cod_instituicao"]); | |
149 | + $registro['ref_cod_escola'], $registro['ref_ref_cod_instituicao']); | |
149 | 150 | |
150 | 151 | if ($horas) { |
151 | - $horas_aux = $horas["hora"]; | |
152 | - $minutos_aux = $horas["min"]; | |
152 | + $horas_aux = $horas['hora']; | |
153 | + $minutos_aux = $horas['min']; | |
153 | 154 | } |
154 | 155 | |
155 | - $horas_aux = $horas_aux - $registro["qtd_horas"]; | |
156 | - $minutos_aux = $minutos_aux - $registro["qtd_min"]; | |
156 | + $horas_aux = $horas_aux - $registro['qtd_horas']; | |
157 | + $minutos_aux = $minutos_aux - $registro['qtd_min']; | |
157 | 158 | |
158 | 159 | if ($horas_aux > 0 && $minutos_aux < 0) { |
159 | 160 | $horas_aux--; |
... | ... | @@ -176,12 +177,21 @@ class indice extends clsListagem |
176 | 177 | $tipo = $registro['tipo'] == 1 ? |
177 | 178 | 'Atraso' : 'Falta'; |
178 | 179 | |
179 | - $this->addLinhas( array( | |
180 | - "<a href=\"educar_falta_atraso_det.php?cod_falta_atraso={$registro['cod_falta_atraso']}\">{$registro["nm_escola"]}</a>", | |
181 | - "<a href=\"educar_falta_atraso_det.php?cod_falta_atraso={$registro['cod_falta_atraso']}\">{$det_ins["nm_instituicao"]}</a>", | |
182 | - "<a href=\"educar_falta_atraso_det.php?cod_falta_atraso={$registro['cod_falta_atraso']}\">{$tipo}</a>", | |
183 | - "<a href=\"educar_falta_atraso_det.php?cod_falta_atraso={$registro['cod_falta_atraso']}\">{$horas_aux}</a>", | |
184 | - "<a href=\"educar_falta_atraso_det.php?cod_falta_atraso={$registro['cod_falta_atraso']}\">{$minutos_aux}</a>" | |
180 | + $urlHelper = CoreExt_View_Helper_UrlHelper::getInstance(); | |
181 | + $url = 'educar_falta_atraso_det.php'; | |
182 | + $options = array('query' => array( | |
183 | + 'cod_falta_atraso' => $registro['cod_falta_atraso'], | |
184 | + 'ref_cod_servidor' => $registro['ref_cod_servidor'], | |
185 | + 'ref_cod_escola' => $registro['ref_cod_escola'], | |
186 | + 'ref_cod_instituicao' => $registro['ref_ref_cod_instituicao'], | |
187 | + )); | |
188 | + | |
189 | + $this->addLinhas(array( | |
190 | + $urlHelper->l($registro['nm_escola'], $url, $options), | |
191 | + $urlHelper->l($det_ins['nm_instituicao'], $url, $options), | |
192 | + $urlHelper->l($tipo, $url, $options), | |
193 | + $urlHelper->l($horas_aux, $url, $options), | |
194 | + $urlHelper->l($minutos_aux, $url, $options) | |
185 | 195 | )); |
186 | 196 | } |
187 | 197 | } | ... | ... |