Loading module/Application/src/Form/Contrat/ModeleForm.php +7 −4 Changes for module/Application/src/Form/Contrat/ModeleForm.php: 7 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -33,9 +33,7 @@ class ModeleForm extends AbstractForm public function getStatuts() { $qb = $this->getServiceStatut()->finderByHistorique(); return $this->getServiceStatut()->getList($qb); return $this->getServiceStatut()->getStatuts(); } Loading Loading @@ -222,10 +220,15 @@ class ModeleFormHydrator implements HydratorInterface */ public function extract($object): array { $statut = null; if ($object->getStatut()) { $statut = $this->getServiceStatut()->getByCode($object->getStatut()->getCode()); } $data = [ 'libelle' => $object->getLibelle(), 'structure' => $object->getStructure() ? $object->getStructure()->getId() : null, 'statut' => $object->getStatut() ? $object->getStatut()->getId() : null, 'statut' => $statut?->getId(), 'requete' => $object->getRequete(), ]; Loading module/Application/src/Service/ModeleContratService.php +1 −1 Changes for module/Application/src/Service/ModeleContratService.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ class ModeleContratService extends AbstractEntityService } if ($modele->getStatut() && $contrat->getIntervenant()->getStatut()) { if ($modele->getStatut() == $contrat->getIntervenant()->getStatut()) { if ($modele->getStatut()->getCode() == $contrat->getIntervenant()->getStatut()->getCode()) { $rank += 55; } else { return 0; Loading module/Intervenant/src/Service/StatutService.php +3 −3 Changes for module/Intervenant/src/Service/StatutService.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -48,11 +48,11 @@ class StatutService extends AbstractEntityService /** * @param string $code * * @return Statut * @return ?Statut */ public function getByCode(string $code): Statut public function getByCode(string $code): ?Statut { return $this->getRepo()->findOneBy(['code' => $code]); return $this->getRepo()->findOneBy(['code' => $code, 'annee' => $this->getServiceContext()->getAnnee()]); } Loading Loading
module/Application/src/Form/Contrat/ModeleForm.php +7 −4 Changes for module/Application/src/Form/Contrat/ModeleForm.php: 7 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -33,9 +33,7 @@ class ModeleForm extends AbstractForm public function getStatuts() { $qb = $this->getServiceStatut()->finderByHistorique(); return $this->getServiceStatut()->getList($qb); return $this->getServiceStatut()->getStatuts(); } Loading Loading @@ -222,10 +220,15 @@ class ModeleFormHydrator implements HydratorInterface */ public function extract($object): array { $statut = null; if ($object->getStatut()) { $statut = $this->getServiceStatut()->getByCode($object->getStatut()->getCode()); } $data = [ 'libelle' => $object->getLibelle(), 'structure' => $object->getStructure() ? $object->getStructure()->getId() : null, 'statut' => $object->getStatut() ? $object->getStatut()->getId() : null, 'statut' => $statut?->getId(), 'requete' => $object->getRequete(), ]; Loading
module/Application/src/Service/ModeleContratService.php +1 −1 Changes for module/Application/src/Service/ModeleContratService.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -248,7 +248,7 @@ class ModeleContratService extends AbstractEntityService } if ($modele->getStatut() && $contrat->getIntervenant()->getStatut()) { if ($modele->getStatut() == $contrat->getIntervenant()->getStatut()) { if ($modele->getStatut()->getCode() == $contrat->getIntervenant()->getStatut()->getCode()) { $rank += 55; } else { return 0; Loading
module/Intervenant/src/Service/StatutService.php +3 −3 Changes for module/Intervenant/src/Service/StatutService.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -48,11 +48,11 @@ class StatutService extends AbstractEntityService /** * @param string $code * * @return Statut * @return ?Statut */ public function getByCode(string $code): Statut public function getByCode(string $code): ?Statut { return $this->getRepo()->findOneBy(['code' => $code]); return $this->getRepo()->findOneBy(['code' => $code, 'annee' => $this->getServiceContext()->getAnnee()]); } Loading