Commit 845e7132 authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Merge remote-tracking branch 'origin/master'

parents 506a4507 8c221ee8
Loading
Loading
Loading
Loading
+35 −4
Original line number Diff line number Diff line
# Version stable

[OSE 22.0](#ose-22-12102023)
[OSE 22.0](#ose-221-30102023)

# OSE 22.1 (à venir)
# OSE 23 (à venir)

## Nouveautés

* Gestion arbosrescente des structures dans toute l'application (#3268)

## Améliorations

* Une colonne "Structure" a été ajoutée à l'export de l'offre de formation

## Notes de mise à jour

PHP 8.2 est maintenant requis



# OSE 22.1 (30/10/2023)

## Nouveautés

* Formule de calcul d'Avignon

## Améliorations

* Modification de la formule de calcul de Picardie
* Modification de la formule de calcul de Paris 8 (#48203)
* Ajout des tags dans l'export CSV de services (#51614)

## Corrections de bugs

* Erreur sur la page d'administration des pièces jointes par statut (#53289)
* En mode calendaire, si pas de période d'enseignement définie sur l'élément pédagogique alors le choix du semestre est libre pour la saisie d'heures (#53422)
* La visualisation des heures mises en paiement est de nouveau opérationnelle (#53386)
* Correction de l'indicateur 530 renvoie maintenant correctement vers les fiches des intervenants
  
## Corrections

* Erreur sur la page d'amdministration des pièces jointes par statut (#53289)

# OSE 22 (12/10/2023)

+14 −14
Original line number Diff line number Diff line
@@ -224,12 +224,12 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_PARIS8 AS



      -- AG=IF([.$H20]="Référentiel";0;IF(AND(MID([.$N20];1;4)="PRIO";MID([.$A20];1;5)<>"20595");[.$M20]*[.$AD20];0))
      -- AG=IF([.$H20]="Référentiel";0;IF(AND(MID([.$N20];1;4)="PRIO";MID([.$A20];1;5)<>"20595";MID([.$A20];1;5)<>"40");[.$M20]*[.$AD20];0))
      WHEN 'AG' THEN
        IF vh.volume_horaire_ref_id IS NOT NULL THEN
          RETURN 0;
        ELSE
          IF COALESCE(SUBSTR(vh.param_1, 1, 4),' ') = 'PRIO' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' THEN
          IF COALESCE(SUBSTR(vh.param_1, 1, 4),' ') = 'PRIO' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '40' THEN
            RETURN vh.heures * cell('AD',l);
          ELSE
            RETURN 0;
@@ -292,9 +292,9 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_PARIS8 AS



      -- AM=IF(AND([.$H20]="Référentiel";[.$A20]=[.$K$10];MID([.$A20];1;5)<>"20595");[.$M20]*[.$AD20];0)
      -- AM=IF(AND([.$H20]="Référentiel";[.$A20]=[.$K$10];MID([.$A20];1;5)<>"20595";MID([.$A20];1;5)<>"40");[.$M20]*[.$AD20];0)
      WHEN 'AM' THEN
        IF vh.volume_horaire_ref_id IS NOT NULL AND vh.structure_is_univ AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' THEN
        IF vh.volume_horaire_ref_id IS NOT NULL AND vh.structure_is_univ AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '40' THEN
          RETURN vh.heures * cell('AD',l);
        ELSE
          RETURN 0;
@@ -356,9 +356,9 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_PARIS8 AS



      -- AS=IF(AND([.$H20]<>"Référentiel";[.$A20]=i_structure_code;MID([.$N20];1;4)<>"PRIO";MID([.$A20];1;5)<>"20595");[.$M20]*[.$AD20];0)
      -- AS=IF(AND([.$H20]<>"Référentiel";[.$A20]=i_structure_code;MID([.$N20];1;4)<>"PRIO";MID([.$A20];1;5)<>"20595";MID([.$A20];1;5)<>"40");[.$M20]*[.$AD20];0)
      WHEN 'AS' THEN
        IF vh.volume_horaire_ref_id IS NULL AND vh.structure_is_affectation AND COALESCE(SUBSTR(vh.param_1, 1, 4),' ') <> 'PRIO' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' THEN
        IF vh.volume_horaire_ref_id IS NULL AND vh.structure_is_affectation AND COALESCE(SUBSTR(vh.param_1, 1, 4),' ') <> 'PRIO' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '40' THEN
          RETURN vh.heures * cell('AD',l);
        ELSE
          RETURN 0;
@@ -420,9 +420,9 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_PARIS8 AS



      -- AY=IF(AND(AND([.$H20]="Référentiel";[.$A20]=i_structure_code);( MID([.$A20];1;5))<>"20595");[.$M20]*[.$AD20];0)
      -- AY=IF(AND(AND([.$H20]="Référentiel";[.$A20]=i_structure_code);( MID([.$A20];1;5))<>"20595";( MID([.$A20];1;5))<>"40");[.$M20]*[.$AD20];0)
      WHEN 'AY' THEN
        IF (vh.volume_horaire_ref_id IS NOT NULL AND vh.structure_is_affectation) AND (COALESCE(SUBSTR(vh.structure_code, 1, 5),' ')) <> '20595' THEN
        IF (vh.volume_horaire_ref_id IS NOT NULL AND vh.structure_is_affectation) AND (COALESCE(SUBSTR(vh.structure_code, 1, 5),' ')) <> '20595' AND (COALESCE(SUBSTR(vh.structure_code, 1, 5),' ')) <> '40' THEN
          RETURN vh.heures * cell('AD',l);
        ELSE
          RETURN 0;
@@ -484,9 +484,9 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_PARIS8 AS



      -- BE=IF(AND([.$H20]<>"Référentiel";[.$A20]<>i_structure_code;MID([.$N20];1;4)<>"PRIO";MID([.$A20];1;5)<>"20595");[.$M20]*[.$AD20];0)
      -- BE=IF(AND([.$H20]<>"Référentiel";[.$A20]<>i_structure_code;MID([.$N20];1;4)<>"PRIO";MID([.$A20];1;5)<>"20595";MID([.$A20];1;5)<>"40");[.$M20]*[.$AD20];0)
      WHEN 'BE' THEN
        IF vh.volume_horaire_ref_id IS NULL AND NOT vh.structure_is_affectation AND COALESCE(SUBSTR(vh.param_1, 1, 4),' ') <> 'PRIO' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' THEN
        IF vh.volume_horaire_ref_id IS NULL AND NOT vh.structure_is_affectation AND COALESCE(SUBSTR(vh.param_1, 1, 4),' ') <> 'PRIO' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '40' THEN
          RETURN vh.heures * cell('AD',l);
        ELSE
          RETURN 0;
@@ -548,9 +548,9 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_PARIS8 AS



      -- BK=IF(AND([.$H20]="Référentiel";[.$A20]<>i_structure_code;[.$A20]<>[.$K$10];MID([.$A20];1;5)<>"20595");[.$M20]*[.$AD20];0)
      -- BK=IF(AND([.$H20]="Référentiel";[.$A20]<>i_structure_code;[.$A20]<>[.$K$10];MID([.$A20];1;5)<>"20595";MID([.$A20];1;5)<>"40");[.$M20]*[.$AD20];0)
      WHEN 'BK' THEN
        IF vh.volume_horaire_ref_id IS NOT NULL AND NOT vh.structure_is_affectation AND NOT vh.structure_is_univ AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' THEN
        IF vh.volume_horaire_ref_id IS NOT NULL AND NOT vh.structure_is_affectation AND NOT vh.structure_is_univ AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '20595' AND COALESCE(SUBSTR(vh.structure_code, 1, 5),' ') <> '40' THEN
          RETURN vh.heures * cell('AD',l);
        ELSE
          RETURN 0;
@@ -612,9 +612,9 @@ CREATE OR REPLACE PACKAGE BODY FORMULE_PARIS8 AS



      -- BQ=IF(MID([.$A20];1;25)="20595";[.$M20]*[.$AE20];0)
      -- BQ=IF(OR(MID([.$A20];1;25)="20595";MID([.$A20];1;25)="40");[.$M20]*[.$AE20];0)
      WHEN 'BQ' THEN
        IF COALESCE(SUBSTR(vh.structure_code, 1, 25),' ') = '20595' THEN
        IF COALESCE(SUBSTR(vh.structure_code, 1, 25),' ') = '20595' OR COALESCE(SUBSTR(vh.structure_code, 1, 25),' ') = '40' THEN
          RETURN vh.heures * cell('AE',l);
        ELSE
          RETURN 0;
+4 −1
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@

namespace OffreFormation\Controller;

use Application\Controller\AbstractController;
use Application\Service\Traits\AnneeServiceAwareTrait;
use Application\Service\Traits\ContextServiceAwareTrait;
use Application\Service\Traits\LocalContextServiceAwareTrait;
@@ -27,7 +28,7 @@ use UnicaenImport\Service\Traits\SchemaServiceAwareTrait;
 *
 *
 */
class OffreFormationController extends \Application\Controller\AbstractController
class OffreFormationController extends AbstractController
{
    use ContextServiceAwareTrait;
    use LocalContextServiceAwareTrait;
@@ -95,6 +96,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle

        $csvModel = new CsvModel();
        $csvModel->setHeader([
            'Structure',
            'Code formation',
            'Libellé formation',
            'Niveau',
@@ -146,6 +148,7 @@ class OffreFormationController extends \Application\Controller\AbstractControlle
            $effectifs  = $element->getEffectifs();
            $discipline = $element->getDiscipline();
            $csvModel->addLine([
                $etape->getStructure()->getLibelleCourt(),
                $etape->getCode(),
                $etape->getLibelle(),
                $etape->getNiveauToString(),
+2 −1
Original line number Diff line number Diff line
@@ -60,7 +60,8 @@ class OffreFormationService extends AbstractEntityService
                partial tf.{id},
                partial gtf.{id, libelleCourt, ordre, pertinenceNiveau},
                partial ep.{id,code,libelle,sourceCode,etape,periode,tauxFoad,fi,fc,fa,tauxFi,tauxFc,tauxFa},
                partial vme.{id,heures, groupes}
                partial vme.{id,heures, groupes},
                partial s.{id,libelleCourt}
            FROM
              OffreFormation\Entity\Db\Etape e
              JOIN e.structure s
+9 −13
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ $total = [
foreach ($paiements as $paiement) {
    $sap = $paiement->getServiceAPayer();


    if ($sap instanceof \Application\Entity\Db\FormuleResultatService) {
        $sapType = 'service';
        $sid = $sapType . '-' . $sap->getService()->getId();
@@ -33,10 +32,13 @@ foreach ($paiements as $paiement) {


    if (!isset($data[$sid])) {
        if ('service' == $sapType) {

            $d = [];
        $d = [
            'heures-a-payer'   => 0,
            'heures-demandees' => 0,
            'heures-payees'    => ['total' => 0],
        ];

        if ('service' == $sapType) {
            $service = $sap->getService();
            if ($service->getElementPedagogique()) {
                $d['structure'] = (string)$this->structure($service->getElementPedagogique()->getStructure())->renderLink();
@@ -52,8 +54,6 @@ foreach ($paiements as $paiement) {
                ];
            }
        } elseif ('referentiel' == $sapType) {
            $d = [];

            /* @var $sap \Application\Entity\Db\FormuleResultatServiceReferentiel */
            $serviceReferentiel = $sap->getServiceReferentiel();
            $d['structure'] = (string)$this->structure($serviceReferentiel->getStructure())->renderLink();
@@ -62,8 +62,6 @@ foreach ($paiements as $paiement) {
                ''         => $serviceReferentiel->getCommentaires(),
            ];
        } elseif ('mission' == $sapType) {
            $d = [];

            /* @var $mission \Mission\Entity\Db\Mission */
            $mission = $sap;
            $d['structure'] = (string)$this->structure($mission->getStructure())->renderLink();
@@ -72,15 +70,13 @@ foreach ($paiements as $paiement) {
                ''                => $mission->getLibelle(),
            ];
        }
        $d['heures-a-payer'] = $paiement->getHeuresAPayer();
        $total['heures-a-payer'] += $paiement->getHeuresAPayer();
        $d['heures-demandees'] = 0;
        $d['heures-payees'] = ['total' => 0];
        $data[$sid] = $d;
    }

    // addition des heures demandées
    $data[$sid]['heures-a-payer'] += $paiement->getHeuresAPayer();
    $data[$sid]['heures-demandees'] += $paiement->getHeuresDemandees();

    $total['heures-a-payer'] += $paiement->getHeuresAPayer();
    $total['heures-demandees'] += $paiement->getHeuresDemandees();

    // addition des heures payées