This commit is contained in:
2026-04-29 10:01:26 +00:00
parent 9e29c32536
commit 5fceb9110f
5 changed files with 44 additions and 7 deletions

View File

@@ -15,7 +15,9 @@
<th width="18%"><?= _("Primes Acquises") ?></th>
<th width="18%"><?= _("Consommations") ?></th>
<th width="18%"><?= _("S/P (Acquis)") ?></th>
<?php if($limiteConsommation > "0") : ?>
<th width="18%"><?= _("S/P Global") ?></th>
<?php endif; ?>
</tr>
</thead>
@@ -46,10 +48,11 @@
<div class="progress-bar <?= $progressColor ?>" role="progressbar" style="width: <?= min($ratio, 100) ?>%"></div>
</div>
</td>
<?php if($limiteConsommation > "0") : ?>
<td class="text-muted small">
<?= $this->nettoyer($sppolice['rapportspgeneral']) ?> %
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>

View File

@@ -15,7 +15,9 @@
<th><?= _("Primes Acquises") ?></th>
<th><?= _("Consommations") ?></th>
<th width="15%"><?= _("Ratio S/P (Acquis)") ?></th>
<?php if($limiteConsommation > "0") : ?>
<th width="12%"><?= _("S/P Global") ?></th>
<?php endif; ?>
</tr>
</thead>
@@ -50,10 +52,11 @@
</div>
</div>
</td>
<?php if($limiteConsommation > "0") : ?>
<td class="text-muted italic small">
<?= $this->nettoyer($sppolice['rapportspgeneral']) ?>%
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>

View File

@@ -39,12 +39,11 @@
</div>
<div class="row g-3">
<?php if($limiteConsommation > "0") : ?>
<div class="col-md-6">
<?php
$sp_acquis = (float)str_replace(',', '.', $sppolice['rapportsp']);
$color_acquis = $sp_acquis > 80 ? 'danger' : ($sp_acquis > 60 ? 'warning' : 'success');
$limiteConsommation = $sppolice['limiteConsommation'];
?>
<div class="card border-0 shadow-sm bg-<?= $color_acquis ?> text-dark">
<div class="card-body d-flex align-items-center">
@@ -72,6 +71,25 @@
</div>
</div>
</div>
<?php else : ?>
<div class="col-md-12">
<?php
$sp_acquis = (float)str_replace(',', '.', $sppolice['rapportsp']);
$color_acquis = $sp_acquis > 80 ? 'danger' : ($sp_acquis > 60 ? 'warning' : 'success');
?>
<div class="card border-0 shadow-sm bg-<?= $color_acquis ?> text-dark">
<div class="card-body d-flex align-items-center">
<div class="flex-grow-1">
<h6 class="small fw-bold text-uppercase opacity-75"><?= _("Rapport S/P (Acquises)") ?></h6>
<h2 class="fw-bold mb-0"><?= $this->nettoyer($sppolice['rapportsp']) ?> %</h2>
</div>
<div class="fs-1 opacity-25">
<i class="fas fa-chart-pie"></i>
</div>
</div>
</div>
</div>
<?php endif; ?>
</div>
</div>