Commit 41dca713 authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Update ServiceProcessus.php

parent d2d34392
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment