blob: 76d01dd03de718fa46f123b12bc5882144da0906 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
<?php
// src/sections/3-1_windows.php
//
// fonctions pour src/sections/3_modify_data.php
function makeModifyCustomerWindow(Client $Customer): ZenityList
{
// fenêtre
$ModifyCustomer = new ZenityList(ZenitySetup::$modification_client['text'], []);
$entries = [];
$i = 0;
$client_data = $Customer->getAllWithWindowFields();
//var_dump($client_data);
foreach($client_data as $key => $value)
{
$entries[$i][] = $key;
$entries[$i][] = $value;
$i++;
}
$entries[$i][] = ZenitySetup::$modification_client['service'];
$entries[$i][] = '';
//~ $entries[$i][] = ZenitySetup::$modification_client['return'];
//~ $entries[$i][] = '';
$ModifyCustomer->setListRows($entries, 2, 2.5);
return $ModifyCustomer;
}
function makeModifyServiceWindow(Prestation $Service, $ServiceDetails = null): ZenityList
{
// fenêtre
$ModifyService = new ZenityList(ZenitySetup::$modification_presta['text'], []);
$entrees = [];
$i = 0;
$presta_data = $Service->getAllWithWindowFields();
//var_dump($presta_data);
foreach($presta_data as $key => $value)
{
$entrees[$i][] = $key;
$entrees[$i][] = $value;
$i++;
}
if(is_object($ServiceDetails))
{
$presta_data = $ServiceDetails->getAllWithWindowFields();
//var_dump($presta_data);
foreach($presta_data as $key => $value)
{
$entrees[$i][] = $key;
$entrees[$i][] = $value;
$i++;
}
}
//~ if($Service->getTypePresta() === 'devis')
//~ {
//~ $entrees[$i][] = ZenitySetup::$modification_presta['devis_facture']; // option créer une facture à partir du devis
//~ $entrees[$i][] = '';
//~ }
//~ $entrees[$i][] = ZenitySetup::$modification_presta['service'];
//~ $entrees[$i][] = '';
//~ $i++;
//~ $entrees[$i][] = ZenitySetup::$modification_presta['return'];
//~ $entrees[$i][] = '';
$ModifyService->setListRows($entrees, 2, 2.5);
return $ModifyService;
}
|