Commit 14fbcdca authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Forcage du calcul du taux FI non éditable pour garantir somme à 100%

parent 57e9201e
Loading
Loading
Loading
Loading
Loading
+2 −3
Changes for front/Formule/Test/Test.vue: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -447,14 +447,14 @@
                <td>
                    <div v-show="!['', null, 'Référentiel'].includes(vh.typeInterventionCode)">
                        <u-input-float v-model="vh.tauxFa" is-pourc class="dinput" :data-variable="l"
                                       @change="majTauxFi" style="width:3em"/>
                                       @change="majTauxFi" @click="majTauxFi" style="width:3em"/>
                        <span class="pourc">%</span>
                    </div>
                </td>
                <td>
                    <div v-show="!['', null, 'Référentiel'].includes(vh.typeInterventionCode)">
                        <u-input-float v-model="vh.tauxFc" is-pourc class="dinput" :data-variable="l"
                                       @change="majTauxFi" style="width:3em"/>
                                       @change="majTauxFi" @click="majTauxFi" style="width:3em"/>
                        <span class="pourc">%</span>
                    </div>
                </td>
@@ -806,7 +806,6 @@ export default {
                content += (vh.structureCode ? vh.structureCode : '') + ";"
                    + (vh.nonPayable ? 'Oui' : 'Non') + ";"
                    + (vh.serviceStatutaire ? 'Oui' : 'Non') + ";"
                    + (vh.nonPayable ? 'Oui' : 'Non') + ";"
                    + (vh.referentiel ? 'Référentiel' : (vh.typeInterventionCode ? vh.typeInterventionCode : '')) + ";"
                    + (vh.tauxFi ? vh.tauxFi.toLocaleString('fr-FR') : '') + ";"
                    + (vh.tauxFa ? vh.tauxFa.toLocaleString('fr-FR') : '') + ";"
+0 −1
Changes for module/Formule/src/Controller/TestController.php: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@ use Application\Entity\Db\Annee;
use Application\Service\Traits\ContextServiceAwareTrait;
use Application\Service\Traits\ParametresServiceAwareTrait;
use Formule\Entity\Db\Formule;
use Formule\Entity\Db\FormuleTestIntervenant;
use Formule\Model\FormuleCalcul;
use Formule\Service\FormulatorServiceAwareTrait;
use Formule\Service\TestServiceAwareTrait;
+2 −0
Changes for module/Formule/src/Service/TestService.php: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -232,6 +232,8 @@ class TestService extends AbstractEntityService
            unset($vh['tauxServiceDu']);
            unset($vh['tauxServiceCompl']);

            $vh['tauxFi'] = round(1 - $vh['tauxFa'] - $vh['tauxFc'],2);

            $vhOk = ($vh['structureCode'] ?? null) !== null && ($vh['heures'] ?? null) !== null;

            if ($vhOk) {