diff --git a/data/ddl/table/STATUT_INTERVENANT.php b/data/ddl/table/STATUT_INTERVENANT.php index 58a6c3a4e51b8d7cb6c4eb44307d5e15f7b4a4dd..a3899c5a848542fea794014e94c459b5829b627b 100644 --- a/data/ddl/table/STATUT_INTERVENANT.php +++ b/data/ddl/table/STATUT_INTERVENANT.php @@ -33,6 +33,18 @@ return [ 'position' => 8, 'commentaire' => NULL, ], + 'CODE_RH' => [ + 'name' => 'CODE_RH', + 'type' => 'string', + 'bdd-type' => 'VARCHAR2', + 'length' => 50, + 'scale' => NULL, + 'precision' => NULL, + 'nullable' => TRUE, + 'default' => NULL, + 'position' => 44, + 'commentaire' => 'Code de correspondance avec le SI RH', + ], 'DEPASSEMENT' => [ 'name' => 'DEPASSEMENT', 'type' => 'bool', diff --git a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.StatutIntervenant.dcm.xml b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.StatutIntervenant.dcm.xml index c0597e342a0bbe6162e2c25ed7c447efc17378ef..ad5a73a3bb01b451c6dae124e11757a5b0fe1fcb 100755 --- a/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.StatutIntervenant.dcm.xml +++ b/module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.StatutIntervenant.dcm.xml @@ -26,6 +26,7 @@ <field name="maximumHETD" type="float" column="MAXIMUM_HETD" precision="126" scale="0" nullable="false"/> <field name="chargesPatronales" type="float" column="CHARGES_PATRONALES" precision="126" scale="0" nullable="false"/> <field name="code" type="string" column="CODE" length="50" nullable="false"/> + <field name="codeRh" type="string" column="CODE_RH" length="50" nullable="false"/> <field name="nonAutorise" type="boolean" column="NON_AUTORISE" nullable="false"/> <field name="ordre" type="integer" column="ORDRE" nullable="false"/> <field name="peutSaisirService" type="boolean" column="PEUT_SAISIR_SERVICE" nullable="false"/> diff --git a/module/Application/src/Application/Entity/Db/StatutIntervenant.php b/module/Application/src/Application/Entity/Db/StatutIntervenant.php index 5c2797395504e47ef9c910abbf3a4ccb48f1f39f..6e1f884176f45c1624deb81fd32ea6b93b13606a 100755 --- a/module/Application/src/Application/Entity/Db/StatutIntervenant.php +++ b/module/Application/src/Application/Entity/Db/StatutIntervenant.php @@ -211,6 +211,11 @@ class StatutIntervenant implements HistoriqueAwareInterface, RoleInterface */ protected $dossierTelPerso; + /** + * @var string + */ + protected $codeRh; + /** @@ -1266,6 +1271,28 @@ class StatutIntervenant implements HistoriqueAwareInterface, RoleInterface + /** + * @return string + */ + public function getCodeRh() + { + return $this->codeRh; + } + + + + /** + * @param string $codeRh + */ + public function setCodeRh($codeRh): string + { + $this->codeRh = $codeRh; + + return $this; + } + + + /** * Indique si ce statut correspond à un intervenant permanent. * diff --git a/module/Application/src/Application/Form/StatutIntervenant/StatutIntervenantSaisieForm.php b/module/Application/src/Application/Form/StatutIntervenant/StatutIntervenantSaisieForm.php index bf351dcb471d46097b6ad6309135b1acc4048043..cd4c4290fc673b74153b7d0106f5b805ba361ebf 100755 --- a/module/Application/src/Application/Form/StatutIntervenant/StatutIntervenantSaisieForm.php +++ b/module/Application/src/Application/Form/StatutIntervenant/StatutIntervenantSaisieForm.php @@ -174,6 +174,17 @@ class StatutIntervenantSaisieForm extends AbstractForm 'type' => 'Text', ]); + $this->add([ + 'name' => 'code_rh', + 'options' => [ + 'label' => "Code RH", + + ], + 'attributes' => [ + ], + 'type' => 'Text', + ]); + //Gestion des agréments de façon dynamique par rapport au contenu de la table type_agrement $qb = $this->getServiceTypeAgrement()->finderByHistorique(); $typesAgrement = $this->getServiceTypeAgrement()->getList($qb); @@ -367,6 +378,9 @@ class StatutIntervenantSaisieForm extends AbstractForm 'code' => [ 'required' => true, ], + 'code_rh' => [ + 'required' => false, + ], 'plafond-h-c' => [ 'required' => true, 'validators' => [ diff --git a/module/Application/src/Application/Hydrator/StatutIntervenantHydrator.php b/module/Application/src/Application/Hydrator/StatutIntervenantHydrator.php index 2a1eaa918d69f8265020b6afd7865f9b4673979a..7700a0fa2959b492380901d4ba23ecb975e5ac6c 100755 --- a/module/Application/src/Application/Hydrator/StatutIntervenantHydrator.php +++ b/module/Application/src/Application/Hydrator/StatutIntervenantHydrator.php @@ -55,6 +55,7 @@ class StatutIntervenantHydrator implements HydratorInterface $object->setTemAtv($data['TEM-ATV']); $object->setTemBiatss($data['TEM-BIATSS']); $object->setCode($data['code']); + $object->setCodeRh($data['code_rh']); $object->setPlafondHcHorsRemuFc(FloatFromString::run($data['plafond-h-h-c'])); $object->setPlafondHcRemuFc(FloatFromString::run($data['plafond-h-c'])); $object->setPlafondHcFiHorsEad(FloatFromString::run($data['plafond-hc-fi-hors-ead'])); @@ -70,7 +71,7 @@ class StatutIntervenantHydrator implements HydratorInterface $object->setDossierEmployeur($data['dossier-employeur']); $object->setDossierEmailPerso($data['dossier-email-perso']); $object->setDossierTelPerso($data['dossier-tel-perso']); - + if (!empty($data['id'])) { $champsAutres = []; /* Gestion des champs autres */ @@ -163,6 +164,7 @@ class StatutIntervenantHydrator implements HydratorInterface 'TEM-BIATSS' => $object->getTemBiatss(), 'type-intervenant' => ($s = $object->getTypeIntervenant()) ? $s->getId() : null, 'code' => $object->getCode(), + 'code_rh' => $object->getCodeRh(), 'plafond-h-h-c' => StringFromFloat::run($object->getPlafondHcHorsRemuFc()), 'plafond-h-c' => StringFromFloat::run($object->getPlafondHcRemuFc()), 'plafond-hc-fi-hors-ead' => StringFromFloat::run($object->getPlafondHcFiHorsEad()), diff --git a/module/Application/view/application/statut-intervenant/saisie.phtml b/module/Application/view/application/statut-intervenant/saisie.phtml index 5287b7a537a08dd5dad40d831bea60ed79dc0f17..a072c76a075fecd595961de32e60b7a73386c9af 100755 --- a/module/Application/view/application/statut-intervenant/saisie.phtml +++ b/module/Application/view/application/statut-intervenant/saisie.phtml @@ -52,10 +52,13 @@ echo $this->form()->openTag($form); ?> <div class="col-md-4"> <?= $this->formControlGroup($form->get('code')); ?> </div> + <div class="col-md-4"> + <?= $this->formControlGroup($form->get('code_rh')); ?> + </div> <div class="col-md-2 atvb"> <?= $this->formControlGroup($form->get('TEM-ATV')); ?> </div> - <div class="col-md-4 atvb"> + <div class="col-md-2 atvb"> <?= $this->formControlGroup($form->get('TEM-BIATSS')); ?> </div> </div> diff --git a/module/ExportRh/src/Hydrator/ExportRhHydrator.php b/module/ExportRh/src/Hydrator/ExportRhHydrator.php index 1a4df3588a525cdd0a06da888d0365ea25b79044..bac2da0d5851c838af5753aeb86e1597fce542dc 100644 --- a/module/ExportRh/src/Hydrator/ExportRhHydrator.php +++ b/module/ExportRh/src/Hydrator/ExportRhHydrator.php @@ -23,32 +23,7 @@ class ExportRhHydrator implements HydratorInterface { //On mappe automatiquement le bon statut RH selon le statut OSE $statut = $object->getStatut(); - $statutRh = ''; - - switch ($statut->getCode()) { - case 'VACFONCSUAPS': - case 'VACNONFONCSUAPS': - case 'VAC.SUAPS': - $statutRh = 'C1204'; - break; - case 'INTERMITTENT': - $statutRh = 'C1201'; - break; - case 'SALAR_PRIVE': - case 'AUTO_LIBER_INDEP': - $statutRh = 'C2038'; - break; - case 'SALAR_PUBLIC': - $statutRh = 'C2052'; - break; - case 'RETR_HORS_UCBN': - case 'ETUD_UCBN': - $statutRh = 'C2041'; - break; - case 'PAMSU': - $statutRh = 'C1210'; - break; - } + $statutRh = $statut->getCodeRh(); $data['connecteurForm'] = [ 'statut' => $statutRh,