summaryrefslogtreecommitdiff
path: root/src/sections/2_service.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/sections/2_service.php')
-rw-r--r--src/sections/2_service.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sections/2_service.php b/src/sections/2_service.php
index 9269503..4dccdb9 100644
--- a/src/sections/2_service.php
+++ b/src/sections/2_service.php
@@ -46,17 +46,15 @@ function newService(?Client $Client = null): array
46 } 46 }
47 47
48 // calendrier - étape 1/3 48 // calendrier - étape 1/3
49 $Date = new Dates(exec($Calendrier->get())); // exec() renvoie soit une chaîne soit un false 49 $date_array = explode('/', exec($Calendrier->get())); // 17/10/2026
50 if($Date->getDate() == '') // on n'a pas cliqué sur "annuler" 50 if(count($date_array) === 1){
51 {
52 echo "debug: annulation à la saisie d'une date\n"; 51 echo "debug: annulation à la saisie d'une date\n";
53 return [0, null]; // menu principal 52 return [2, $Client];
54 } 53 }
55 54
56 $Presta = new Prestation($Client); 55 $Presta = new Prestation($Client);
57 //var_dump($Client);die; 56 //var_dump($Client);die;
58 //$Presta->setDate($Date->getTimestamp()); 57 $Presta->setDate($date_array[2] . '-' . $date_array[1] . '-' . $date_array[0]); // 2026-10-17
59 $Presta->setDate($Date); // envoi d'un objet, la BDD gardera le timestamp
60 58
61 // formulaire - étape 2/3 59 // formulaire - étape 2/3
62 switch($choix_niv2) 60 switch($choix_niv2)