Commit 0a32ccc4 authored by joriot221's avatar joriot221
Browse files

Param date retour signé sans contrat

Mise a zero de l'indicateur avenant quand avenant pas disponible
parent d94cdb12
Loading
Loading
Loading
Loading
+1 −0
Changes for data/ddl/view/V_INDICATEUR_430.sql: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@ SELECT
  w.structure_id
FROM
	intervenant i
	JOIN PARAMETRE p ON p.VALEUR = 'avenant'
	JOIN tbl_workflow w ON w.intervenant_id = i.id
	JOIN (
    SELECT DISTINCT
+7 −3
Changes for data/parametres.php: 7 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -225,13 +225,17 @@ Cordialement,

    /* Contrat */
    "avenant"                       => [
        "VALEUR"      => "active",
        "VALEUR"      => "AVENANT",
        "DESCRIPTION" => "Permettre la création d'avenants au contrat",
    ],

    /* Contrat */
    "contrat_projet" => [
        "VALEUR"      => "active",
        "VALEUR"      => "desactive",
        "DESCRIPTION" => "Permettre la création d'un contrat sans passé par le projet",
    ],

    "contrat_date" => [
        "VALEUR"      => "desactive",
        "DESCRIPTION" => "Permettre de saisir une date de retour signé pour un contrat sans ajouter de fichier",
    ],
];
 No newline at end of file
+5 −1
Changes for module/Application/src/Controller/ContratController.php: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ class ContratController extends AbstractController
        $contratProjetResult = $this->getServiceParametres()->get('contrat_projet');
        $contratProjet       = ($contratProjetResult == Parametre::CONTRAT_PROJET);


        return compact('title', 'intervenant', 'contrats', 'services', 'emailIntervenant', 'avenant', 'contratProjet');
    }

@@ -337,7 +338,10 @@ class ContratController extends AbstractController
            $canSaisieDateSigne = false;
        }

        return compact('form', 'done', 'title', 'canSaisieDateSigne');
        $contratDateResult = $this->getServiceParametres()->get('contrat_date');
        $contratDate       = ($contratDateResult == Parametre::CONTRAT_DATE);

        return compact('form', 'done', 'title', 'canSaisieDateSigne', 'contratDate');
    }


+1 −0
Changes for module/Application/src/Entity/Db/Parametre.php: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ class Parametre implements HistoriqueAwareInterface

    const AVENANT        = 'avenant';
    const CONTRAT_PROJET = 'contrat_projet';
    const CONTRAT_DATE   = 'contrat_date';

    use HistoriqueAwareTrait;

+20 −4
Changes for module/Application/src/Form/ParametresForm.php: 20 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -490,7 +490,7 @@ class ParametresForm extends AbstractForm

            ],
            'attributes' => [
                'rows' => 6,
                'rows' => 12,
            ],
        ]);

@@ -587,10 +587,26 @@ class ParametresForm extends AbstractForm
            'type'       => 'Select',
            'name'       => 'contrat_projet',
            'options'    => [
                'label' => 'Possibilité de créer un contrat sans passer par le projet',
                'label'         => 'Activé la fonctionnalité projet de contrat',
                'value_options' => [
                    PARAMETRE::CONTRAT_PROJET => 'Le contrat peut être crée sans passer par le projet',
                    'desactive'               => 'Fonctionnalité désactivée',
                    'desactive'               => 'Le contrat est crée directement',
                    PARAMETRE::CONTRAT_PROJET => 'Un projet de contrat doit être validé pour devenir un contrat',
                ],
            ],
            'attributes' => [
                'class'     => 'selectpicker',
                'data-size' => 20,
            ],
        ]);

        $this->add([
            'type'       => 'Select',
            'name'       => 'contrat_date',
            'options'    => [
                'label'         => 'Possibilité de saisir la date de retour signé sans ajouté le contrat',
                'value_options' => [
                    PARAMETRE::CONTRAT_DATE => 'La saisie est possible sans contrat',
                    'desactive'             => 'Le contrat est nécessaire pour pouvoir saisir',
                ],
            ],
            'attributes' => [
Loading