summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2023-09-03 02:45:17 +0200
committerpolo <ordipolo@gmx.fr>2023-09-03 02:45:17 +0200
commit78439b6a178e238ab8fb73d25567a85df78d6681 (patch)
tree219181bc81bff750d9ec3a44c5ccb2a3028694e4 /src/model
parent45262760a7d575a9d612cc2056e66bf105e43df8 (diff)
downloadAppliGestionPHP-78439b6a178e238ab8fb73d25567a85df78d6681.zip
section 3 prestas non vendues
Diffstat (limited to 'src/model')
-rw-r--r--src/model/Model.php4
-rw-r--r--src/model/Prestations.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/model/Model.php b/src/model/Model.php
index 4c4a80c..07826af 100644
--- a/src/model/Model.php
+++ b/src/model/Model.php
@@ -183,7 +183,7 @@ abstract class Model extends DB
183 return($this->execQuery('SELECT * FROM ' . $this->table)->fetchAll()); // fonctionne aussi sans le point virgule dans le SQL!! 183 return($this->execQuery('SELECT * FROM ' . $this->table)->fetchAll()); // fonctionne aussi sans le point virgule dans le SQL!!
184 } 184 }
185 185
186 public function findById() // obtenir une entrée avec son ID 186 public function findById() // obtenir une entrée grace à son ID
187 { 187 {
188 return($this->execQuery('SELECT * FROM ' . $this->table . ' WHERE id = ' . $this->ID)->fetch()); 188 return($this->execQuery('SELECT * FROM ' . $this->table . ' WHERE id = ' . $this->ID)->fetch());
189 } 189 }
@@ -191,7 +191,7 @@ abstract class Model extends DB
191 { 191 {
192 if($this->table == 'prestations') 192 if($this->table == 'prestations')
193 { 193 {
194 // à l'occaz, rendre abstraite la classe Prestations 194 // à l'occaz, créer une classe NonVendue et rendre Prestations abstraite
195 echo 'erreur: ne pas appeler Model::getDetailsByIdPresta() si la table ciblée est "prestations".'; 195 echo 'erreur: ne pas appeler Model::getDetailsByIdPresta() si la table ciblée est "prestations".';
196 return 0; 196 return 0;
197 } 197 }
diff --git a/src/model/Prestations.php b/src/model/Prestations.php
index e9ba7a1..54ad4b7 100644
--- a/src/model/Prestations.php
+++ b/src/model/Prestations.php
@@ -59,7 +59,7 @@ class Prestations extends Model
59 "Numéro prestation:" => end($code_presta_tableau), // dernière case 59 "Numéro prestation:" => end($code_presta_tableau), // dernière case
60 "Date:" => $Date->getDate(), 60 "Date:" => $Date->getDate(),
61 //"Type de Presta:" => $this->type_presta, // choix impossible pour le moment 61 //"Type de Presta:" => $this->type_presta, // choix impossible pour le moment
62 "Mode de paiement:" => $this->mode_paiement, 62 "Mode de paiement:" => $this->mode_paiement, // non pertinent pour un devis
63 "Commentaires:" => $this->commentaires]; 63 "Commentaires:" => $this->commentaires];
64 } 64 }
65 public function set(string $entry, string $input) 65 public function set(string $entry, string $input)