diff options
Diffstat (limited to 'src/sections/2_service.php')
| -rw-r--r-- | src/sections/2_service.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/sections/2_service.php b/src/sections/2_service.php index e25d677..9ebf303 100644 --- a/src/sections/2_service.php +++ b/src/sections/2_service.php | |||
| @@ -3,9 +3,7 @@ | |||
| 3 | // | 3 | // |
| 4 | // -- SECTION 2: Prestation et devis -- | 4 | // -- SECTION 2: Prestation et devis -- |
| 5 | 5 | ||
| 6 | use Doctrine\ORM\EntityManager; | 6 | function newService(?Client $Client = null): array |
| 7 | |||
| 8 | function newService($Client): array // $Client est un Client ou null | ||
| 9 | { | 7 | { |
| 10 | // fenêtres recherche d'un client | 8 | // fenêtres recherche d'un client |
| 11 | $RechercheClient = new zenityEntry(ZenitySetup::$recherche_client['text']); | 9 | $RechercheClient = new zenityEntry(ZenitySetup::$recherche_client['text']); |
| @@ -25,11 +23,11 @@ function newService($Client): array // $Client est un Client ou null | |||
| 25 | 23 | ||
| 26 | 24 | ||
| 27 | // -- partie 1: le client -- | 25 | // -- partie 1: le client -- |
| 28 | if($Client == null || get_class($Client) !== 'Client') | 26 | if(!$Client) |
| 29 | { | 27 | { |
| 30 | $Client = Client::getObject($RechercheClient, $ResultatsRechercheClient); // retourne un Client ou 0 | 28 | $Client = Client::find($RechercheClient, $ResultatsRechercheClient); // retourne un Client ou 0 |
| 31 | //$ResultatsRechercheClient->cleanCommand(); // inutile parce qu'on ne boucle pas dans cette fonction | 29 | //$ResultatsRechercheClient->cleanCommand(); // inutile parce qu'on ne boucle pas dans cette fonction |
| 32 | if($Client === 0) | 30 | if(!$Client) |
| 33 | { | 31 | { |
| 34 | echo "debug: annulation sélection client\n"; | 32 | echo "debug: annulation sélection client\n"; |
| 35 | return [0, null]; // menu principal | 33 | return [0, null]; // menu principal |
