Commit cc23fa23 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Affichage & prise en compte des congés payés dans l'état de paiement

parent 26531cb1
Loading
Loading
Loading
Loading
+13 −8
Changes for data/ddl/view/V_ETAT_PAIEMENT.sql: 13 added lines, 8 removed lines.
Original line number Diff line number Diff line
@@ -36,7 +36,8 @@ SELECT
  exercice_ac,
  exercice_ac_montant,
  taux_remu,
  taux_horaire
  taux_horaire,
  taux_conges_payes
FROM
  (
  SELECT
@@ -67,16 +68,17 @@ FROM
      domaine_fonctionnel_libelle,
      hetd,
      ROUND( CASE WHEN hetd > 0 THEN hetd / SUM( hetd ) OVER( PARTITION BY periode_id, intervenant_id, etat, structure_id) ELSE 0 END, 3 ) hetd_pourc,
      ROUND( hetd * taux_horaire, 2 ) hetd_montant,
      ROUND( fc_majorees * taux_horaire, 2 ) rem_fc_d714,
      ROUND( hetd * taux_horaire * taux_conges_payes, 2 ) hetd_montant,
      ROUND( fc_majorees * taux_horaire * taux_conges_payes, 2 ) rem_fc_d714,
      exercice_aa,
      ROUND( exercice_aa * taux_horaire, 2 ) exercice_aa_montant,
      ROUND( exercice_aa * taux_horaire * taux_conges_payes, 2 ) exercice_aa_montant,
      exercice_ac,
      ROUND( exercice_ac * taux_horaire, 2 ) exercice_ac_montant,
      ROUND( exercice_ac * taux_horaire * taux_conges_payes, 2 ) exercice_ac_montant,
      (CASE WHEN hetd > 0 THEN hetd / SUM( hetd ) OVER( PARTITION BY periode_id, intervenant_id, etat, structure_id) ELSE 0 END)
      - ROUND( CASE WHEN hetd > 0 THEN hetd / SUM( hetd ) OVER( PARTITION BY periode_id, intervenant_id, etat, structure_id) ELSE 0 END, 3 ) pourc_diff,
        taux_remu,
        taux_horaire
        taux_horaire,
        taux_conges_payes
    FROM (
      SELECT
        periode_id,
@@ -105,7 +107,8 @@ FROM
        SUM( exercice_aa ) exercice_aa,
        SUM( exercice_ac ) exercice_ac,
        taux_remu,
        taux_horaire
        taux_horaire,
        taux_conges_payes
      FROM
        (
        SELECT
@@ -139,7 +142,8 @@ FROM
          mis.heures_aa                                                       exercice_aa,
          mis.heures_ac                                                       exercice_ac,
          tr.libelle taux_remu,
          mis.taux_horaire
          mis.taux_horaire,
          mis.taux_conges_payes
        FROM
                    tbl_paiement mis
               JOIN mise_en_paiement        mep ON mep.id = mis.mise_en_paiement_id AND mep.histo_destruction IS NULL
@@ -181,6 +185,7 @@ FROM
        domaine_fonctionnel_libelle,
        taux_remu,
        taux_horaire,
        taux_conges_payes,
        is_fc_majoree
      ) dep2
    ) dep3
+5 −0
Changes for module/Paiement/src/Service/MiseEnPaiementService.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -202,6 +202,7 @@ class MiseEnPaiementService extends AbstractEntityService

                'taux-remu'           => $d['TAUX_REMU'],
                'taux-horaire'        => (float)$d['TAUX_HORAIRE'],
                'taux-conges-payes'   => (float)$d['TAUX_CONGES_PAYES'],

                'hetd'                => (float)$d['HETD'],
                'hetd-pourc'          => (float)$d['HETD_POURC'],
@@ -212,6 +213,10 @@ class MiseEnPaiementService extends AbstractEntityService
                'exercice-ac'         => (float)$d['EXERCICE_AC'],
                'exercice-ac-montant' => (float)$d['EXERCICE_AC_MONTANT'],
            ];
            if ($ds['taux-conges-payes'] != 1){
                //on a des congés payés
                $data['total']['conges-payes'] = true;
            }

            $iid = $d['INTERVENANT_ID'];

+7 −2
Changes for module/Paiement/view/paiement/paiement/etat-paiement-tableau.phtml: 7 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
/* @var $hasFoot boolean */

$majFc = $etatPaiement['total']['rem-fc-d714'] > 0;
$hasCp = isset($etatPaiement['total']['conges-payes']) && $etatPaiement['total']['conges-payes'];

?>
<table class="table table-sm table-bordered etat-paiement">
@@ -14,6 +15,7 @@ $majFc = $etatPaiement['total']['rem-fc-d714'] > 0;
        <th rowspan="2">Domaine fonctionnel</th>
        <th colspan="2" rowspan="2">HETD</th>
        <th colspan="2">Taux</th>
        <?php if ($hasCp): ?><th rowspan="2" title="Taux de congés payés à prendre en compte, impactant la conversion des heures en euros">Congés payés *</th><?php endif; ?>
        <th rowspan="2">Montant</th>
        <?php if ($majFc): ?><th rowspan="2">Rém. FC D714.60</th><?php endif; ?>
        <th colspan="2">Exercice</th>
@@ -39,6 +41,7 @@ $majFc = $etatPaiement['total']['rem-fc-d714'] > 0;
        <td class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedPourcentage($ep['hetd-pourc']) : '' ?></td>
        <td><?= $ep['taux-remu'] ?></td>
        <td class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedNumber($ep['taux-horaire']) : '' ?>
        <?php if ($hasCp): ?><td class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedPourcentage($ep['taux-conges-payes']) : '' ?></td><?php endif; ?>
        <td class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedEuros($ep['hetd-montant']) : '' ?></td>
        <?php if ($majFc): ?><td class="nombre"><?= $hetdRem == 'hetd' ? '' : \UnicaenApp\Util::formattedEuros($ep['rem-fc-d714']) ?></td><?php endif; ?>
        <td class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedNumber($ep['exercice-aa']) : '' ?></td>
@@ -53,8 +56,9 @@ $majFc = $etatPaiement['total']['rem-fc-d714'] > 0;
        <th class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedPourcentage($lep['total']['hetd-pourc']) : '' ?></th>
        <th>&nbsp;</th>
        <th>&nbsp;</th>
        <?php if ($majFc): ?><th>&nbsp;</th><?php endif; ?>
        <th class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedEuros($lep['total']['hetd-montant']) : '' ?></th>
        <?php if ($majFc): ?><th class="nombre"><?= $hetdRem == 'hetd' ? '' : \UnicaenApp\Util::formattedEuros($lep['total']['rem-fc-d714']) ?></th><?php endif; ?>
        <?php if ($hasCp): ?><th class="nombre"><?= $hetdRem == 'hetd' ? '' : \UnicaenApp\Util::formattedEuros($lep['total']['rem-fc-d714']) ?></th><?php endif; ?>
        <th class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedNumber($lep['total']['exercice-aa']) : \UnicaenApp\Util::formattedEuros($lep['total']['exercice-aa-montant']) ?></th>
        <th class="nombre"><?= $hetdRem == 'hetd' ? \UnicaenApp\Util::formattedNumber($lep['total']['exercice-ac']) : \UnicaenApp\Util::formattedEuros($lep['total']['exercice-ac-montant']) ?></th>
    </tr>
@@ -70,8 +74,9 @@ $majFc = $etatPaiement['total']['rem-fc-d714'] > 0;
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <?php if ($majFc): ?><th>&nbsp;</th><?php endif; ?>
        <td class="nombre"><?= \UnicaenApp\Util::formattedEuros($etatPaiement['total']['hetd-montant']) ?></td>
        <?php if ($majFc): ?><td class="nombre"><?= \UnicaenApp\Util::formattedEuros($etatPaiement['total']['rem-fc-d714']) ?></td><?php endif; ?>
        <?php if ($hasCp): ?><td class="nombre"><?= \UnicaenApp\Util::formattedEuros($etatPaiement['total']['rem-fc-d714']) ?></td><?php endif; ?>
        <td class="nombre"><?= \UnicaenApp\Util::formattedEuros($etatPaiement['total']['exercice-aa-montant']) ?></td>
        <td class="nombre"><?= \UnicaenApp\Util::formattedEuros($etatPaiement['total']['exercice-ac-montant']) ?></td>
    </tr>