From 5b5e5cc28eac67106bc99a1f0ff457640686ef1c Mon Sep 17 00:00:00 2001 From: pierre renaudot Date: Thu, 21 Dec 2023 11:54:30 +0100 Subject: [PATCH] liste des fraisForfaitaires --- Class/class.newFiche.php | 8 ++++++-- controleurs/c_nouvelleFiche.php | 4 +--- include/menu.php | 6 +++--- index.php | 2 +- vues/v_newFiche.php | 30 ++++++++++++++++++++++++------ 5 files changed, 35 insertions(+), 15 deletions(-) diff --git a/Class/class.newFiche.php b/Class/class.newFiche.php index f147f78..4f407f7 100644 --- a/Class/class.newFiche.php +++ b/Class/class.newFiche.php @@ -10,16 +10,20 @@ class Class_newFiche $this->pdo = $pDO->getPdoGsb(); } - 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->execute(); return $result->fetchAll(); } + public function listFraisHF():array + { + // + } + public function endInter(string $id) { $req = "UPDATE intervention diff --git a/controleurs/c_nouvelleFiche.php b/controleurs/c_nouvelleFiche.php index 1cac838..d374d15 100644 --- a/controleurs/c_nouvelleFiche.php +++ b/controleurs/c_nouvelleFiche.php @@ -2,8 +2,6 @@ require_once(__DIR__ . '/../Class/class.newFiche.php'); $newFiche = new Class_newFiche($pdo); -$liste = $newFiche->listFraisForfaitaires(); - -var_dump($liste); +$typesFraisForfaitaires = $newFiche->listFraisForfaitaires(); include(__DIR__ . '/../vues/v_newFiche.php'); diff --git a/include/menu.php b/include/menu.php index c63cfec..7e38787 100644 --- a/include/menu.php +++ b/include/menu.php @@ -21,11 +21,11 @@ @@ -44,7 +44,7 @@