summaryrefslogtreecommitdiff
path: root/src/sections/1_customer.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/sections/1_customer.php')
-rw-r--r--src/sections/1_customer.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/sections/1_customer.php b/src/sections/1_customer.php
index cdec448..ca20d08 100644
--- a/src/sections/1_customer.php
+++ b/src/sections/1_customer.php
@@ -12,29 +12,36 @@ function newCustomer(): array
12 12
13 // -- partie 1: client ou prospect? -- 13 // -- partie 1: client ou prospect? --
14 $Client = new Clients; 14 $Client = new Clients;
15 if(exec($TypeDeClient->get()) === 'Client') 15 $choix_niv2 = exec($TypeDeClient->get());
16 if($choix_niv2 === ZenitySetup::$type_client_entrees[0])
16 { 17 {
18 echo "choix: " . $choix_niv2 . "\n";
17 $Client->setType('client'); 19 $Client->setType('client');
18 } 20 }
19 //~ else // 21 elseif($choix_niv2 === ZenitySetup::$type_client_entrees[1])
20 //~ { 22 {
21 //~ $Client->setType('prospect'); 23 echo "choix: " . $choix_niv2 . "\n";
22 //~ } 24 $Client->setType('prospect');
25 }
26 else
27 {
28 return [0, null]; // menu principal
29 }
23 30
24 // -- partie 2: saisie des infos -- 31 // -- partie 2: saisie des infos --
25 if(enterCustomer($Client)) 32 if(enterCustomer($Client))
26 { 33 {
27 // -- partie 3: on fait quoi maintenant -- 34 // -- partie 3: on fait quoi maintenant --
28 $choix_niv2 = exec($FinSection1->get()); 35 $choix_niv3 = exec($FinSection1->get());
29 if($choix_niv2 === ZenitySetup::$fin_section_1_entrees[0]) 36 if($choix_niv3 === ZenitySetup::$fin_section_1_entrees[0])
30 { 37 {
31 return [2, $Client]; // section 2: newService() 38 return [2, $Client]; // section 2: newService()
32 } 39 }
33 elseif($choix_niv2 === ZenitySetup::$fin_section_1_entrees[1]) 40 elseif($choix_niv3 === ZenitySetup::$fin_section_1_entrees[1])
34 { 41 {
35 return [3, $Client]; // section 3: modifyData() 42 return [3, $Client]; // section 3: modifyData()
36 } 43 }
37 elseif($choix_niv2 === ZenitySetup::$fin_section_1_entrees[2]) 44 elseif($choix_niv3 === ZenitySetup::$fin_section_1_entrees[2])
38 { 45 {
39 return [1, null]; // relancer section 1: newCustomer() 46 return [1, null]; // relancer section 1: newCustomer()
40 } 47 }