From 084264d336fa9156e1b26196d3936eb3cf2c9782 Mon Sep 17 00:00:00 2001 From: polo Date: Fri, 9 Oct 2026 17:45:25 +0200 Subject: =?UTF-8?q?Client::controlForm()=20filtre=20un=20client=20sans=20n?= =?UTF-8?q?om=20ou=20code=20client,=20=C3=A9crire=20"gratuit"=20pour=20un?= =?UTF-8?q?=20devis=20gratuit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/model/entities/Devis.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/model/entities/Devis.php') diff --git a/src/model/entities/Devis.php b/src/model/entities/Devis.php index 8518f8e..ce2a043 100644 --- a/src/model/entities/Devis.php +++ b/src/model/entities/Devis.php @@ -43,10 +43,8 @@ class Devis public static EntityManager $entityManager; - public function __construct(Prestation $presta = null) - { - if($presta != null) - { + public function __construct(?Prestation $presta = null){ + if($presta != null){ $this->setPresta($presta); } } @@ -63,7 +61,7 @@ class Devis } public function getAllWithWindowFields(): array - { + { //~ $taches = ["Tâches:" => $this->taches]; //~ $champs_communs = [ //~ "Total Main d'oeuvre:" => $this->total_main_d_oeuvre, @@ -86,7 +84,7 @@ class Devis "Total HT:" => $this->total_HT, "Delai de livraison:" => $this->delai_livraison, "Durée de validité:" => $this->validite_devis, - "Devis signé:" => $this->signature_devis]; + "Devis signé:" => $this->signature_devis]; } // setters @@ -165,7 +163,7 @@ class Devis $this->total_HT = (float) $value; return($this); } - public function setPrixDevis($value) + public function setPrixDevis(string $value): Devis { $value = str_replace(',', '.', $value); $this->prix_devis = (float) $value; @@ -219,8 +217,8 @@ class Devis } $data_array = explode('|', $answers); // array - $check = false; - if(count($data_array) === 9) // facture normale + //$check = false; + if(count($data_array) === 9) // facture normale, "=== 9" = merdique { $this->getPresta()->setModePaiement(''); // sécurité, doctrine plante si "null" $this->setAll($data_array); -- cgit v1.2.3