a
This commit is contained in:
parent
5aaef9bc99
commit
7d9f889168
|
|
@ -379,7 +379,6 @@ class Beneficiaire extends Modele {
|
|||
|
||||
public function getBeneficiaireId($idBeneficiaire)
|
||||
{
|
||||
|
||||
$sql = 'call sp_get_beneficiaire_id(?);';
|
||||
$beneficiaire = $this->executerRequete($sql, array($idBeneficiaire));
|
||||
return $beneficiaire->fetch(PDO::FETCH_ASSOC);
|
||||
|
|
|
|||
|
|
@ -317,13 +317,23 @@
|
|||
|
||||
<div class="card-body text-center">
|
||||
<?php
|
||||
$plafondGlobalFamille = $this->nettoyer($police['plafond']);
|
||||
$consommationGlobaleFamille = $this->nettoyer($police['consommation']);
|
||||
$niveauGlobalConsoFamille = ($consommationGlobaleFamille*100)/$plafondGlobalFamille;
|
||||
$soldeConsommation = $this->nettoyer($police['soldeConsommation']);
|
||||
/*
|
||||
plafondOut
|
||||
consommationOut
|
||||
soldeConsommationOut
|
||||
consommation_individuOut
|
||||
plafondInp
|
||||
consommationInp
|
||||
soldeConsommationInp
|
||||
consommation_individuInp
|
||||
*/
|
||||
$plafondGlobalFamilleOut = $this->nettoyer($police['plafondOut']);
|
||||
$consommationGlobaleFamilleOut = $this->nettoyer($police['consommationOut']);
|
||||
$niveauGlobalConsoFamilleOut = ($consommationGlobaleFamilleOut*100)/$plafondGlobalFamilleOut;
|
||||
$soldeConsommationOut = $this->nettoyer($police['soldeConsommationOut']);
|
||||
|
||||
$consommationGlobaleBenef = $this->nettoyer($college['consommation_individu']);
|
||||
$niveauGlobalConsoBenef = ($consommationGlobaleBenef*100)/$plafondGlobalFamille;
|
||||
$consommationGlobaleBenefOut = $this->nettoyer($college['consommation_individuOut']);
|
||||
$niveauGlobalConsoBenefOut = ($consommationGlobaleBenefOut*100)/$plafondGlobalFamilleOut;
|
||||
|
||||
?>
|
||||
|
||||
|
|
@ -331,32 +341,32 @@
|
|||
<div class="col-4">
|
||||
<div class="rounded p-2 border border-primary">
|
||||
<small class="text-muted d-block"><?= _("Dépense") ?></small>
|
||||
<h4 class="text-primary mb-0"><?= format_N($consommationGlobaleFamille) ?></h4>
|
||||
<h4 class="text-primary mb-0"><?= format_N($consommationGlobaleFamilleOut) ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4">
|
||||
<div class="rounded p-2 border border-success">
|
||||
<small class="text-muted d-block"><?= _("Plafond") ?></small>
|
||||
<h4 class="text-success mb-0"><?= format_N($plafondGlobalFamille) ?></h4>
|
||||
<h4 class="text-success mb-0"><?= format_N($plafondGlobalFamilleOut) ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-4">
|
||||
<div class="rounded p-2 border border-danger">
|
||||
<small class="text-muted d-block"><?= _("Solde") ?></small>
|
||||
<h4 class="text-danger mb-0"><?= format_N($soldeConsommation) ?></h4>
|
||||
<h4 class="text-danger mb-0"><?= format_N($soldeConsommationOut) ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="progress mb-3" >
|
||||
<div class="progress-bar <?= $niveauGlobalConsoFamille >= 80 ? 'bg-danger' : ($niveauGlobalConsoFamille >= 50 ? 'bg-warning' : 'bg-success') ?>"
|
||||
style="width: <?= min($niveauGlobalConsoFamille, 100) ?>%">
|
||||
<?= number_format($niveauGlobalConsoFamille, 1) ?>%
|
||||
<div class="progress-bar <?= $niveauGlobalConsoFamilleOut >= 80 ? 'bg-danger' : ($niveauGlobalConsoFamilleOut >= 50 ? 'bg-warning' : 'bg-success') ?>"
|
||||
style="width: <?= min($niveauGlobalConsoFamilleOut, 100) ?>%">
|
||||
<?= number_format($niveauGlobalConsoFamilleOut, 1) ?>%
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($police['soldeConsommation']<="0") :?>
|
||||
<?php if($police['soldeConsommationOut']<="0") :?>
|
||||
<div class="alert alert-danger py-1 mb-0">
|
||||
<i class="fas fa-exclamation-triangle me-1"></i>
|
||||
<?= _("Plafond familial atteint!") ?>
|
||||
|
|
@ -389,14 +399,6 @@
|
|||
</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
<?php
|
||||
/*
|
||||
$plafondGlobalBeneficiaire = $this->nettoyer($college['plafond']);
|
||||
$consommationGlobaleBenef = $this->nettoyer($college['consommation_individu']);
|
||||
$niveauGlobalConsoBenef = ($consommationGlobaleBenef/$plafondGlobalBeneficiaire)*100;
|
||||
*/
|
||||
?>
|
||||
|
||||
<div class="row mb-2 mt-2">
|
||||
<div class="col-12">
|
||||
<div class="border rounded p-2 border-primary">
|
||||
|
|
@ -404,13 +406,12 @@
|
|||
<h4 class="text-primary mb-0"><?= format_N($consommationGlobaleBenef) ?></h4>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="progress mb-3">
|
||||
<div class="progress-bar <?= $niveauGlobalConsoBenef >= 80 ? 'bg-danger' : ($niveauGlobalConsoBenef >= 50 ? 'bg-warning' : 'bg-success') ?>"
|
||||
style="width: <?= min($niveauGlobalConsoBenef, 100) ?>%">
|
||||
<?= number_format($niveauGlobalConsoBenef, 1) ?>%
|
||||
<div class="progress-bar <?= $niveauGlobalConsoBenefOut >= 80 ? 'bg-danger' : ($niveauGlobalConsoBenefOut >= 50 ? 'bg-warning' : 'bg-success') ?>"
|
||||
style="width: <?= min($niveauGlobalConsoBenefOut, 100) ?>%">
|
||||
<?= number_format($niveauGlobalConsoBenefOut, 1) ?>%
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user