Commit bc35ed8e authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Correction CREP CREF

parent bb96c058
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -753,4 +753,12 @@ class Agent implements
        }
        return $result;
    }

    public function getQuotiteAffectation(?DateTime $date = null) : string
    {
        $ficheposte = $this->getFichePosteBest();
        if ($ficheposte === null) return 'Aucun fiche de poste au format EMC2';

        return $ficheposte->toStringCompositionFichesMetiers();
    }
}
 No newline at end of file
+9 −1
Original line number Diff line number Diff line
@@ -47,11 +47,19 @@ trait FichePosteMacroTrait {
        /** @var FichePoste $ficheposte */
        $ficheposte = $this;

        $texte  = "";
        $quotiteTotal = 0;
        foreach ($ficheposte->getFichesMetiers() as $ficheTypeExterne) {
            $quotiteTotal += $ficheTypeExterne->getQuotite();
        }

        $texte  = $quotiteTotal. " %";
        $texte .= "<ul>";
        foreach ($ficheposte->getFichesMetiers() as $ficheTypeExterne) {
            $texte .= "<li>";
            $texte .= $ficheTypeExterne->getFicheType()->getMetier()->getLibelleGenre($ficheposte->getAgent());
//            foreach ($ficheTypeExterne->getFicheType()->getMetier()->getReferences() as $reference) {
//                $texte .= $reference->getUrl();
//            }
            $texte .= " (" .$ficheTypeExterne->getQuotite(). "%)";
            $texte .= "</li>";
        }