derniers details

This commit is contained in:
Theo 2024-01-18 11:57:40 +01:00
parent db1c54c442
commit e4574d7ff4
4 changed files with 21 additions and 7 deletions

View File

@ -109,9 +109,10 @@ class Class_newFiche
/**
* RETOURNE LE STATUS DE LA FICHE
*/
public function getStatus(): string
public function getStatus(): array
{
$req = 'select etat."eId" from remboursement
$req = 'SELECT etat."eId" , etat."eLibelle"
from remboursement
INNER JOIN etat on etat."eId" = remboursement."rEtat"
WHERE "rVisiteur" = :idVisiteur AND "rMois" = :mois;';
@ -120,7 +121,7 @@ class Class_newFiche
$result->bindParam(':mois', $this->month);
$result->execute();
return $result->fetch()['eId'];
return $result->fetch();
}
/**

View File

@ -81,6 +81,14 @@ $totalFraisFiche = $newFiche->getMontantValide();
* ETAT DE LA FICHE
*/
$status = $newFiche->getStatus();
$disabled = ($status !== 'CR') ? 'disabled' : '';
if (
($status['eId'] == 'CL' && $typeUser == 'comptable')
|| ($status['eId'] == 'CR' && $typeUser == 'visiteur')
){
$disabled = '';
} else {
$disabled = 'disabled';
}
include(__DIR__ . '/../vues/v_newFiche.php');

View File

@ -64,12 +64,12 @@
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
<li class="w-100">
<a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span
class="d-none d-sm-inline">A valider</span>
class="d-none d-sm-inline">gestion des fiches</span>
</a>
</li>
<li>
<a href="index.php?direction=ficheAvalider" class="nav-link px-0"> <span
class="d-none d-sm-inline">fiches a vérifier</span>
class="d-none d-sm-inline">fiches à valider</span>
</a>
</li>
</ul>

View File

@ -8,6 +8,11 @@
ID:
<?= $userId . '-' . $date ?>
</p>
<p class="color-grey" id='idFiche'>
Status:
<?= $status['eLibelle'] ?>
</p>
</center>
<br>
<!--