Skip to content
Snippets Groups Projects
Commit 0e7a5a50 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Blocage au niveau des validations si dépassement de plafond

Meilleure prise en charge des dérogations : on n'affiche plus de dépassement dans ce cas
parent 862386fc
No related branches found
No related tags found
No related merge requests found
......@@ -625,6 +625,11 @@ class ServiceController extends AbstractController
/* @var $structure Structure */
$plafondOk = $this->getProcessusPlafond()->controle($intervenant, $typeVolumeHoraire, true);
if (!$plafondOk) {
return new MessengerViewModel();
}
$validation = $this->getProcessusValidationEnseignement()->creer($intervenant, $structure);
if ($this->isAllowed($validation, $typeVolumeHoraire->getPrivilegeEnseignementValidation())) {
......
......@@ -119,13 +119,13 @@ class PlafondsViewHelper extends AbstractHtmlElement
$text = '';
$max = $plafond->getPlafond() + $plafond->getDerogation();
if ($plafond->getHeures() >= $max) {
if ($plafond->getHeures() > $max) {
$max = $plafond->getHeures();
if ($plafond->getHeures() > 0) {
if ($plafond->getPlafond() == 0) {
$text = floatToString($plafond->getHeures()) . 'h pour aucune autorisée';
} else {
$text = floatToString($plafond->getHeures()) . 'h pour ' . floatToString($plafond->getPlafond()) . ' max.';
$text = floatToString($plafond->getHeures()) . 'h pour ' . floatToString($plafond->getPlafond() + $plafond->getDerogation()) . ' max.';
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment