app ajout ficheAvalider
This commit is contained in:
parent
8aafdf565b
commit
af3771e786
@ -38,5 +38,18 @@ class Class_gestionFiche
|
|||||||
return substr($date, 0, 4) . '-' . substr($date, 4);
|
return substr($date, 0, 4) . '-' . substr($date, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function get_ficheAvalider() : array
|
||||||
|
{
|
||||||
|
$req = 'SELECT "rMois", "rVisiteur", "rEtat", ROUND("rMontantValide", 2) as "rMontantValide", "eLibelle", "uNom", "uPrenom"
|
||||||
|
from remboursement
|
||||||
|
INNER JOIN utilisateur ON utilisateur."uId"=remboursement."rVisiteur"
|
||||||
|
INNER JOIN etat ON etat."eId"=remboursement."rEtat"
|
||||||
|
where "rEtat"=\'CL\'
|
||||||
|
ORDER BY "rMois" ASC';
|
||||||
|
$result = $this->pdo->prepare($req);
|
||||||
|
$result ->execute();
|
||||||
|
|
||||||
|
return $result->fetchAll();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -16,7 +16,7 @@ if ($_SESSION["typeU"] == "comptable") {
|
|||||||
$userId = $_SESSION['uId'];
|
$userId = $_SESSION['uId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$lesFiches = $gestionFiche->get_ListesFiches($userId);
|
$lesFiches = $gestionFiche->get_ficheAvalider();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,38 +1,9 @@
|
|||||||
<center>
|
|
||||||
<div class="col-3 mb-4">
|
|
||||||
<br>
|
|
||||||
<?php
|
|
||||||
if ($_SESSION['typeU'] != 'comptable') {
|
|
||||||
echo '<h3>Valider les fiches de frais</h3>';
|
|
||||||
}?>
|
|
||||||
<form action="index.php?direction=ficheAvalider" method="POST">
|
|
||||||
<?php
|
|
||||||
echo '<select class="form-select" name="selVisiteur" id="">';
|
|
||||||
foreach ($LesUtilisateurs as $key => $value) {
|
|
||||||
$id = $value['uId'];
|
|
||||||
$prenom = $value['uPrenom'];
|
|
||||||
$nom = $value['uNom'];
|
|
||||||
|
|
||||||
if ($id == $userId) {
|
|
||||||
echo '<option value="' . $id . '" selected>' . $nom . " " . $prenom . "</option>";
|
|
||||||
} else {
|
|
||||||
echo '<option value="' . $id . '">' . $nom . " " . $prenom . "</option>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo '</select>';
|
|
||||||
?>
|
|
||||||
<button type="submit" class="btn btn-dark m-2" >Selectionner</button>
|
|
||||||
<!-- Fin du formulaire -->
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</center>
|
|
||||||
|
|
||||||
<div class="col-11 d-flex mx-auto">
|
<div class="col-11 d-flex mx-auto">
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Mois</th>
|
<th scope="col">Mois</th>
|
||||||
|
<th scope="col">Nom Fiche</th>
|
||||||
<th scope="col">Total</th>
|
<th scope="col">Total</th>
|
||||||
<th scope="col">Statut</th>
|
<th scope="col">Statut</th>
|
||||||
<th scope="col">Détails</th>
|
<th scope="col">Détails</th>
|
||||||
@ -44,6 +15,10 @@
|
|||||||
<th scope="row">
|
<th scope="row">
|
||||||
<?= $gestionFiche->dateComplete($uneFiche['rMois']) ?>
|
<?= $gestionFiche->dateComplete($uneFiche['rMois']) ?>
|
||||||
</th>
|
</th>
|
||||||
|
<td>
|
||||||
|
<?= $uneFiche['uNom'] ?>
|
||||||
|
<?= $uneFiche['uPrenom'] ?>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<?= $uneFiche['rMontantValide'] ?> €
|
<?= $uneFiche['rMontantValide'] ?> €
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user