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

Adaptations de l'interface aux auto-validations

parent 535890ba
Branches
Tags
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -248,6 +248,8 @@ class VolumeHoraireReferentiel implements HistoriqueAwareInterface, ImportAwareI
*/
public function hasValidation()
{
if ($this->isAutoValidation()) return true;
$validations = $this->getValidation();
foreach ($validations as $validation) {
/* @var $validation Validation */
......
......@@ -359,7 +359,7 @@ class VolumeHoraireListe
if ($contrat !== $this->contrat) return false;
}
}
if (false !== $this->validation){
if (false !== $this->validation && !$volumeHoraire->isAutoValidation()){
$validation = $volumeHoraire->getValidation();
if (true === $this->validation){
if ($validation->isEmpty()) return false;
......
......@@ -224,7 +224,7 @@ class VolumeHoraireReferentielListe
if ($etatVolumeHoraire->getOrdre() < $this->etatVolumeHoraire->getOrdre()) return false;
}
}
if (false !== $this->validation) {
if (false !== $this->validation && !$volumeHoraire->isAutoValidation()) {
$validation = $volumeHoraire->getValidation();
if (true === $this->validation) {
if ($validation->isEmpty()) {
......
......@@ -62,7 +62,7 @@ class ServiceProcessus extends AbstractProcessus
$service
->join( IntervenantService::class, $qb, 'intervenant', ['id', 'nomUsuel', 'prenom','sourceCode'] )
->leftJoin( $elementPedagogiqueService, $qb, 'elementPedagogique', ['id', 'sourceCode', 'libelle', 'histoDestruction', 'fi', 'fc', 'fa', 'tauxFi', 'tauxFc', 'tauxFa', 'tauxFoad'] )
->leftjoin( $volumeHoraireService, $qb, 'volumeHoraire', ['id', 'heures'] );
->leftjoin( $volumeHoraireService, $qb, 'volumeHoraire', ['id', 'heures', 'autoValidation'] );
$elementPedagogiqueService
->leftJoin( $structureService, $qb, 'structure', ['id', 'libelleCourt'] )
......
......@@ -41,7 +41,7 @@ class ServiceReferentielProcessus extends AbstractProcessus
$serviceReferentiel
->join(IntervenantService::class, $qb, 'intervenant', ['id', 'nomUsuel', 'prenom', 'sourceCode'])
->join($volumeHoraireReferentielService, $qb, 'volumeHoraireReferentiel', ['id', 'heures']);
->join($volumeHoraireReferentielService, $qb, 'volumeHoraireReferentiel', ['id', 'heures', 'autoValidation']);
$volumeHoraireReferentielService->leftJoin(EtatVolumeHoraireService::class, $qb, 'etatVolumeHoraireReferentiel', ['id', 'code', 'libelle', 'ordre']);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment