Commit dbe15bd1 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction #48151

parent 5d15f2a2
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -83,14 +83,14 @@ class StatutService extends AbstractEntityService
        [$qb, $alias] = $this->initQuery($qb, $alias);
        // $qb->andWhere("$alias.dossierSelectionnable = 1");
        $qb->andWhere("$alias.annee = " . $this->getServiceContext()->getAnnee()->getId());
        $qb->addOrderBy("$alias.code");

        $statuts = $qb->getQuery()->execute();
        $qb->addOrderBy("$alias.code");

        $result = [];
        foreach ($statuts as $value) {
            if ($value instanceof Statut) {
                if (($value->estNonHistorise() && $value->getDossierSelectionnable()) ||
                if (($value->estNonHistorise() && $value->getDossierSelectionnable() && $value->getDossier()) ||
                    $statut->getCode() == $value->getCode()) {
                    $result[] = $value;
                }