Commit 3417254b authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

FIX : On peut maintenant déclarer du temps le dernier jour de l'activité

parent 894e6642
Loading
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -2713,7 +2713,13 @@ class TimesheetService implements UseOscarUserContextService, UseOscarConfigurat
            throw new OscarException(sprintf("Le lot %s n'est pas encore commencé au %s", $wp, $jourCreneau));
        }

        if ($wp->getDateEnd() && $start > $wp->getDateEnd()) {
        // PATCH modifier le test pour autoriser je dernier jour.
        /** @var \DateTime $dernierJour */
        $dernierJour = $wp->getDateEnd();
        if( $dernierJour ){
            $dernierJour->setTime(23,59,59);
        }
        if ($wp->getDateEnd() && $start > $dernierJour) {
            throw new OscarException(sprintf("Le lot %s est terminé au %s", $wp, $jourCreneau));
        }
    }