Commit 5392f4ec authored by Antony Le Courtes's avatar Antony Le Courtes
Browse files

Correction bug sur edition dotation (#33703)

parent ea3a4fc8
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ return [
                        'type'          => 'Segment',
                        'may_terminate' => true,
                        'options'       => [
                            'route'       => '/saisie-dotation/:annee/:structure/:typeRessource[/:dotation1/:dotation2]',
                            'route'       => '/saisie-dotation/:annee/:structure/:typeRessource/[:dotation1]/[:dotation2]',
                            'defaults'    => [
                                'action' => 'saisie-dotation',
                            ],
@@ -81,8 +81,8 @@ return [
                                'annee'         => '[0-9]*',
                                'structure'     => '[0-9]*',
                                'typeRessource' => '[0-9]*',
                                'dotation1'     => '[0-9]*',
                                'dotation2'     => '[0-9]*',
                                //'dotation1'     => '[0-9]*',
                                //'dotation2'     => '[0-9]*',
                            ],
                        ],
                    ],
+19 −14
Original line number Diff line number Diff line
@@ -58,23 +58,28 @@ if ($structureElement) {
                </tr>
                <tr>
                    <th>Dotation</th>
                    <td class="hetd"><?= Util::formattedNumber($dotations['total']['heures']) ?><span class="label">HETD</span></td>
                    <td class="hetd"><?= Util::formattedNumber($dotations['total']['heures']) ?><span
                                class="label">HETD</span></td>
                    <?php foreach ($dotations['typesRessources'] as $dtr): ?>
                        <td class="hetd"><?= Util::formattedNumber($dtr['total']['heures']) ?><span class="label">HETD</span></td>
                        <td class="hetd"><?= Util::formattedNumber($dtr['total']['heures']) ?><span class="label">HETD</span>
                        </td>
                    <?php endforeach; ?>
                </tr>
                <tr>
                    <th>HETD positionnées</th>
                    <td class="hetd"><?= Util::formattedNumber($previsionnelValide) ?><span class="label">HETD</span></td>
                    <?php foreach ($dotations['typesRessources'] as $dtr): ?>
                        <td class="hetd"><?= Util::formattedNumber($liquidation[$dtr['entity']->getId()]['dmep']) ?><span class="label">HETD</span></td>
                        <td class="hetd"><?= Util::formattedNumber($liquidation[$dtr['entity']->getId()]['dmep']) ?><span
                                    class="label">HETD</span></td>
                    <?php endforeach; ?>
                </tr>
                <tr>
                    <th>Solde</th>
                    <td class="hetd"><?= Util::formattedNumber($dotations['total']['heures'] - $previsionnelValide) ?><span class="label">HETD</span></td>
                    <td class="hetd"><?= Util::formattedNumber($dotations['total']['heures'] - $previsionnelValide) ?><span
                                class="label">HETD</span></td>
                    <?php foreach ($dotations['typesRessources'] as $dtr): ?>
                        <td class="hetd"><?= Util::formattedNumber($liquidation[$dtr['entity']->getId()]['solde']) ?><span class="label">HETD</span></td>
                        <td class="hetd"><?= Util::formattedNumber($liquidation[$dtr['entity']->getId()]['solde']) ?><span
                                    class="label">HETD</span></td>
                    <?php endforeach; ?>
                </tr>
            </table>
@@ -114,8 +119,8 @@ if ($structureElement) {
            'structure'     => $view->structure->getId(),
            'typeRessource' => $typeRessource->getId(),
        ];
        if (isset($data['anneeCivile1']['s1Entity'])) $params1['dotation1'] = $data['anneeCivile1']['s1Entity']->getId();
        if (isset($data['anneeCivile1']['s2Entity'])) $params1['dotation2'] = $data['anneeCivile1']['s2Entity']->getId();
        $params1['dotation1'] = (isset($data['anneeCivile1']['s1Entity'])) ? $data['anneeCivile1']['s1Entity']->getId() : '';
        $params1['dotation2'] = (isset($data['anneeCivile1']['s2Entity'])) ? $data['anneeCivile1']['s2Entity']->getId() : '';
        $dotEditUrl1          = $view->url('budget/saisie-dotation', $params1, ['query' => ['libelle' => $libelle]]);


@@ -124,8 +129,8 @@ if ($structureElement) {
            'structure'     => $view->structure->getId(),
            'typeRessource' => $typeRessource->getId(),
        ];
        if (isset($data['anneeCivile2']['s1Entity'])) $params2['dotation1'] = $data['anneeCivile2']['s1Entity']->getId();
        if (isset($data['anneeCivile2']['s2Entity'])) $params2['dotation2'] = $data['anneeCivile2']['s2Entity']->getId();
        $params2['dotation1'] = (isset($data['anneeCivile2']['s1Entity'])) ? $data['anneeCivile2']['s1Entity']->getId() : '';
        $params2['dotation2'] = (isset($data['anneeCivile2']['s2Entity'])) ? $data['anneeCivile2']['s2Entity']->getId() : '';
        $dotEditUrl2          = $view->url('budget/saisie-dotation', $params2, ['query' => ['libelle' => $libelle]]);
    }