Loading data/ddl/view/V_INTERVENANT_HISTORIQUE.sql +28 −4 Original line number Diff line number Diff line CREATE OR REPLACE FORCE VIEW V_INTERVENANT_HISTORIQUE AS -- OSE.V_INTERVENANT_HISTORIQUE source WITH historique AS ( --Initialisation des données personnelles SELECT d.intervenant_id intervenant_id, Loading Loading @@ -358,17 +360,39 @@ FROM validation v WHERE v.histo_destruction IS null GROUP BY i.id UNION ALL --Demande de mise en paiement SELECT s.intervenant_id intervenant_id, '7 - Demande de mise en paiement' categorie, mep.heures || 'h ' || th.libelle_court label, mep.histo_modification histo_date, mep.histo_modificateur_id histo_createur_id, u.display_name histo_user, 'glyphicon glyphicon-ok' icon, 7 ordre FROM mise_en_paiement mep JOIN formule_resultat_service frs ON frs.id = mep.formule_res_service_id JOIN service s ON s.id = frs.service_id JOIN type_heures th ON th.id = mep.type_heures_id JOIN utilisateur u ON u.id = mep.histo_modificateur_id LEFT JOIN periode p ON p.id = mep.periode_paiement_id WHERE mep.histo_destruction IS NULL AND mep.date_mise_en_paiement IS NULL UNION ALL --Mise en paiement SELECT s.intervenant_id intervenant_id, '7 - Mise en paiement' categorie, '8 - Mise en paiement' categorie, mep.heures || 'h ' || th.libelle_court || CASE WHEN p.id IS NULL THEN '' ELSE ' (paiement en ' || p.libelle_court || ')' END label, mep.histo_modification histo_date, mep.histo_modificateur_id histo_createur_id, u.display_name histo_user, 'glyphicon glyphicon-ok' icon, 6 ordre 8 ordre FROM mise_en_paiement mep JOIN formule_resultat_service frs ON frs.id = mep.formule_res_service_id Loading @@ -377,7 +401,7 @@ FROM JOIN utilisateur u ON u.id = mep.histo_modificateur_id LEFT JOIN periode p ON p.id = mep.periode_paiement_id WHERE mep.histo_destruction IS NULL mep.histo_destruction IS NULL AND mep.date_mise_en_paiement IS NOT NULL Loading module/Application/src/Controller/ContratController.php +6 −1 Original line number Diff line number Diff line Loading @@ -150,8 +150,13 @@ class ContratController extends AbstractController ]; foreach ($contrats as $contrat) { if($avenantResult < 0){ $services['contractualises'][$contrat->getId()] = $this->getProcessusContrat()->getServices($intervenant, $contrat, null); }else{ $services['contractualises'][$contrat->getId()] = $this->getProcessusContrat()->getServices($intervenant, $contrat, $role->getStructure()); } } $nc = $this->getProcessusContrat()->getServices($intervenant, null, $role->getStructure()); foreach ($nc as $service) { Loading module/Enseignement/src/Form/VolumeHoraireSaisieCalendaireForm.php +15 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,7 @@ class SaisieCalendaireHydrator implements HydratorInterface $ancienHoraireDebut = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_DEBUT, $this->getVal('ancien-horaire-debut')); $horaireDebut = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_DEBUT, $this->getVal('horaire-debut')); $object->setHoraireDebut($ancienHoraireDebut != $horaireDebut ? $ancienHoraireDebut : $horaireDebut); $ancienHoraireFin = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_FIN, $this->getVal('ancien-horaire-fin')); Loading Loading @@ -510,9 +511,23 @@ class SaisieCalendaireHydrator implements HydratorInterface if (isset($data['horaire-debut']) && $data['horaire-debut'] > 0) { $data['horaire-debut'] = (new \DateTime)->setTimestamp($data['horaire-debut']); } else{ //Pour une meilleure gestion du datetime local, si pas d'horaire de début on set à la date du jour 00:00 $now = new \DateTime(); $now->setTime(0,0); $data['horaire-debut'] = $now; } if (isset($data['horaire-fin']) && $data['horaire-fin'] > 0) { $data['horaire-fin'] = (new \DateTime)->setTimestamp($data['horaire-fin']); } else{ //Pour une meilleure gestion du datetime local, si pas d'horaire de début on set à la date du jour 00:00 $now = new \DateTime(); $now->setTime(0,0); $data['horaire-fin'] = $now; } return $data; } Loading module/ExportRh/src/Connecteur/Siham/SihamConnecteur.php +20 −9 Original line number Diff line number Diff line Loading @@ -163,16 +163,16 @@ class SihamConnecteur implements ConnecteurRhInterface public function recupererAffectationEnCoursIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?array { $typeAffectation = (isset($this->siham->getConfig()['type-affectation'])) ? $this->siham->getConfig()['type-affectation'] : ['FUN']; $affectations = []; $donneesAdministratives = $this->recupererDonneesAdministrativesIntervenantRh($intervenant); if (!empty($donneesAdministratives['listeAffectations']) || !empty($donneesAdministratives->listeAffectations)) { $listeAffectations = (isset($donneesAdministratives['listeAffectations'])) ? $donneesAdministratives['listeAffectations'] : $donneesAdministratives->listeAffectations; $listeAffectations = $donneesAdministratives['listeAffectations']; if (is_array($listeAffectations)) { foreach ($listeAffectations as $affectation) { //On prend uniquement les affectations fonctionnelles if ($affectation->codeTypeRattachement == 'FUN') { if (in_array($affectation->codeTypeRattachement, $typeAffectation)) { $dateDebutAffectation = new \DateTime($affectation->dateDebutAffectation); $dateFinAffectation = new \DateTime($affectation->dateFinAffectation); $currentDate = new \DateTime(); Loading @@ -180,7 +180,18 @@ class SihamConnecteur implements ConnecteurRhInterface $affectations[] = $affectation; } } }; } } else { //Todo relecture de code, rendre paramètrable le codeTypeRattachement en FUN ou HIE et refaire des tests. if (in_array($listeAffectations->codeTypeRattachement, $typeAffectation)) { $dateDebutAffectation = new \DateTime($listeAffectations->dateDebutAffectation); $dateFinAffectation = new \DateTime($listeAffectations->dateFinAffectation); $currentDate = new \DateTime(); if ($currentDate > $dateDebutAffectation and $currentDate < $dateFinAffectation) { $affectations[] = $listeAffectations; } } } } return $affectations; Loading Loading
data/ddl/view/V_INTERVENANT_HISTORIQUE.sql +28 −4 Original line number Diff line number Diff line CREATE OR REPLACE FORCE VIEW V_INTERVENANT_HISTORIQUE AS -- OSE.V_INTERVENANT_HISTORIQUE source WITH historique AS ( --Initialisation des données personnelles SELECT d.intervenant_id intervenant_id, Loading Loading @@ -358,17 +360,39 @@ FROM validation v WHERE v.histo_destruction IS null GROUP BY i.id UNION ALL --Demande de mise en paiement SELECT s.intervenant_id intervenant_id, '7 - Demande de mise en paiement' categorie, mep.heures || 'h ' || th.libelle_court label, mep.histo_modification histo_date, mep.histo_modificateur_id histo_createur_id, u.display_name histo_user, 'glyphicon glyphicon-ok' icon, 7 ordre FROM mise_en_paiement mep JOIN formule_resultat_service frs ON frs.id = mep.formule_res_service_id JOIN service s ON s.id = frs.service_id JOIN type_heures th ON th.id = mep.type_heures_id JOIN utilisateur u ON u.id = mep.histo_modificateur_id LEFT JOIN periode p ON p.id = mep.periode_paiement_id WHERE mep.histo_destruction IS NULL AND mep.date_mise_en_paiement IS NULL UNION ALL --Mise en paiement SELECT s.intervenant_id intervenant_id, '7 - Mise en paiement' categorie, '8 - Mise en paiement' categorie, mep.heures || 'h ' || th.libelle_court || CASE WHEN p.id IS NULL THEN '' ELSE ' (paiement en ' || p.libelle_court || ')' END label, mep.histo_modification histo_date, mep.histo_modificateur_id histo_createur_id, u.display_name histo_user, 'glyphicon glyphicon-ok' icon, 6 ordre 8 ordre FROM mise_en_paiement mep JOIN formule_resultat_service frs ON frs.id = mep.formule_res_service_id Loading @@ -377,7 +401,7 @@ FROM JOIN utilisateur u ON u.id = mep.histo_modificateur_id LEFT JOIN periode p ON p.id = mep.periode_paiement_id WHERE mep.histo_destruction IS NULL mep.histo_destruction IS NULL AND mep.date_mise_en_paiement IS NOT NULL Loading
module/Application/src/Controller/ContratController.php +6 −1 Original line number Diff line number Diff line Loading @@ -150,8 +150,13 @@ class ContratController extends AbstractController ]; foreach ($contrats as $contrat) { if($avenantResult < 0){ $services['contractualises'][$contrat->getId()] = $this->getProcessusContrat()->getServices($intervenant, $contrat, null); }else{ $services['contractualises'][$contrat->getId()] = $this->getProcessusContrat()->getServices($intervenant, $contrat, $role->getStructure()); } } $nc = $this->getProcessusContrat()->getServices($intervenant, null, $role->getStructure()); foreach ($nc as $service) { Loading
module/Enseignement/src/Form/VolumeHoraireSaisieCalendaireForm.php +15 −0 Original line number Diff line number Diff line Loading @@ -443,6 +443,7 @@ class SaisieCalendaireHydrator implements HydratorInterface $ancienHoraireDebut = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_DEBUT, $this->getVal('ancien-horaire-debut')); $horaireDebut = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_DEBUT, $this->getVal('horaire-debut')); $object->setHoraireDebut($ancienHoraireDebut != $horaireDebut ? $ancienHoraireDebut : $horaireDebut); $ancienHoraireFin = $lfh->allToData(VolumeHoraireListe::FILTRE_HORAIRE_FIN, $this->getVal('ancien-horaire-fin')); Loading Loading @@ -510,9 +511,23 @@ class SaisieCalendaireHydrator implements HydratorInterface if (isset($data['horaire-debut']) && $data['horaire-debut'] > 0) { $data['horaire-debut'] = (new \DateTime)->setTimestamp($data['horaire-debut']); } else{ //Pour une meilleure gestion du datetime local, si pas d'horaire de début on set à la date du jour 00:00 $now = new \DateTime(); $now->setTime(0,0); $data['horaire-debut'] = $now; } if (isset($data['horaire-fin']) && $data['horaire-fin'] > 0) { $data['horaire-fin'] = (new \DateTime)->setTimestamp($data['horaire-fin']); } else{ //Pour une meilleure gestion du datetime local, si pas d'horaire de début on set à la date du jour 00:00 $now = new \DateTime(); $now->setTime(0,0); $data['horaire-fin'] = $now; } return $data; } Loading
module/ExportRh/src/Connecteur/Siham/SihamConnecteur.php +20 −9 Original line number Diff line number Diff line Loading @@ -163,16 +163,16 @@ class SihamConnecteur implements ConnecteurRhInterface public function recupererAffectationEnCoursIntervenantRh(\Application\Entity\Db\Intervenant $intervenant): ?array { $typeAffectation = (isset($this->siham->getConfig()['type-affectation'])) ? $this->siham->getConfig()['type-affectation'] : ['FUN']; $affectations = []; $donneesAdministratives = $this->recupererDonneesAdministrativesIntervenantRh($intervenant); if (!empty($donneesAdministratives['listeAffectations']) || !empty($donneesAdministratives->listeAffectations)) { $listeAffectations = (isset($donneesAdministratives['listeAffectations'])) ? $donneesAdministratives['listeAffectations'] : $donneesAdministratives->listeAffectations; $listeAffectations = $donneesAdministratives['listeAffectations']; if (is_array($listeAffectations)) { foreach ($listeAffectations as $affectation) { //On prend uniquement les affectations fonctionnelles if ($affectation->codeTypeRattachement == 'FUN') { if (in_array($affectation->codeTypeRattachement, $typeAffectation)) { $dateDebutAffectation = new \DateTime($affectation->dateDebutAffectation); $dateFinAffectation = new \DateTime($affectation->dateFinAffectation); $currentDate = new \DateTime(); Loading @@ -180,7 +180,18 @@ class SihamConnecteur implements ConnecteurRhInterface $affectations[] = $affectation; } } }; } } else { //Todo relecture de code, rendre paramètrable le codeTypeRattachement en FUN ou HIE et refaire des tests. if (in_array($listeAffectations->codeTypeRattachement, $typeAffectation)) { $dateDebutAffectation = new \DateTime($listeAffectations->dateDebutAffectation); $dateFinAffectation = new \DateTime($listeAffectations->dateFinAffectation); $currentDate = new \DateTime(); if ($currentDate > $dateDebutAffectation and $currentDate < $dateFinAffectation) { $affectations[] = $listeAffectations; } } } } return $affectations; Loading