summaryrefslogtreecommitdiff
path: root/src/model
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2026-10-20 23:16:14 +0200
committerpolo <ordipolo@gmx.fr>2026-10-20 23:16:14 +0200
commitf11d84c6a1017ed51bf7be1cecc1bffcd9084e47 (patch)
tree4afcd7bb4097f56e60397b255a86b779ff7cc4bc /src/model
parent6972e5774cffeb4bfac96937fe72809796915450 (diff)
downloadAppliGestionPHP-f11d84c6a1017ed51bf7be1cecc1bffcd9084e47.tar.gz
AppliGestionPHP-f11d84c6a1017ed51bf7be1cecc1bffcd9084e47.tar.bz2
AppliGestionPHP-f11d84c6a1017ed51bf7be1cecc1bffcd9084e47.zip
mise en place de l'héritage 4, petit bug modif presta non vendue
Diffstat (limited to 'src/model')
-rw-r--r--src/model/entities/Devis.php2
-rw-r--r--src/model/entities/Facture.php2
-rw-r--r--src/model/entities/NonVendue.php13
-rw-r--r--src/model/entities/Prestation.php2
4 files changed, 16 insertions, 3 deletions
diff --git a/src/model/entities/Devis.php b/src/model/entities/Devis.php
index 3f051c2..5c575e4 100644
--- a/src/model/entities/Devis.php
+++ b/src/model/entities/Devis.php
@@ -52,7 +52,7 @@ class Devis extends Prestation
52 } 52 }
53 53
54 // setters 54 // setters
55 public function set(string $entry, string $input): void // trouve la bonne méthode 55 public function set(string $entry, string $input): void
56 { 56 {
57 $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide 57 $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide
58 switch($entry) 58 switch($entry)
diff --git a/src/model/entities/Facture.php b/src/model/entities/Facture.php
index abe37fb..8097fc7 100644
--- a/src/model/entities/Facture.php
+++ b/src/model/entities/Facture.php
@@ -71,7 +71,7 @@ class Facture extends Prestation
71 } 71 }
72 72
73 // setters 73 // setters
74 public function set(string $entry, string $input): void // trouve la bonne méthode 74 public function set(string $entry, string $input): void
75 { 75 {
76 $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide 76 $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide
77 switch($entry) 77 switch($entry)
diff --git a/src/model/entities/NonVendue.php b/src/model/entities/NonVendue.php
index 5a8879e..d875eb5 100644
--- a/src/model/entities/NonVendue.php
+++ b/src/model/entities/NonVendue.php
@@ -25,7 +25,18 @@ class NonVendue extends Prestation
25 return $this; 25 return $this;
26 } 26 }
27 27
28 //public function set(string $entry, string $input): void // pas nécessaire ici 28 public function set(string $entry, string $input): void
29 {
30 $input = $this->cleanSpecialChars($input); // possibilité que $input devienne une chaîne vide
31 switch($entry)
32 {
33 case "Tâches:":
34 $this->setTaches($input);
35 break;
36 default:
37 parent::set($entry, $input);
38 }
39 }
29 40
30 public function validateForm(array $data_array): bool 41 public function validateForm(array $data_array): bool
31 { 42 {
diff --git a/src/model/entities/Prestation.php b/src/model/entities/Prestation.php
index 6fef8b6..3cb486c 100644
--- a/src/model/entities/Prestation.php
+++ b/src/model/entities/Prestation.php
@@ -146,6 +146,8 @@ abstract class Prestation
146 case "Commentaires:": 146 case "Commentaires:":
147 $this->setCommentaires($input); 147 $this->setCommentaires($input);
148 break; 148 break;
149 default:
150 echo "erreur: entrée non reconnu dans Prestation::set\n";
149 } 151 }
150 } 152 }
151 153