liste des fraisForfaitaires

This commit is contained in:
pierre renaudot 2023-12-21 11:54:30 +01:00
parent 674514ed06
commit 5b5e5cc28e
5 changed files with 35 additions and 15 deletions

View File

@ -10,16 +10,20 @@ class Class_newFiche
$this->pdo = $pDO->getPdoGsb(); $this->pdo = $pDO->getPdoGsb();
} }
public function listFraisForfaitaires(): array public function listFraisForfaitaires(): array
{ {
$req = 'SELECT "fLibelle", "fMontant" FROM forfait'; $req = 'SELECT "fLibelle", round("fMontant", 2) AS "fMontant", "fId" FROM forfait';
$result = $this->pdo->prepare($req); $result = $this->pdo->prepare($req);
$result->execute(); $result->execute();
return $result->fetchAll(); return $result->fetchAll();
} }
public function listFraisHF():array
{
//
}
public function endInter(string $id) public function endInter(string $id)
{ {
$req = "UPDATE intervention $req = "UPDATE intervention

View File

@ -2,8 +2,6 @@
require_once(__DIR__ . '/../Class/class.newFiche.php'); require_once(__DIR__ . '/../Class/class.newFiche.php');
$newFiche = new Class_newFiche($pdo); $newFiche = new Class_newFiche($pdo);
$liste = $newFiche->listFraisForfaitaires(); $typesFraisForfaitaires = $newFiche->listFraisForfaitaires();
var_dump($liste);
include(__DIR__ . '/../vues/v_newFiche.php'); include(__DIR__ . '/../vues/v_newFiche.php');

View File

@ -21,11 +21,11 @@
</a> </a>
<ul class="collapse show nav flex-column ms-1" id="submenu1" data-bs-parent="#menu"> <ul class="collapse show nav flex-column ms-1" id="submenu1" data-bs-parent="#menu">
<li class="w-100"> <li class="w-100">
<a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span class="d-none d-sm-inline">Gérer ses fiches</span> <a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span class="d-none d-sm-inline">Gérer ses fiches</span>
</a> </a>
</li> </li>
<li> <li>
<a href="../index.php?direction=nouvelleFiche" class="nav-link px-0"> <span class="d-none d-sm-inline">Nouvelle Fiche</span> <a href="index.php?direction=nouvelleFiche" class="nav-link px-0"> <span class="d-none d-sm-inline">Nouvelle Fiche</span>
</a> </a>
</li> </li>
</ul> </ul>
@ -44,7 +44,7 @@
</a> </a>
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu"> <ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
<li class="w-100"> <li class="w-100">
<a href="../controleurs/c_gestionFiche.php" class="nav-link px-0"> <span class="d-none d-sm-inline">A valider</span> <a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span class="d-none d-sm-inline">A valider</span>
</a> </a>
</li> </li>
<li> <li>

View File

@ -53,7 +53,7 @@ if (!isset($_REQUEST['direction'])) {
break; break;
case 'gestionFiche': case 'gestionFiche':
include("controleurs/c_gestionFiche.php"); include(__DIR__ . "/controleurs/c_gestionFiche.php");
break; break;
case 'home': case 'home':

View File

@ -4,6 +4,9 @@
<p>Mois de Novembre 2023</p> <p>Mois de Novembre 2023</p>
</center> </center>
<br> <br>
<!--
Liste des frais forfaitaires
-->
<h3 class="fw-bold offset-1">Frais forfaitaires</h3> <h3 class="fw-bold offset-1">Frais forfaitaires</h3>
<div class="col-11 d-flex mx-auto my-3"> <div class="col-11 d-flex mx-auto my-3">
<table class="table table-striped-columns align-middle"> <table class="table table-striped-columns align-middle">
@ -16,17 +19,32 @@
</tr> </tr>
</thead> </thead>
<tbody class="table-group-divider border-secondary-subtle"> <tbody class="table-group-divider border-secondary-subtle">
<tr> <?php
<th scope="row">Hotel</th> foreach ($typesFraisForfaitaires as $key => $value):
<td><input type="text" class="form-control"></td> ?>
<td>20 </td> <tr>
<td>400</td> <th scope="row">
</tr> <?= $value['fLibelle'] ?>
</th>
<td><input type="text" name="fraisForfait-<?= $value['fId'] ?>" class="form-control"></td>
<td>
<?= $value['fMontant'] ?>
</td>
<td>0</td>
</tr>
<?php
endforeach;
?>
</tbody> </tbody>
</table> </table>
</div> </div>
<span class="border-3 border-bottom border-black col-10 mx-auto my-5 d-flex"></span> <span class="border-3 border-bottom border-black col-10 mx-auto my-5 d-flex"></span>
<!--
Listes des frais Hors Forfaits
-->
<h3 class="fw-bold offset-1">Hors forfait</h3> <h3 class="fw-bold offset-1">Hors forfait</h3>
<div class="col-11 d-flex mx-auto my-3"> <div class="col-11 d-flex mx-auto my-3">
<table class="table table-striped-columns align-middle"> <table class="table table-striped-columns align-middle">