ser
This commit is contained in:
parent
5f418dcad7
commit
940989f8e0
|
|
@ -1,48 +1,65 @@
|
||||||
<?php
|
<?php
|
||||||
$nbreTotal = count($tableauajustement);
|
$nbreTotal = count($tableauajustement);
|
||||||
|
$nbreAffiche = ($nbreTotal < 10) ? '0'.$nbreTotal : format_N($nbreTotal);
|
||||||
if($nbreTotal < 10){
|
$superUser = $_SESSION['superUser'];
|
||||||
$nbreTotal = '0'.$nbreTotal;
|
|
||||||
}else{
|
|
||||||
$nbreTotal = format_N($nbreTotal);
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<?php $superUser = $_SESSION['superUser']; ?>
|
<div class="d-flex justify-content-start mt-1 mb-2 animate__animated animate__fadeIn">
|
||||||
|
<div class="badge bg-light text-primary border px-3 py-2 shadow-sm" style="border-radius: var(--radius-md);">
|
||||||
|
<i class="fas fa-list-ul me-2"></i><?= _("Total") ?> : <span class="fw-bold badge-total-count"><?= $nbreAffiche ?> Lignes</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<table style="margin: auto" class="table-responsive">
|
|
||||||
<tbody>
|
|
||||||
<td><input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbreTotal" name="nbreTotal" value="<?= _("Lignes Total").": ". $nbreTotal; ?>" readonly> </td>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
<input type="hidden" id="total" value="<?= $nbreTotal; ?>">
|
<input type="hidden" id="total" value="<?= $nbreTotal; ?>">
|
||||||
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabliste compact">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="text-center"><?= _("Centre gestion") ?></th>
|
|
||||||
<th class="text-center"><?= _("S/P Minimum") ?></th>
|
|
||||||
<th class="text-center"><?= _("S/P Maximum") ?></th>
|
|
||||||
<th class="text-center"><?= _("Taux")." (%)" ?></th>
|
|
||||||
|
|
||||||
<th class="text-center"><?= _("Modifier") ?></th>
|
<div class="card border-0 shadow-sm animate__animated animate__fadeInUp">
|
||||||
|
<div class="card-body p-0">
|
||||||
|
<div class="table-responsive">
|
||||||
|
<table id="tableLister" class="table table-hover align-middle mb-0 datatable-inter compact" style="width:100%">
|
||||||
|
<thead class="table-light">
|
||||||
|
<tr class="text-uppercase small">
|
||||||
|
<th class="text-center py-3 ps-3"><?= _("Centre gestion") ?></th>
|
||||||
|
<th class="text-center"><?= _("S/P Minimum") ?></th>
|
||||||
|
<th class="text-center"><?= _("S/P Maximum") ?></th>
|
||||||
|
<th class="text-center"><?= _("Taux (%)") ?></th>
|
||||||
|
<th class="text-center no-export pe-3" width="120px"><?= _("Modifier") ?></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<?php foreach ($tableauajustement as $v):
|
||||||
|
$idData = $this->nettoyer($v['id']);
|
||||||
|
?>
|
||||||
|
<tr>
|
||||||
|
<td class="text-center fw-bold text-dark ps-3"><?= $this->nettoyer($v['codeSociete']); ?></td>
|
||||||
|
<td class="text-center"><?= number_format($this->nettoyer($v['spMin']), 2); ?></td>
|
||||||
|
<td class="text-center"><?= number_format($this->nettoyer($v['spMax']), 2); ?></td>
|
||||||
|
<td class="text-center">
|
||||||
|
<span class="badge bg-primary-ghost text-primary border border-primary-subtle px-3">
|
||||||
|
<?= number_format($this->nettoyer($v['tauxAjustement']), 2); ?> %
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td class="text-center pe-3">
|
||||||
|
<button type="button"
|
||||||
|
class="btn btn-outline-primary btn-sm rounded-pill px-3 shadow-sm fw-bold w-100"
|
||||||
|
onclick="formModifTableRef(<?= $idData; ?>);">
|
||||||
|
<i class="fas fa-edit me-1"></i> <?= _("Modifier") ?>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<?php endforeach; ?>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</tr>
|
<script>
|
||||||
</thead>
|
/**
|
||||||
<tbody>
|
* Initialisation ou réinitialisation DataTables lors du chargement AJAX
|
||||||
<?php foreach ($tableauajustement as $v):
|
* On utilise le tri par S/P Minimum (index 1)
|
||||||
$idData = $this->nettoyer($v['id']);
|
*/
|
||||||
?>
|
$(document).ready(function() {
|
||||||
<tr valign="top">
|
const titreExport = "<?= _('Grille des taux ajustement') ?>";
|
||||||
<td class="text-center" width="15%"><?= $this->nettoyer($v['codeSociete']);; ?>
|
initSmartTable('#tableLister', titreExport, [1, 'asc']);
|
||||||
<td class="text-center" width="20%"><?= $this->nettoyer($v['spMin']) ?></td>
|
});
|
||||||
<td class="text-center" width="20%"><?= $this->nettoyer($v['spMax']) ?></td>
|
</script>
|
||||||
<td class="text-center" width="20%"><?= $this->nettoyer($v['tauxAjustement']) ?></td>
|
|
||||||
<td class="text-center" width="10%">
|
|
||||||
<button style="width:100%" class ="form-control btn btn-primary" type="button" id="btn-editer" name="Modifier"
|
|
||||||
onclick="JAVASCRIPT:formModifTableRef(<?= $idData; ?>);" ><?= _("Modifier") ?></button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<?php endforeach; ?>
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
@ -58,7 +58,7 @@
|
||||||
<script>
|
<script>
|
||||||
// Comme cette vue est chargée en AJAX, on réinitialise DataTables ici
|
// Comme cette vue est chargée en AJAX, on réinitialise DataTables ici
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
const titreExport = "<?= _('Grille des taux ajustement') ?>";
|
const titreExport = "<?= _('Grille des taux ajustement Garant') ?>";
|
||||||
initSmartTable('#tableLister', titreExport, [1, 'asc']);
|
initSmartTable('#tableLister', titreExport, [1, 'asc']);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
@ -20,6 +20,6 @@
|
||||||
<div id="div_maj_table" class="mb-3"></div>
|
<div id="div_maj_table" class="mb-3"></div>
|
||||||
|
|
||||||
<div id="div_lister_table">
|
<div id="div_lister_table">
|
||||||
<?php require "Vue/Ajaxtblistertableauajustementgarant/index.php"; ?>
|
<?php require "Vue/Ajaxtblistertableauajustement/index.php"; ?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user