diff options
Diffstat (limited to 'src/sections/3-1_windows.php')
| -rw-r--r-- | src/sections/3-1_windows.php | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/src/sections/3-1_windows.php b/src/sections/3-1_windows.php new file mode 100644 index 0000000..7952f6d --- /dev/null +++ b/src/sections/3-1_windows.php | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | <?php | ||
| 2 | // src/sections/3-1_windows.php | ||
| 3 | // | ||
| 4 | // fonctions pour 3_modify_data.php | ||
| 5 | |||
| 6 | function makeModifyCustomerWindow(Clients $Customer): ZenityList | ||
| 7 | { | ||
| 8 | $ModifyCustomer = new ZenityList(ZenitySetup::$modification_client['text'], []); | ||
| 9 | $entries = []; | ||
| 10 | $i = 0; | ||
| 11 | $client_data = $Customer->getAllWithWindowFields(); | ||
| 12 | //var_dump($client_data); | ||
| 13 | foreach($client_data as $key => $value) | ||
| 14 | { | ||
| 15 | $entries[$i][] = $key; | ||
| 16 | $entries[$i][] = $value; | ||
| 17 | $i++; | ||
| 18 | } | ||
| 19 | $entries[$i][] = ZenitySetup::$modification_client['service']; | ||
| 20 | $entries[$i][] = ''; | ||
| 21 | //~ $i++; | ||
| 22 | //~ $entries[$i][] = ZenitySetup::$modification_client['return']; | ||
| 23 | //~ $entries[$i][] = ''; | ||
| 24 | $ModifyCustomer->setListRows($entries, 2, 2.5); | ||
| 25 | |||
| 26 | return $ModifyCustomer; | ||
| 27 | } | ||
| 28 | |||
| 29 | function makeModifyServiceWindow(Prestations $Service, $ServiceDetails = null): ZenityList | ||
| 30 | { | ||
| 31 | $ModifyService = new ZenityList(ZenitySetup::$modification_presta['text'], []); | ||
| 32 | $entrees = []; | ||
| 33 | $i = 0; | ||
| 34 | |||
| 35 | $presta_data = $Service->getAllWithWindowFields(); | ||
| 36 | //var_dump($presta_data); | ||
| 37 | foreach($presta_data as $key => $value) | ||
| 38 | { | ||
| 39 | $entrees[$i][] = $key; | ||
| 40 | $entrees[$i][] = $value; | ||
| 41 | $i++; | ||
| 42 | } | ||
| 43 | |||
| 44 | if(is_object($ServiceDetails)) | ||
| 45 | { | ||
| 46 | $presta_data = $ServiceDetails->getAllWithWindowFields(); | ||
| 47 | //var_dump($presta_data); | ||
| 48 | foreach($presta_data as $key => $value) | ||
| 49 | { | ||
| 50 | $entrees[$i][] = $key; | ||
| 51 | $entrees[$i][] = $value; | ||
| 52 | $i++; | ||
| 53 | } | ||
| 54 | } | ||
| 55 | |||
| 56 | if($Service->getTypePresta() === 'devis') | ||
| 57 | { | ||
| 58 | $entrees[$i][] = ZenitySetup::$modification_presta['devis_facture']; // option changer le devis en facture | ||
| 59 | $entrees[$i][] = ''; | ||
| 60 | //~ $i++; | ||
| 61 | } | ||
| 62 | //~ $entrees[$i][] = ZenitySetup::$modification_presta['service']; | ||
| 63 | //~ $entrees[$i][] = ''; | ||
| 64 | //~ $i++; | ||
| 65 | //~ $entrees[$i][] = ZenitySetup::$modification_presta['return']; | ||
| 66 | //~ $entrees[$i][] = ''; | ||
| 67 | $ModifyService->setListRows($entrees, 2, 2.5); | ||
| 68 | |||
| 69 | return $ModifyService; | ||
| 70 | } | ||
