Commit 7da2f9bc authored by Florian Joriot's avatar Florian Joriot
Browse files

Merge remote-tracking branch 'origin/b24' into b24

parents 6180c005 e2673987
Loading
Loading
Loading
Loading
Loading
−44.9 KiB (261 KiB)

File changed.

No diff preview for this file type.

+6 −2
Original line number Diff line number Diff line
@@ -907,9 +907,13 @@ class SihamConnecteur implements ConnecteurRhInterface
                ]],
            ];

            $uo = array_merge($uo, $this->siham->recupererListeUO($params));
            $result = $this->siham->recupererListeUO($params);

            if (!empty($result)) {
                $uo = array_merge($uo, $result);
            }

        }
        ksort($uo);

        return $uo;
+11 −5
Original line number Diff line number Diff line
@@ -58,13 +58,19 @@ class ExportRhForm extends AbstractForm
            $intervenantAffectation = $intervenant->getStructure()->getLibelleCourt();
            //On récupére les libellés de composante dispo dans le form
            $elementAffectation = $this->get('connecteurForm')->get('affectation');
            $listeComposantes   = $this->get('connecteurForm')->get('affectation')->getValueOptions();
            $listeComposantes = $elementAffectation->getValueOptions();
            $intervenantAffectationNormalise = mb_strtolower(trim((string)$intervenantAffectation), 'UTF-8');
            foreach ($listeComposantes as $code => $composante) {
                //On prend que le libelle court ed SIHAM pour le comparer au libelle court de OSE
                $libelleAffectation = explode(' ', $composante, 2);
                $libelleCourt       = $libelleAffectation[1];
                if (strtolower($intervenantAffectation) == strtolower($libelleCourt)) {

                // On découpe en 2 parties max : "CODE libellé court"
                $parts = preg_split('/\s+/', trim($composante), 2);
                if (count($parts) < 2) {
                    continue; // format inattendu
                }
                $libelleCourt = mb_strtolower(trim($parts[1]), 'UTF-8');
                if ($intervenantAffectationNormalise === $libelleCourt) {
                    $elementAffectation->setValue($code);
                    break; // on s'arrête au premier match
                }
            }
        }
+4 −3
Original line number Diff line number Diff line
@@ -342,8 +342,9 @@ class PlafondService extends AbstractEntityService
                $libVal = "entity1.code || ' ' || entity2.code ";
                $groupBy = 'entity1.code, entity2.code';
                foreach($entities as $entity){
                    if ($entity->getService()->getElementPedagogique()) {
                        $filters['pd.ELEMENT_PEDAGOGIQUE_ID'] = (int)$entity->getService()->getElementPedagogique()?->getId();
                    $elementPedagogique = $entity->getService()->getElementPedagogique();
                    if ($elementPedagogique) {
                        $filters['pd.ELEMENT_PEDAGOGIQUE_ID'] = (int)$elementPedagogique->getId();
                    }
                    $filters['pd.INTERVENANT_ID']         = (int)$entity->getService()->getIntervenant()->getId();
                    $filters['pd.TYPE_INTERVENTION_ID']   = (int)$entity->getTypeIntervention()->getId();