|
|
@@ -31,7 +31,7 @@ echo core::filAriane(array(
|
|
|
));
|
|
|
?>
|
|
|
<div>
|
|
|
- <table id="ProWebSalary" class="table-striped table-hover table-sm" data-page-size="25" data-toggle="table" data-buttons-align="left" data-pagination="true" data-filter-control="true" data-flat="true" data-show-columns-toggle-all="true" data-url="<?php echo $jsonTarget ?>">
|
|
|
+ <table id="ProWebSalary" class="table-striped table-hover table-sm" data-page-size="25" data-show-footer="true" data-toggle="table" data-buttons-align="left" data-pagination="true" data-filter-control="true" data-flat="true" data-show-columns-toggle-all="true" data-url="<?php echo $jsonTarget ?>">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<th data-sortable="true" data-field="exe_ref" data-filter-control="select">Année</th>
|
|
|
@@ -39,15 +39,81 @@ echo core::filAriane(array(
|
|
|
<th data-sortable="true" data-field="prest_lib2" data-filter-control="select">Complément</th>
|
|
|
<th data-sortable="true" data-field="catprest_lib" data-filter-control="select">Catégorie</th>
|
|
|
<th data-sortable="true" data-field="comm_ref" data-filter-control="select">Commission</th>
|
|
|
- <th data-sortable="true" data-field="prest_closed" data-filter-control="select">Clôturé</th>
|
|
|
+ <th data-sortable="true" data-field="prest_closed" data-filter-control="select" data-formatter="clotureFormatter">Clôturé</th>
|
|
|
<th data-sortable="true" data-field="etdoss_lib" data-filter-control="select">Etat</th>
|
|
|
- <th data-sortable="true" data-field="doss_nb_inscrit" data-filter-control="select">Nb. Inscrits</th>
|
|
|
- <th data-sortable="true" data-field="od_meyclub_subv" data-filter-control="select">Subventionné</th>
|
|
|
- <th data-sortable="true" data-field="doss_partce" data-filter-control="input">Part CSE</th>
|
|
|
- <th data-sortable="true" data-field="doss_partod" data-filter-control="input">Part Salarié</th>
|
|
|
- <th data-sortable="true" data-field="doss_montant_total" data-filter-control="input">Total</th>
|
|
|
+ <th data-sortable="true" data-field="doss_nb_inscrit" data-filter-control="select" data-footer-formatter="totalInscrits">Nb. Inscrits</th>
|
|
|
+ <th data-sortable="true" data-formatter="dataFormatter" data-field="doss_partce" data-filter-control="input" data-footer-formatter="prixCSE">Part CSE</th>
|
|
|
+ <th data-sortable="true" data-formatter="dataFormatter" data-field="doss_partod" data-filter-control="input" data-footer-formatter="prixSalarie">Part Salarié</th>
|
|
|
+ <th data-sortable="true" data-formatter="dataFormatter" data-field="doss_montant_total" data-filter-control="input" data-footer-formatter="prixTotal">Total</th>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
</table>
|
|
|
</div>
|
|
|
|
|
|
+<script>
|
|
|
+ let euro = Intl.NumberFormat('de-DE', {
|
|
|
+ style: 'currency',
|
|
|
+ currency: 'EUR',
|
|
|
+ });
|
|
|
+
|
|
|
+ function dataFormatter(value) {
|
|
|
+ return euro.format(value);
|
|
|
+ }
|
|
|
+
|
|
|
+ function totalInscrits(data) {
|
|
|
+ var total = 0;
|
|
|
+ data.forEach(function(row) {
|
|
|
+ var nb = parseFloat(row.doss_nb_inscrit);
|
|
|
+ if (!isNaN(nb)) {
|
|
|
+ total += nb;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return total;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function prixCSE(data) {
|
|
|
+ var total = 0;
|
|
|
+ data.forEach(function(row) {
|
|
|
+ total += parseFloat(row.doss_partce);
|
|
|
+ });
|
|
|
+ return parseFloat(total) === 0 ? euro.format(0.00) : euro.format(total.toFixed(2));
|
|
|
+ }
|
|
|
+
|
|
|
+ function prixSalarie(data) {
|
|
|
+ var total = 0;
|
|
|
+ data.forEach(function(row) {
|
|
|
+ total += parseFloat(row.doss_partod);
|
|
|
+ });
|
|
|
+ return parseFloat(total) === 0 ? euro.format(0.00) : euro.format(total.toFixed(2));
|
|
|
+ }
|
|
|
+
|
|
|
+ function prixTotal(data) {
|
|
|
+ var total = 0;
|
|
|
+ data.forEach(function(row) {
|
|
|
+ total += parseFloat(row.doss_montant_total);
|
|
|
+ });
|
|
|
+ return parseFloat(total) === 0 ? euro.format(0.00) : euro.format(total.toFixed(2));
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ function clotureFormatter(value) {
|
|
|
+ return value == 1 ? "Clôturé" : "Ouvert";
|
|
|
+ }
|
|
|
+
|
|
|
+ function subventionFormatter(value) {
|
|
|
+ switch (value) {
|
|
|
+ case "O":
|
|
|
+ return "Subventionné"
|
|
|
+ break;
|
|
|
+ case "N":
|
|
|
+ return "Non-subventionné"
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return "-"
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+</script>
|