diff --git a/module/Application/src/Entity/Db/FormuleResultatTypesHeuresTrait.php b/module/Application/src/Entity/Db/FormuleResultatTypesHeuresTrait.php index c4f637a1a2bc3f91658928b7d635999dc3fb063e..c7c75e5b8e96e2aa73a4f22c2823259d9df6b332 100755 --- a/module/Application/src/Entity/Db/FormuleResultatTypesHeuresTrait.php +++ b/module/Application/src/Entity/Db/FormuleResultatTypesHeuresTrait.php @@ -116,6 +116,8 @@ trait FormuleResultatTypesHeuresTrait return $this->getHeuresServiceFc(); case TypeHeures::REFERENTIEL: return $this->getHeuresServiceReferentiel(); + case TypeHeures::MISSION: + return 0; } throw new \RuntimeException('Type d\'heures inconnu ou non pris en charge'); } @@ -135,6 +137,8 @@ trait FormuleResultatTypesHeuresTrait return $this->getHeuresComplFcMajorees(); case TypeHeures::REFERENTIEL: return $this->getHeuresComplReferentiel(); + case TypeHeures::MISSION: + return $this->getHeuresMission(); } throw new \RuntimeException('Type d\'heures inconnu ou non pris en charge'); } diff --git a/module/Paiement/src/Service/ServiceAPayerService.php b/module/Paiement/src/Service/ServiceAPayerService.php index 8f06d9a227fcf97b87c2bffa1f6a1f396f48e6f0..3ffff1f1b50757d6726091d50f274da59293d1fc 100755 --- a/module/Paiement/src/Service/ServiceAPayerService.php +++ b/module/Paiement/src/Service/ServiceAPayerService.php @@ -45,9 +45,11 @@ class ServiceAPayerService extends AbstractService $saps = []; foreach( $meps as $mep ){ - $sap = $mep->getServiceAPayer(); - $sapId = get_class($sap).'@'.$sap->getId(); - $saps[$sapId] = $sap; + if ($mep->getHeuresAPayer() > 0 || $mep->getMiseEnPaiement()) { + $sap = $mep->getServiceAPayer(); + $sapId = get_class($sap) . '@' . $sap->getId(); + $saps[$sapId] = $sap; + } } return $saps;