diff --git a/composer.json b/composer.json index ebb51e40e57ad3674fb7ca64f82e45d5e64eea35..446403f67beb801f8f0fc56c78b74cf38d5be180 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ "unicaen/siham" : "6.2.0", "unicaen/mail" : "7.1.2", "unicaen/vue" : "6.3.2", - "unicaen/bddadmin" : "1.1.1", + "unicaen/bddadmin" : "1.2.0", "unicaen/signature" : "1.0.4", "connecteur-ose/actul" : "dev-master", "connecteur-ose/pegase" : "dev-master" diff --git a/composer.lock b/composer.lock index 5a2dca193626f36918d2f32312bbdd911dc3fabb..ae9f0b9e4576f85b527a8fe93527ad9c6efaecb7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "b1dec40219b9284fb87959cb1656f00e", + "content-hash": "5f8edc2714f74ed7fca3e6e1e0d5d974", "packages": [ { "name": "apereo/phpcas", @@ -7535,11 +7535,11 @@ }, { "name": "unicaen/bddadmin", - "version": "1.1.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://git.unicaen.fr/lib/unicaen/bddadmin.git", - "reference": "2ac66aa67ae4ae82bb3d228d8af5845a2c095c78" + "reference": "7a3c1e173348dfead76128219de1d8a851c90b27" }, "require": { "php": ">=8.2" @@ -7552,7 +7552,7 @@ } }, "description": "Module pour administrer des bases de données Postgresql et Oracle", - "time": "2025-02-05T16:21:04+00:00" + "time": "2025-02-20T13:34:57+00:00" }, { "name": "unicaen/bjy-authorize", @@ -9067,16 +9067,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.0.2", + "version": "2.1.0", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "51087f87dcce2663e1fed4dfd4e56eccd580297e" + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/51087f87dcce2663e1fed4dfd4e56eccd580297e", - "reference": "51087f87dcce2663e1fed4dfd4e56eccd580297e", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", + "reference": "9b30d6fd026b2c132b3985ce6b23bec09ab3aa68", "shasum": "" }, "require": { @@ -9108,9 +9108,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.0.2" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.1.0" }, - "time": "2025-02-17T20:25:51+00:00" + "time": "2025-02-19T13:28:12+00:00" }, { "name": "phpunit/php-code-coverage", diff --git a/data/ddl/view/V_FORMULE_VOLUME_HORAIRE.sql b/data/ddl/view/V_FORMULE_VOLUME_HORAIRE.sql index e6ff902c0b668a61e20933d81952ceb948431893..09d0b1d77339e7deb8f2418019a46819f43bb03c 100644 --- a/data/ddl/view/V_FORMULE_VOLUME_HORAIRE.sql +++ b/data/ddl/view/V_FORMULE_VOLUME_HORAIRE.sql @@ -31,7 +31,7 @@ FROM volume_horaire vh JOIN parametre p ON p.nom = 'structure_univ' JOIN service s ON s.id = vh.service_id - JOIN intervenant i ON i.id = s.intervenant_id AND i.histo_destruction IS NULL + JOIN intervenant i ON i.id = s.intervenant_id JOIN statut si ON si.id = i.statut_id JOIN type_intervention ti ON ti.id = vh.type_intervention_id JOIN v_vol_horaire_etat_multi vhe ON vhe.volume_horaire_id = vh.id @@ -115,7 +115,7 @@ FROM volume_horaire_ref vhr JOIN parametre p ON p.nom = 'structure_univ' JOIN service_referentiel sr ON sr.id = vhr.service_referentiel_id - JOIN intervenant i ON i.id = sr.intervenant_id AND i.histo_destruction IS NULL + JOIN intervenant i ON i.id = sr.intervenant_id JOIN statut si ON si.id = i.statut_id JOIN v_vol_horaire_ref_etat_multi vher ON vher.volume_horaire_ref_id = vhr.id JOIN etat_volume_horaire evh ON evh.id = vher.etat_volume_horaire_id diff --git a/module/Dossier/src/Validator/NumeroINSEEValidator.php b/module/Dossier/src/Validator/NumeroINSEEValidator.php index 1947743d8016499ee905ed024432f47e6bdcab71..6f2af3312d31aad1117a43e37d2f63fe1c539518 100755 --- a/module/Dossier/src/Validator/NumeroINSEEValidator.php +++ b/module/Dossier/src/Validator/NumeroINSEEValidator.php @@ -21,7 +21,7 @@ use UnicaenApp\Validator\NumeroINSEE; * * @see http://fr.wikipedia.org/wiki/Num%C3%A9ro_de_s%C3%A9curit%C3%A9_sociale_en_France */ -class NumeroINSEEValidator extends NumeroINSEE +final class NumeroINSEEValidator extends NumeroINSEE { use DepartementServiceAwareTrait; use CiviliteServiceAwareTrait; @@ -32,35 +32,31 @@ class NumeroINSEEValidator extends NumeroINSEE const MSG_MOIS = 'msgMois'; const MSG_DEPT = 'msgDepartement'; - /** - * @var string - */ - protected $value; /** * @var bool */ - protected $provisoire = false; + private $provisoire = false; /** * @var Civilite|null */ - protected $civilite; + private $civilite; /** * @var \DateTime|null */ - protected $dateNaissance; + private $dateNaissance; /** * @var Pays|null */ - protected $pays; + private $pays; /** * @var Departement|null */ - protected $departement; + private $departement; @@ -72,6 +68,11 @@ class NumeroINSEEValidator extends NumeroINSEE self::MSG_MOIS => "Le numéro n'est pas cohérent avec le mois de naissance saisi", self::MSG_DEPT => "Le numéro n'est pas cohérent avec le pays et l'éventuel département de naissance saisi", ]); + $this->pays = $options['paysDeNaissance'] ?? false; + $this->dateNaissance = $options['dateDeNaissance'] ?? false; + $this->departement = $options['departementDeNaissance'] ?? false; + $this->civilite = $options['civilite'] ?? false; + $this->provisoire = $options['provisoire'] ?? false; parent::__construct($options); } @@ -85,10 +86,10 @@ class NumeroINSEEValidator extends NumeroINSEE } $this->value = $value; - $departementDeNaissance = $this->getOption('departementDeNaissance'); - $dateDeNaissance = $this->getOption('dateDeNaissance'); - $paysDeNaissance = $this->getOption('paysDeNaissance'); - $civilite = $this->getOption('civilite'); + $departementDeNaissance = $this->departement; + $dateDeNaissance = $this->dateNaissance; + $paysDeNaissance = $this->pays; + $civilite = $this->civilite; $this->provisoire = $this->getProvisoire(); @@ -96,13 +97,7 @@ class NumeroINSEEValidator extends NumeroINSEE return !empty($value); } - //Désactivation du test civilité sur l'insee (cas personnes changeant de sexe) - /*$this->civilite = (!empty($civilite)) ? - $this->getServiceCivilite()->get((int)$civilite) : null; - - if ($this->civilite && !$this->isValidCivilite()) return false;*/ - - $this->dateNaissance = (!empty($dateDeNaissance)) ? \DateTime::createFromFormat(Constants::DATE_FORMAT, $dateDeNaissance) : null; + $this->dateNaissance = (!empty($dateDeNaissance)) ? \DateTime::createFromFormat('Y-m-d', $dateDeNaissance) : null; if ($this->dateNaissance && !$this->isValidDateNaissance()) return false; @@ -323,11 +318,7 @@ class NumeroINSEEValidator extends NumeroINSEE return 99; // étranger } - /* if ($iDepartement == '97' || $iDepartement == '98') { - $iDepartement = substr(strtoupper($this->value), 5, 3); - return (int)$iDepartement; - }*/ return (int)$iDepartement; } diff --git a/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteComplementaireView.phtml b/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteComplementaireView.phtml index 425f85a8808f0bdb8be6782dded9d10916541bb8..e9e9a37e7609cf4dca7c57a75d3889d9ad11893a 100755 --- a/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteComplementaireView.phtml +++ b/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteComplementaireView.phtml @@ -46,7 +46,9 @@ $dossierIdentiteComplementaire = $form->get('DossierIdentiteComplementaire'); <div class="input-group cold-md-6 readonly"> <?php if (!empty($dossierIdentiteComplementaire->get('dateNaissance')->getValue())) { - echo ($viewIdentite) ? $dossierIdentiteComplementaire->get('dateNaissance')->getValue() : '**/**/****'; + $dateNaissance = $dossierIdentiteComplementaire->get('dateNaissance')->getValue(); + $dateNaissanceFormatted = DateTime::createFromFormat('Y-m-d',$dateNaissance)->format('d/m/Y'); + echo ($viewIdentite) ? $dateNaissanceFormatted : '**/**/****'; } ?> </div> diff --git a/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteView.phtml b/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteView.phtml index da34ab3274099ba2272c32ed6f696ea3525b12a0..9e578ece9893f3210162089c4311204da4daeea5 100755 --- a/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteView.phtml +++ b/module/Dossier/view/dossier/intervenant-dossier/partial/formIdentiteView.phtml @@ -99,7 +99,9 @@ $dossierIdentite = $form->get('DossierIdentite'); <div class="input-group cold-md-6 readonly"> <?php if (!empty($dossierIdentite->get('dateSituationMatrimoniale')->getValue())) { - echo ($viewIdentite) ? $dossierIdentite->get('dateSituationMatrimoniale')->getValue() : '**/**/****'; + $dateMatrimoniale = $dossierIdentite->get('dateSituationMatrimoniale')->getValue(); + $dateMatrimonialeFormatted = DateTime::createFromFormat('Y-m-d',$dateMatrimoniale)->format('d/m/Y'); + echo ($viewIdentite) ? $dateMatrimonialeFormatted : '**/**/****'; } ?> </div> diff --git a/module/Formule/src/Service/AfficheurService.php b/module/Formule/src/Service/AfficheurService.php index 95b7bed9a0ffbb59faec3e605ccccc620c890eb3..81e62f93d94f0ffd0ba62ced9ac7984a7609c2ae 100755 --- a/module/Formule/src/Service/AfficheurService.php +++ b/module/Formule/src/Service/AfficheurService.php @@ -93,17 +93,25 @@ class AfficheurService if (count($types) > 1) { $types[] = 'total'; - foreach ($data['heures'] as $categorie => $null) { - $data['heures'][$categorie]['total'] = $fr->getHeures($categorie); + foreach ($data['heures'] as $categorie => $values) { + foreach($values as $type => $heures){ + if(!array_key_exists('total',$data['heures'][$categorie])){ + $data['heures'][$categorie]['total'] = 0; + } + if($type != 'total') + { + $data['heures'][$categorie]['total'] += $heures; + } + } } } if (count($data['heures']) > 1) { $data['heures']['total'] = array_fill_keys($types, 0.0); foreach ($data['heures'] as $categorie => $ht) { - if ('primes' !== $categorie) { + if ('primes' !== $categorie && 'total' !== $categorie) { foreach ($types as $type) { - $data['heures']['total'][$type] += $ht[$type]; + $data['heures']['total'][$type] += $ht[$type]; } } }