Commit 4246d810 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Evolution PEC et REN avec prise en compte du contrat

parent 845e7132
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
        "unicaen/import"                              : "6.0.1",
        "unicaen/tbl"                                 : "6.1.0",
        "unicaen/open-document"                       : "6.0.2",
        "unicaen/siham"                               : "6.0.2",
        "unicaen/siham"                               : "6.1.2",
        "unicaen/mail"                                : "6.0.6",
        "unicaen/vue"                                 : "6.0.0",
        "laminas/laminas-cache-storage-adapter-memory": "2.1.x-dev",
+65 −65
Original line number Diff line number Diff line
@@ -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": "0299d6044b14d67c20d09c859f66fda1",
    "content-hash": "520be36d0c2d4c6133fab196ce86224b",
    "packages": [
        {
            "name": "beberlei/assert",
@@ -460,16 +460,16 @@
        },
        {
            "name": "doctrine/dbal",
            "version": "3.7.0",
            "version": "3.7.1",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/dbal.git",
                "reference": "00d03067f07482f025d41ab55e4ba0db5eca2cdf"
                "reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/dbal/zipball/00d03067f07482f025d41ab55e4ba0db5eca2cdf",
                "reference": "00d03067f07482f025d41ab55e4ba0db5eca2cdf",
                "url": "https://api.github.com/repos/doctrine/dbal/zipball/5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
                "reference": "5b7bd66c9ff58c04c5474ab85edce442f8081cb2",
                "shasum": ""
            },
            "require": {
@@ -553,7 +553,7 @@
            ],
            "support": {
                "issues": "https://github.com/doctrine/dbal/issues",
                "source": "https://github.com/doctrine/dbal/tree/3.7.0"
                "source": "https://github.com/doctrine/dbal/tree/3.7.1"
            },
            "funding": [
                {
@@ -569,20 +569,20 @@
                    "type": "tidelift"
                }
            ],
            "time": "2023-09-26T20:56:55+00:00"
            "time": "2023-10-06T05:06:20+00:00"
        },
        {
            "name": "doctrine/deprecations",
            "version": "v1.1.1",
            "version": "1.1.2",
            "source": {
                "type": "git",
                "url": "https://github.com/doctrine/deprecations.git",
                "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
                "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
                "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
                "url": "https://api.github.com/repos/doctrine/deprecations/zipball/4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
                "reference": "4f2d4f2836e7ec4e7a8625e75c6aa916004db931",
                "shasum": ""
            },
            "require": {
@@ -614,9 +614,9 @@
            "homepage": "https://www.doctrine-project.org/",
            "support": {
                "issues": "https://github.com/doctrine/deprecations/issues",
                "source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
                "source": "https://github.com/doctrine/deprecations/tree/1.1.2"
            },
            "time": "2023-06-03T09:27:29+00:00"
            "time": "2023-09-27T20:04:15+00:00"
        },
        {
            "name": "doctrine/doctrine-laminas-hydrator",
@@ -2361,20 +2361,20 @@
        },
        {
            "name": "laminas/laminas-eventmanager",
            "version": "3.10.0",
            "version": "3.11.0",
            "source": {
                "type": "git",
                "url": "https://github.com/laminas/laminas-eventmanager.git",
                "reference": "5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba"
                "reference": "9cfa79ce247c567f05ce4b7c975c6bdf9698c5dd"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba",
                "reference": "5a5114ab2d3fa4424faa46a2fb0a4e49a61f6eba",
                "url": "https://api.github.com/repos/laminas/laminas-eventmanager/zipball/9cfa79ce247c567f05ce4b7c975c6bdf9698c5dd",
                "reference": "9cfa79ce247c567f05ce4b7c975c6bdf9698c5dd",
                "shasum": ""
            },
            "require": {
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0"
            },
            "conflict": {
                "container-interop/container-interop": "<1.2",
@@ -2425,7 +2425,7 @@
                    "type": "community_bridge"
                }
            ],
            "time": "2023-01-11T19:52:45+00:00"
            "time": "2023-10-10T08:29:58+00:00"
        },
        {
            "name": "laminas/laminas-file",
@@ -3160,20 +3160,20 @@
        },
        {
            "name": "laminas/laminas-loader",
            "version": "2.9.0",
            "version": "2.10.0",
            "source": {
                "type": "git",
                "url": "https://github.com/laminas/laminas-loader.git",
                "reference": "51ed9c3fa42d1098a9997571730c0cbf42d078d3"
                "reference": "e6fe952304ef40ce45cd814751ab35d42afdad12"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/51ed9c3fa42d1098a9997571730c0cbf42d078d3",
                "reference": "51ed9c3fa42d1098a9997571730c0cbf42d078d3",
                "url": "https://api.github.com/repos/laminas/laminas-loader/zipball/e6fe952304ef40ce45cd814751ab35d42afdad12",
                "reference": "e6fe952304ef40ce45cd814751ab35d42afdad12",
                "shasum": ""
            },
            "require": {
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0"
            },
            "conflict": {
                "zendframework/zend-loader": "*"
@@ -3212,7 +3212,7 @@
                    "type": "community_bridge"
                }
            ],
            "time": "2022-10-16T12:50:49+00:00"
            "time": "2023-10-18T09:58:51+00:00"
        },
        {
            "name": "laminas/laminas-log",
@@ -3381,21 +3381,21 @@
        },
        {
            "name": "laminas/laminas-math",
            "version": "3.6.0",
            "version": "3.7.0",
            "source": {
                "type": "git",
                "url": "https://github.com/laminas/laminas-math.git",
                "reference": "5770fc632a3614f5526632a8b70f41b65130460e"
                "reference": "3e90445828fd64308de2a600b48c3df051b3b17a"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laminas/laminas-math/zipball/5770fc632a3614f5526632a8b70f41b65130460e",
                "reference": "5770fc632a3614f5526632a8b70f41b65130460e",
                "url": "https://api.github.com/repos/laminas/laminas-math/zipball/3e90445828fd64308de2a600b48c3df051b3b17a",
                "reference": "3e90445828fd64308de2a600b48c3df051b3b17a",
                "shasum": ""
            },
            "require": {
                "ext-mbstring": "*",
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0"
            },
            "conflict": {
                "zendframework/zend-math": "*"
@@ -3444,7 +3444,7 @@
                    "type": "community_bridge"
                }
            ],
            "time": "2022-10-16T14:22:28+00:00"
            "time": "2023-10-18T09:53:37+00:00"
        },
        {
            "name": "laminas/laminas-mime",
@@ -4308,22 +4308,22 @@
        },
        {
            "name": "laminas/laminas-serializer",
            "version": "2.16.2",
            "version": "2.17.0",
            "source": {
                "type": "git",
                "url": "https://github.com/laminas/laminas-serializer.git",
                "reference": "092b67ee01018a48394b279ccc52ee11a22585b0"
                "reference": "9641dee4208078ff8dfbcdd74048adb0b3ee517e"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laminas/laminas-serializer/zipball/092b67ee01018a48394b279ccc52ee11a22585b0",
                "reference": "092b67ee01018a48394b279ccc52ee11a22585b0",
                "url": "https://api.github.com/repos/laminas/laminas-serializer/zipball/9641dee4208078ff8dfbcdd74048adb0b3ee517e",
                "reference": "9641dee4208078ff8dfbcdd74048adb0b3ee517e",
                "shasum": ""
            },
            "require": {
                "laminas/laminas-json": "^3.1",
                "laminas/laminas-stdlib": "^3.2",
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0"
                "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0"
            },
            "conflict": {
                "zendframework/zend-serializer": "*"
@@ -4374,7 +4374,7 @@
                    "type": "community_bridge"
                }
            ],
            "time": "2023-09-25T13:21:34+00:00"
            "time": "2023-10-01T15:38:34+00:00"
        },
        {
            "name": "laminas/laminas-servicemanager",
@@ -5730,16 +5730,16 @@
        },
        {
            "name": "setasign/fpdi",
            "version": "v2.4.1",
            "version": "v2.5.0",
            "source": {
                "type": "git",
                "url": "https://github.com/Setasign/FPDI.git",
                "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b"
                "reference": "ecf0459643ec963febfb9a5d529dcd93656006a4"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/Setasign/FPDI/zipball/f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b",
                "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b",
                "url": "https://api.github.com/repos/Setasign/FPDI/zipball/ecf0459643ec963febfb9a5d529dcd93656006a4",
                "reference": "ecf0459643ec963febfb9a5d529dcd93656006a4",
                "shasum": ""
            },
            "require": {
@@ -5790,7 +5790,7 @@
            ],
            "support": {
                "issues": "https://github.com/Setasign/FPDI/issues",
                "source": "https://github.com/Setasign/FPDI/tree/v2.4.1"
                "source": "https://github.com/Setasign/FPDI/tree/v2.5.0"
            },
            "funding": [
                {
@@ -5798,7 +5798,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2023-07-27T08:12:09+00:00"
            "time": "2023-09-28T10:46:27+00:00"
        },
        {
            "name": "stella-maris/clock",
@@ -7254,11 +7254,11 @@
        },
        {
            "name": "unicaen/siham",
            "version": "6.0.2",
            "version": "6.1.2",
            "source": {
                "type": "git",
                "url": "https://git.unicaen.fr/lib/unicaen/siham.git",
                "reference": "3ddc469a93d8028cf4fd6161e6404e0477e6ffcf"
                "reference": "32143ef386574aba7dc5303d78756522b21e8471"
            },
            "require": {
                "laminas/laminas-mail": "^2.10",
@@ -7283,7 +7283,7 @@
                }
            ],
            "description": "PHP library for SIHAM webservices",
            "time": "2023-03-28T14:48:15+00:00"
            "time": "2023-11-02T14:35:21+00:00"
        },
        {
            "name": "unicaen/tbl",
@@ -7532,16 +7532,16 @@
    "packages-dev": [
        {
            "name": "composer/pcre",
            "version": "3.1.0",
            "version": "3.1.1",
            "source": {
                "type": "git",
                "url": "https://github.com/composer/pcre.git",
                "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2"
                "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2",
                "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2",
                "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9",
                "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9",
                "shasum": ""
            },
            "require": {
@@ -7583,7 +7583,7 @@
            ],
            "support": {
                "issues": "https://github.com/composer/pcre/issues",
                "source": "https://github.com/composer/pcre/tree/3.1.0"
                "source": "https://github.com/composer/pcre/tree/3.1.1"
            },
            "funding": [
                {
@@ -7599,7 +7599,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2022-11-17T09:50:14+00:00"
            "time": "2023-10-11T07:11:09+00:00"
        },
        {
            "name": "composer/semver",
@@ -7891,16 +7891,16 @@
        },
        {
            "name": "pdepend/pdepend",
            "version": "2.15.0",
            "version": "2.15.1",
            "source": {
                "type": "git",
                "url": "https://github.com/pdepend/pdepend.git",
                "reference": "0d4d8fb87aa74c358c1c4364514017f34b4a68b9"
                "reference": "d12f25bcdfb7754bea458a4a5cb159d55e9950d0"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/pdepend/pdepend/zipball/0d4d8fb87aa74c358c1c4364514017f34b4a68b9",
                "reference": "0d4d8fb87aa74c358c1c4364514017f34b4a68b9",
                "url": "https://api.github.com/repos/pdepend/pdepend/zipball/d12f25bcdfb7754bea458a4a5cb159d55e9950d0",
                "reference": "d12f25bcdfb7754bea458a4a5cb159d55e9950d0",
                "shasum": ""
            },
            "require": {
@@ -7942,7 +7942,7 @@
            ],
            "support": {
                "issues": "https://github.com/pdepend/pdepend/issues",
                "source": "https://github.com/pdepend/pdepend/tree/2.15.0"
                "source": "https://github.com/pdepend/pdepend/tree/2.15.1"
            },
            "funding": [
                {
@@ -7950,7 +7950,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2023-09-22T02:30:39+00:00"
            "time": "2023-09-28T12:00:56+00:00"
        },
        {
            "name": "phan/phan",
@@ -8374,22 +8374,22 @@
        },
        {
            "name": "phpmd/phpmd",
            "version": "2.14.0",
            "version": "2.14.1",
            "source": {
                "type": "git",
                "url": "https://github.com/phpmd/phpmd.git",
                "reference": "247f84ef5d87323dabe953edc48b09ebabe3a0e6"
                "reference": "442fc2c34edcd5198b442d8647c7f0aec3afabe8"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/phpmd/phpmd/zipball/247f84ef5d87323dabe953edc48b09ebabe3a0e6",
                "reference": "247f84ef5d87323dabe953edc48b09ebabe3a0e6",
                "url": "https://api.github.com/repos/phpmd/phpmd/zipball/442fc2c34edcd5198b442d8647c7f0aec3afabe8",
                "reference": "442fc2c34edcd5198b442d8647c7f0aec3afabe8",
                "shasum": ""
            },
            "require": {
                "composer/xdebug-handler": "^1.0 || ^2.0 || ^3.0",
                "ext-xml": "*",
                "pdepend/pdepend": "^2.15.0",
                "pdepend/pdepend": "^2.15.1",
                "php": ">=5.3.9"
            },
            "require-dev": {
@@ -8446,7 +8446,7 @@
            "support": {
                "irc": "irc://irc.freenode.org/phpmd",
                "issues": "https://github.com/phpmd/phpmd/issues",
                "source": "https://github.com/phpmd/phpmd/tree/2.14.0"
                "source": "https://github.com/phpmd/phpmd/tree/2.14.1"
            },
            "funding": [
                {
@@ -8454,7 +8454,7 @@
                    "type": "tidelift"
                }
            ],
            "time": "2023-09-26T17:42:41+00:00"
            "time": "2023-09-28T13:07:44+00:00"
        },
        {
            "name": "phpstan/phpdoc-parser",
+33 −8
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@ use ExportRh\Connecteur\ConnecteurRhInterface;
use ExportRh\Entity\IntervenantRh;
use ExportRh\Form\Fieldset\SihamFieldset;
use ExportRh\Service\ExportRhServiceAwareTrait;
use UnicaenApp\Service\EntityManagerAwareTrait;
use UnicaenApp\Util;
use UnicaenSiham\Exception\SihamException;
use UnicaenSiham\Service\Siham;
@@ -17,6 +18,7 @@ use Laminas\Form\Fieldset;

class SihamConnecteur implements ConnecteurRhInterface
{
    use EntityManagerAwareTrait;
    use DossierServiceAwareTrait;
    use ExportRhServiceAwareTrait;
    use AdresseNumeroComplServiceAwareTrait;
@@ -210,6 +212,8 @@ class SihamConnecteur implements ConnecteurRhInterface
                ];

            /*CONTRAT*/
            //On récupére le nombre d'heures du contrat et le taux horaire appliqué
            $infos  = $this->getInfosContrat($intervenant);
            $config = $this->siham->getConfig();
            if (array_key_exists('contrat', $this->siham->getConfig())) {
                //On récupere le gradeTG pour le contrat
@@ -225,8 +229,8 @@ class SihamConnecteur implements ConnecteurRhInterface
                         'modeRemuneration'  => $this->siham->getConfig()['contrat']['parameters']['modeRemuneration'],
                         'modeDeGestion'     => $this->siham->getConfig()['contrat']['parameters']['modeDeGestion'],
                         'gradeTG'           => $gradeTG,
                         'tauxHoraires'      => '',
                         'nbHeuresContrat'   => '',
                         'tauxHoraires'      => $infos['taux'],
                         'nbHeuresContrat'   => $infos['totalHeure'],
                         'temoinValidite'    => $this->siham->getConfig()['contrat']['parameters']['temoinValidite'],
                        ];
                }
@@ -395,6 +399,26 @@ class SihamConnecteur implements ConnecteurRhInterface



    public function getInfosContrat (Intervenant $intervenant): array
    {
        $infos = [
            'totalHeure' => '',
            'taux'       => '',
        ];

        $sql = 'SELECT "totalHETD","tauxHoraireValeur" FROM V_CONTRAT_MAIN WHERE intervenant_id = :intervenant';
        $res = $this->getEntityManager()->getConnection()->fetchAllAssociative($sql, ['intervenant' => $intervenant->getId()]);

        if (!empty($res)) {
            $infos['totalHeure'] = str_replace(',', '.', $res[0]['totalHETD']);
            $infos['taux']       = str_replace(',', '.', $res[0]['tauxHoraireValeur']);
        }

        return $infos;
    }



    public function recupererGradeTG (string $codeStatut): ?string
    {
        $gradeTG = '';
@@ -470,6 +494,8 @@ class SihamConnecteur implements ConnecteurRhInterface
                ];

            /*CONTRAT*/
            //On récupére le nombre d'heures du contrat et le taux horaire appliqué
            $infos   = $this->getInfosContrat($intervenant);
            $config  = $this->siham->getConfig();
            $contrat = [];

@@ -489,8 +515,8 @@ class SihamConnecteur implements ConnecteurRhInterface
                         'modeRemuneration'  => $this->siham->getConfig()['contrat']['parameters']['modeRemuneration'],
                         'modeDeGestion'     => $this->siham->getConfig()['contrat']['parameters']['modeDeGestion'],
                         'gradeTG'           => $gradeTG,
                         'tauxHoraires'      => '43.5',
                         'nbHeuresContrat'   => '20',
                         'tauxHoraires'      => $infos['taux'],
                         'nbHeuresContrat'   => $infos['totalHeure'],
                         'temoinValidite'    => $this->siham->getConfig()['contrat']['parameters']['temoinValidite'],

                        ];
@@ -640,8 +666,7 @@ class SihamConnecteur implements ConnecteurRhInterface
                $this->siham->modifierAdressePrincipaleAgent($params);
            }

            //Fait planter les WS SIHAM....
            /*if ($datas['generiqueFieldset']['iban']) {
            if ($datas['generiqueFieldset']['iban']) {
                $anneeUniversitaire = $this->getServiceExportRh()->getAnneeUniversitaireEnCours();
                $dateEffet          = $anneeUniversitaire->getDateDebut()->format('Y-m-d');
                $coordonnees        = $this->siham->formatCoordoonneesBancairesForSiham($dossierIntervenant->getIBAN(), $dossierIntervenant->getBIC());
@@ -660,8 +685,8 @@ class SihamConnecteur implements ConnecteurRhInterface
                    'temoinValidite' => '1',
                ];

                $this->siham->modifierCoordonnéesBancairesAgent($params);
            }*/
                $this->siham->modifierCoordonneesBancairesAgent($params);
            }

            return true;
        } catch
+4 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace ExportRh\Connecteur\Siham;

use Doctrine\ORM\EntityManager;
use Psr\Container\ContainerInterface;
use UnicaenSiham\Service\Siham;

@@ -18,6 +19,8 @@ class SihamConnecteurFactory
    {
        $siham           = $container->get(Siham::class);
        $sihamConnecteur = new SihamConnecteur($siham);
        $sihamConnecteur->setEntityManager($container->get(EntityManager::class));


        return $sihamConnecteur;
    }
+1 −1
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ class ExportRhController extends AbstractController
            $nameConnecteur = $this->exportRhService->getConnecteurName();
            $form           = $this->getFormExportRh($intervenant);
            $form->bind($intervenantDossier);
            //On essaie de mettre l'affectation par défaut en comparant les libellés cours des structures (OSE/SIHAM)
            //On essaie de mettre l'affectation par défaut en comparant les libellés courts des structures (OSE/SIHAM)
            $form->setAffectationDefault($intervenant);
        } catch (\Exception $e) {
            $this->flashMessenger()->addErrorMessage($e->getMessage());
Loading