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

Update ServiceProcessus.php

parent d2d34392
Branches
Tags 14.14
No related merge requests found
......@@ -19,13 +19,13 @@ class ServiceProcessus
$intervenant = $this->getServiceIntervenant()->getPrecedent($intervenant);
if (!$intervenant) return false;
$sql = "SELECT valide FROM tbl_service WHERE intervenant_id = :intervenant AND type_volume_horaire_id = :typeVolumeHoraire AND valide > 0";
$res = $this->getEntityManager()->getConnection()->fetchOne($sql, [
$sql = "SELECT valide FROM tbl_service WHERE intervenant_id = :intervenant AND type_volume_horaire_id = :typeVolumeHoraire AND valide > 0 AND ROWNUM = 1";
$res = $this->getEntityManager()->getConnection()->fetchAll($sql, [
'intervenant' => $intervenant->getId(),
'typeVolumeHoraire' => $typeVolumeHoraire->getId(),
]);
return $res !== false;
return !empty($res);
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment