Ll contrat

Merge request reports

Loading
+32 −1
Changes for data/ddl.php: 32 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -28976,9 +28976,13 @@ END OSE_WORKFLOW;',
          intervenant_id                                            intervenant_id,
          structure_id                                              structure_id,
          nbvh                                                      objectif,
          edite                                                     realisation
          CASE p.valeur 
            WHEN \'\'date-retour\'\' THEN signe 
            ELSE edite 
          END                                                       realisation
        FROM
          tbl_contrat c
          JOIN parametre p on p.nom = \'\'contrat_regle_franchissement\'\'
        WHERE
          \' || p || \'
          AND peut_avoir_contrat = 1
@@ -34602,6 +34606,33 @@ FROM
  JOIN intervenant i ON i.id = c.intervenant_id
  JOIN tbl_workflow w ON w.intervenant_id = i.id AND w.structure_id = c.structure_id AND w.etape_code = \'CONTRAT\' AND w.atteignable = 1
  JOIN validation v ON v.id = c.validation_id AND v.histo_destruction IS NULL
  LEFT JOIN contrat_fichier cf ON cf.contrat_id = c.id
  LEFT JOIN fichier f ON f.id = cf.fichier_id AND f.histo_destruction IS NULL
WHERE
  c.histo_destruction IS NULL
  AND f.id IS NULL
) t',
    ),
    'V_INDICATEUR_370' => 
    array (
      'name' => 'V_INDICATEUR_370',
      'definition' => 'CREATE OR REPLACE FORCE VIEW V_INDICATEUR_370 AS
SELECT
  rownum id,
  t."INTERVENANT_ID",t."ANNEE_ID",t."STRUCTURE_ID",t."CONTRAT_ID"
FROM (
SELECT DISTINCT
  i.id intervenant_id,
  i.annee_id annee_id,
  c.structure_id structure_id,
  c.id contrat_id
FROM
  contrat                c
  JOIN intervenant i ON i.id = c.intervenant_id
  JOIN tbl_workflow w ON w.intervenant_id = i.id AND w.structure_id = c.structure_id AND w.etape_code = \'CONTRAT\' AND w.atteignable = 1
  JOIN validation v ON v.id = c.validation_id AND v.histo_destruction IS NULL
  JOIN contrat_fichier cf ON cf.contrat_id = c.id
  JOIN fichier f ON f.id = cf.fichier_id AND f.histo_destruction IS NULL
WHERE
  c.histo_destruction IS NULL
  AND c.date_retour_signe IS NULL
+16 −6
Changes for data/indicateurs.php: 16 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -244,8 +244,8 @@ return [
    340  => [
        'TYPE'              => 'Contrat / avenant',
        'ENABLED'           => true,
        'LIBELLE_PLURIEL'   => '%s vacataires ont saisi des heures d\'enseignements <i>prévisionnels</i> supplémentaires depuis l\'édition de leur contrat ou avenant',
        'LIBELLE_SINGULIER' => '%s vacataire a saisi des heures d\'enseignements prévisionnels supplémentaires depuis l\'édition de son contrat ou avenant',
        'LIBELLE_PLURIEL'   => '%s intervenants ont saisi des heures d\'enseignements <i>prévisionnels</i> supplémentaires depuis l\'édition de leur contrat ou avenant',
        'LIBELLE_SINGULIER' => '%s intervenant a saisi des heures d\'enseignements prévisionnels supplémentaires depuis l\'édition de son contrat ou avenant',
        'MESSAGE'           => null,
        'ROUTE'             => 'intervenant/validation/service/prevu',
        'TEM_DISTINCT'      => true,
@@ -254,8 +254,8 @@ return [
    350  => [
        'TYPE'              => 'Contrat / avenant',
        'ENABLED'           => true,
        'LIBELLE_PLURIEL'   => '%s contrats/avenants de vacataire ont été déposés',
        'LIBELLE_SINGULIER' => '%s contrat/avenant de vacataire a été déposé',
        'LIBELLE_PLURIEL'   => '%s contrats/avenants ont été déposés',
        'LIBELLE_SINGULIER' => '%s contrat/avenant a été déposé',
        'MESSAGE'           => null,
        'ROUTE'             => 'intervenant/contrat',
        'TEM_DISTINCT'      => false,
@@ -264,8 +264,18 @@ return [
    360  => [
        'TYPE'              => 'Contrat / avenant',
        'ENABLED'           => true,
        'LIBELLE_PLURIEL'   => '%s contrats de vacataires sont en attente de retour',
        'LIBELLE_SINGULIER' => '%s contrat de vacataire est en attente de retour',
        'LIBELLE_PLURIEL'   => '%s contrats sont en attente de retour',
        'LIBELLE_SINGULIER' => '%s contrat est en attente de retour',
        'MESSAGE'           => null,
        'ROUTE'             => 'intervenant/contrat',
        'TEM_DISTINCT'      => false,
        'TEM_NOT_STRUCTURE' => false,
    ],
    370  => [
        'TYPE'              => 'Contrat / avenant',
        'ENABLED'           => true,
        'LIBELLE_PLURIEL'   => '%s contrats n\'ont pas de date de retour',
        'LIBELLE_SINGULIER' => '%s contrat n\'a pas de date de retour',
        'MESSAGE'           => null,
        'ROUTE'             => 'intervenant/contrat',
        'TEM_DISTINCT'      => false,
+16
Changes for data/parametres.php: 16 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -107,4 +107,20 @@ return [
        "VALEUR"      => "Discipline du 2nd degré",
        "DESCRIPTION" => "Libellé de la liste 4 des correspondances de codes des disciplines",
    ],


    /* Contrat */
    "contrat_regle_franchissement"       => [
        "VALEUR"      => "validation",
        "DESCRIPTION" => "Règle de franchissement du contrat (comment considéré que l'étape \"Contrat\" est franchie dans le workflow)",
    ],
    "contrat_modele_mail"                => [
        "VALEUR"      => "Bonjour :intervenant

Veuillez trouver en pièce jointe votre contrat à jour.

Cordialement,
:utilisateur",
        "DESCRIPTION" => "Modèle de mail pour l'envoi du contrat",
    ],
];
 No newline at end of file
+9 −6
Changes for module/Application/src/Application/Assertion/ContratAssertion.php: 9 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -27,6 +27,8 @@ class ContratAssertion extends AbstractAssertion

    use WorkflowServiceAwareTrait;



    /**
     * @param ResourceInterface $entity
     * @param string            $privilege
@@ -136,7 +138,8 @@ class ContratAssertion extends AbstractAssertion
    {
        return $this->asserts([
            $this->getRole()->hasPrivilege(Privileges::CONTRAT_DEPOT_RETOUR_SIGNE),
            $this->assertDepotRetourSigne($contrat)
            empty($contrat->getDateRetourSigne()),
            $this->assertDepotRetourSigne($contrat),
        ]);
    }

@@ -153,7 +156,7 @@ class ContratAssertion extends AbstractAssertion
    {
        return $this->asserts([
            $this->assertRole($contrat),
            $this->assertWorkflow($contrat)
            $this->assertWorkflow($contrat),
        ]);
    }

@@ -163,7 +166,7 @@ class ContratAssertion extends AbstractAssertion
    {
        return $this->asserts([
            $this->assertRole($contrat),
            !$contrat->getValidation()
            !$contrat->getValidation(),
        ]);
    }

@@ -191,7 +194,7 @@ class ContratAssertion extends AbstractAssertion
    {
        return $this->asserts([
            $this->assertRole($contrat),
            !$contrat->getValidation()
            !$contrat->getValidation(),
        ]);
    }

@@ -212,7 +215,7 @@ class ContratAssertion extends AbstractAssertion
    {
        return $this->asserts([
            $this->assertRole($contrat),
            !$contrat->estUnProjet()
            !$contrat->estUnProjet(),
        ]);
    }

@@ -222,7 +225,7 @@ class ContratAssertion extends AbstractAssertion
    {
        return $this->asserts([
            $this->assertRole($contrat),
            !$contrat->estUnProjet()
            !$contrat->estUnProjet(),
        ]);
    }

+7 −4
Changes for module/Application/src/Application/Controller/ContratController.php: 7 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -343,12 +343,15 @@ class ContratController extends AbstractController
        }

        if (!empty($contrat->getIntervenant()->getEmail())) {
            $html    = $this->renderer->render('application/contrat/mail/contrat', [
                'contrat' => $contrat,
            ]);
            //Utilisation ici du parametre email
            $html  = $this->getServiceParametres()->get('contrat_modele_mail');
            //Personnalisation des variables
            $vIntervenant = $contrat->getIntervenant()->getCivilite()->getLibelleCourt() . " ". $contrat->getIntervenant()->getNomUsuel();
            $vUtilisateur = $this->getServiceContext()->getUtilisateur()->getDisplayName();
            $html = str_replace([':intervenant', ':utilisateur'], [$vIntervenant, $vUtilisateur], $html);
            $message = $this->getServiceModeleContrat()->prepareMail($contrat, $html);
            $mail = $this->mail()->send($message);
            $here="";

        }

        return $this->getResponse();
Loading
Loading