Commit bf01f752 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Ajout d'un champs code rh dans le statut de l'intervenant pour paramétrage export rh par statut.

parent b22d5d06
......@@ -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',
......
......@@ -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"/>
......
......@@ -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.
*
......
......@@ -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' => [
......
......@@ -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()),
......
......@@ -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>
......
......@@ -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,
......
Supports Markdown
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