Skip to content

Commit

Permalink
Corrige validaçao do campo de Formas de organizaçao
Browse files Browse the repository at this point in the history
  • Loading branch information
Bonot committed May 25, 2022
1 parent be649e4 commit ca31cbe
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Rules/CheckMandatoryCensoFields.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ private function validaCampoFormasOrganizacaoTurma(mixed $params)
]
];

if (isset($params->etapa_educacenso) &&
if ($params->tipo_atendimento == TipoAtendimentoTurma::ESCOLARIZACAO &&
isset($params->formas_organizacao_turma) &&
isset($params->etapa_educacenso) &&
!in_array((int) $params->etapa_educacenso, $validOptionCorrelationForEtapaEnsino[(int)$params->formas_organizacao_turma], true)
) {
$todasEtapasEducacenso = loadJson(__DIR__ . '/../../ieducar/intranet/educacenso_json/etapas_ensino.json');
Expand Down

0 comments on commit ca31cbe

Please sign in to comment.