From 32843e50aa981f190bdb4fbc9adbeacc06fdf775 Mon Sep 17 00:00:00 2001 From: polo Date: Sat, 17 Oct 2026 23:47:31 +0200 Subject: =?UTF-8?q?retypage=20date=20prestations=20en=20string=203,=20clas?= =?UTF-8?q?se=20Dates=20supprim=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/sections/2_service.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/sections/2_service.php') 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 } // calendrier - étape 1/3 - $Date = new Dates(exec($Calendrier->get())); // exec() renvoie soit une chaîne soit un false - if($Date->getDate() == '') // on n'a pas cliqué sur "annuler" - { + $date_array = explode('/', exec($Calendrier->get())); // 17/10/2026 + if(count($date_array) === 1){ echo "debug: annulation à la saisie d'une date\n"; - return [0, null]; // menu principal + return [2, $Client]; } $Presta = new Prestation($Client); //var_dump($Client);die; - //$Presta->setDate($Date->getTimestamp()); - $Presta->setDate($Date); // envoi d'un objet, la BDD gardera le timestamp + $Presta->setDate($date_array[2] . '-' . $date_array[1] . '-' . $date_array[0]); // 2026-10-17 // formulaire - étape 2/3 switch($choix_niv2) -- cgit v1.2.3