Commit 7b514191 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge remote-tracking branch 'origin/master' into ll-multi-niveaux-structures

# Conflicts:
#	composer.json
#	composer.lock
#	module/ExportRh/src/Connecteur/Siham/SihamConnecteur.php
parents 01d672b0 8443e79a
Loading
Loading
Loading
Loading
+1 −1
Changes for composer.json: 1 added line, 1 removed line.
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"                                : "dev-php82",
        "unicaen/vue"                                 : "6.0.0",
        "laminas/laminas-cache-storage-adapter-memory": "2.2.0",
+36 −11
Changes for module/ExportRh/src/Connecteur/Siham/SihamConnecteur.php: 36 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ use ExportRh\Connecteur\ConnecteurRhInterface;
use ExportRh\Entity\IntervenantRh;
use ExportRh\Form\Fieldset\SihamFieldset;
use ExportRh\Service\ExportRhServiceAwareTrait;
use UnicaenApp\Service\EntityManagerAwareTrait;
use Laminas\Form\Fieldset;
use Lieu\Service\AdresseNumeroComplServiceAwareTrait;
use Lieu\Service\VoirieServiceAwareTrait;
@@ -17,6 +18,7 @@ use UnicaenSiham\Service\Siham;

class SihamConnecteur implements ConnecteurRhInterface
{
    use EntityManagerAwareTrait;
    use DossierServiceAwareTrait;
    use ExportRhServiceAwareTrait;
    use AdresseNumeroComplServiceAwareTrait;
@@ -189,7 +191,7 @@ class SihamConnecteur implements ConnecteurRhInterface
            /* Récupération du dossier de l'intervenant */
            $dossierIntervenant = $this->getServiceDossier()->getByIntervenant($intervenant);

            $anneeUniversitaire = $intervenant->getAnnee();//$this->getServiceExportRh()->getAnneeUniversitaireEnCours();
            $anneeUniversitaire = $intervenant->getAnnee();
            $dateEffet          = $anneeUniversitaire->getDateDebut()->format('Y-m-d');
            $dateFin            = $anneeUniversitaire->getDateFin()->format('Y-m-d');

@@ -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 = '';
@@ -441,7 +465,7 @@ class SihamConnecteur implements ConnecteurRhInterface

            /* Récupération du dossier de l'intervenant */
            $dossierIntervenant = $this->getServiceDossier()->getByIntervenant($intervenant);
            $anneeUniversitaire = $intervenant->getAnnee();//$this->getServiceExportRh()->getAnneeUniversitaireEnCours();
            $anneeUniversitaire = $intervenant->getAnnee();

            $dateEffet = $anneeUniversitaire->getDateDebut()->format('Y-m-d');
            $dateFin   = $anneeUniversitaire->getDateFin()->format('Y-m-d');
@@ -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,9 +666,8 @@ class SihamConnecteur implements ConnecteurRhInterface
                $this->siham->modifierAdressePrincipaleAgent($params);
            }

            //Fait planter les WS SIHAM....
            /*if ($datas['generiqueFieldset']['iban']) {
                $anneeUniversitaire = $this->getServiceExportRh()->getAnneeUniversitaireEnCours();
            if ($datas['generiqueFieldset']['iban']) {
                $anneeUniversitaire = $intervenant->getAnnee();
                $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
+3
Changes for module/ExportRh/src/Connecteur/Siham/SihamConnecteurFactory.php: 3 added lines, 0 removed lines.
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
Changes for module/ExportRh/src/Controller/ExportRhController.php: 1 added line, 1 removed line.
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());
+6 −6
Changes for module/ExportRh/view/export-rh/export-rh/siham/dataREN.phtml: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -80,13 +80,13 @@

            <tr>
                <td>
                    <input type="checkbox" checked="" disabled="disabled" title="Cette donnée n'est pas synchronisable, pensez à la mettre à jour manuellement dans SIHAM">
                    <input name="generiqueFieldset[iban]" type="checkbox" checked="checked">
                    <label>IBAN:</label>
                </td>
                <td>
                    <?= $intervenantDossier->getIBAN() ?>
                    <?php if ($intervenantRh->getIBAN() != $intervenantDossier->getIBAN()): ?>
                        <i class="fas fa-triangle-exclamation" style="color:#a40000;"></i>
                        <!--<i class="fas fa-triangle-exclamation" style="color:#a40000;"></i>-->
                    <?php endif; ?>
                </td>
                <td class="active">
@@ -95,14 +95,14 @@
            </tr>
            <tr>
                <td>
                    <input type="checkbox" checked="" disabled="disabled" title="Cette donnée n'est pas synchronisable, pensez à la mettre à jour manuellement dans SIHAM">
                    <input name="generiqueFieldset[bic]" type="checkbox" checked="checked">
                    <label>BIC:</label>

                </td>
                <td>
                    <?= $intervenantDossier->getBIC() ?>
                    <?php if ($intervenantRh->getBIC() != $intervenantDossier->getBIC()): ?>
                        <i class="fas fa-triangle-exclamation" style="color:#a40000;"></i>
                        <!-- <i class="fas fa-triangle-exclamation" style="color:#a40000;"></i>-->
                    <?php endif; ?>
                </td>
                <td class="active">
@@ -113,9 +113,9 @@
        </table>
        <p>
            <?php if ($intervenantRh->getBIC() != $intervenantDossier->getBIC() || $intervenantRh->getIBAN() != $intervenantDossier->getIBAN()): ?>
                <i class="fas fa-triangle-exclamation" style="color:#a40000;"></i> <i
                <!--        <i class="fas fa-triangle-exclamation" style="color:#a40000;"></i> <i
                                style="font-style: italic;color:#555753">&nbsp;Attention, le BIC et l'IBAN sont différents entre SIHAM et OSE, le renouvellement SIHAM
                    ne met pas à jour cette information, pensez à le faire manuellement dans SIHAM.</i>
                            ne met pas à jour cette information, pensez à le faire manuellement dans SIHAM.</i>-->
            <?php endif; ?>
        </p>

Loading