Commit 5a291275 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

[FIX] HDREtatRule : pas forcément de Proposition existante.

parent 5765c72c
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -63,10 +63,10 @@ class HDREtatRule
     */
    public function ajusterEtatSelonDates(HDR $hdr): void
    {
        if ($hdr->getCurrentProposition()->getDate() !== null && $hdr->getResultat()) {
        if ($hdr->getCurrentProposition()?->getDate() !== null && $hdr->getResultat()) {
            $this->appliquerChangementEtat($hdr, HDR::ETAT_SOUTENUE);
            return;
        }else if($hdr->getCurrentProposition()->getDate() !== null && $hdr->getResultat() === null){
        }else if($hdr->getCurrentProposition()?->getDate() !== null && $hdr->getResultat() === null){
            $this->appliquerChangementEtat($hdr, HDR::ETAT_SOUTENANCE_PROGRAMMEE);
        }

@@ -77,7 +77,7 @@ class HDREtatRule

        // Aucune date renseignée -> retour à EN_COURS (si autorisé)
        if ($hdr->getEtatHDR() !== HDR::ETAT_EN_COURS) {
            if($hdr->getCurrentProposition()->getDate() !== null){
            if($hdr->getCurrentProposition()?->getDate() !== null){
                $this->appliquerChangementEtat($hdr, HDR::ETAT_SOUTENANCE_PROGRAMMEE);
            }else{
                $this->appliquerChangementEtat($hdr, HDR::ETAT_EN_COURS);