blob: cdec448a192fc9bfce721d45a134ed95720e52c8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<?php
// src/sections/1_customer.php
//
// -- SECTION 1: Fichier clients et propects --
function newCustomer(): array
{
// fenêtres
$TypeDeClient = new ZenityList(ZenitySetup::$type_client_text, ZenitySetup::$type_client_entrees);
//~ $NouveauClient = new ZenityForms(ZenitySetup::$nouveau_client_text, ZenitySetup::$nouveau_client_entrees);
$FinSection1 = new ZenityList(ZenitySetup::$fin_section_1_text, ZenitySetup::$fin_section_1_entrees);
// -- partie 1: client ou prospect? --
$Client = new Clients;
if(exec($TypeDeClient->get()) === 'Client')
{
$Client->setType('client');
}
//~ else //
//~ {
//~ $Client->setType('prospect');
//~ }
// -- partie 2: saisie des infos --
if(enterCustomer($Client))
{
// -- partie 3: on fait quoi maintenant --
$choix_niv2 = exec($FinSection1->get());
if($choix_niv2 === ZenitySetup::$fin_section_1_entrees[0])
{
return [2, $Client]; // section 2: newService()
}
elseif($choix_niv2 === ZenitySetup::$fin_section_1_entrees[1])
{
return [3, $Client]; // section 3: modifyData()
}
elseif($choix_niv2 === ZenitySetup::$fin_section_1_entrees[2])
{
return [1, null]; // relancer section 1: newCustomer()
}
else
{
return [0, null]; // menu principal
}
}
return [0, null]; // menu principal
}
|