@@ -28,7 +28,7 @@  | 
                                                    ||
| 28 | 28 | */  | 
                                                        
| 29 | 29 | public function setValue($value)  | 
                                                        
| 30 | 30 |      { | 
                                                        
| 31 | -        if($value instanceof \DateTime){ | 
                                                        |
| 31 | +        if ($value instanceof \DateTime) { | 
                                                        |
| 32 | 32 |              return parent::setValue($value->format('Y-m-d')); | 
                                                        
| 33 | 33 | }  | 
                                                        
| 34 | 34 | |
@@ -27,7 +27,7 @@ discard block  | 
                                                    ||
| 27 | 27 | * @param array $options  | 
                                                        
| 28 | 28 | * @param \User $user  | 
                                                        
| 29 | 29 | */  | 
                                                        
| 30 | - public function __construct(\ValidatorInterface $validator, $baseObject, \DoliDB $db, $options,\User $user)  | 
                                                        |
| 30 | + public function __construct(\ValidatorInterface $validator, $baseObject, \DoliDB $db, $options, \User $user)  | 
                                                        |
| 31 | 31 |      { | 
                                                        
| 32 | 32 | |
| 33 | 33 |          parent::__construct('flight_form', FormInterface::METHOD_POST, $this->buildOptionsfromConfiguration($options)); | 
                                                        
@@ -83,7 +83,7 @@ discard block  | 
                                                    ||
| 83 | 83 | $flight = $object;  | 
                                                        
| 84 | 84 | |
| 85 | 85 | // Quick fix - Fixme by a factory on this form.  | 
                                                        
| 86 | -        if($this->user->rights->flightlog->vol->advanced){ | 
                                                        |
| 86 | +        if ($this->user->rights->flightlog->vol->advanced) { | 
                                                        |
| 87 | 87 | return parent::bind($object);  | 
                                                        
| 88 | 88 | }  | 
                                                        
| 89 | 89 | |
@@ -116,7 +116,7 @@ discard block  | 
                                                    ||
| 116 | 116 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);  | 
                                                        
| 117 | 117 | |
| 118 | 118 | // Load object  | 
                                                        
| 119 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals  | 
                                                        |
| 119 | +include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals  | 
                                                        |
| 120 | 120 | include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';  | 
                                                        
| 121 | 121 | |
| 122 | 122 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array  | 
                                                        
@@ -145,7 +145,7 @@ discard block  | 
                                                    ||
| 145 | 145 | |
| 146 | 146 | $parameters = array();  | 
                                                        
| 147 | 147 |  $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, | 
                                                        
| 148 | - $action); // Note that $action and $object may have been modified by some hooks  | 
                                                        |
| 148 | + $action); // Note that $action and $object may have been modified by some hooks  | 
                                                        |
| 149 | 149 |  if ($reshook < 0) { | 
                                                        
| 150 | 150 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');  | 
                                                        
| 151 | 151 | }  | 
                                                        
@@ -251,7 +251,7 @@ discard block  | 
                                                    ||
| 251 | 251 | |
| 252 | 252 | |
| 253 | 253 | // Part to edit record  | 
                                                        
| 254 | -if (($user->rights->flightlog->vol->edit || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id )) && ($id || $ref) && $action == 'edit'): ?>  | 
                                                        |
| 254 | +if (($user->rights->flightlog->vol->edit || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id)) && ($id || $ref) && $action == 'edit'): ?>  | 
                                                        |
| 255 | 255 | |
| 256 | 256 | <?php $renderer = new \flightlog\form\SimpleFormRenderer(); ?>  | 
                                                        
| 257 | 257 | |
@@ -268,7 +268,7 @@ discard block  | 
                                                    ||
| 268 | 268 | |
| 269 | 269 |          <?php echo $renderer->render($formFlight->getElement('idBBC_vols')); ?> | 
                                                        
| 270 | 270 | |
| 271 | -        <?php if($formFlight->has('fk_type')): ?> | 
                                                        |
| 271 | +        <?php if ($formFlight->has('fk_type')): ?> | 
                                                        |
| 272 | 272 | <section class="form-section">  | 
                                                        
| 273 | 273 |              <h1 class="form-section-title"><?php echo $langs->trans('Type de vol'); ?></h1> | 
                                                        
| 274 | 274 | <table class="border" width="50%">  | 
                                                        
@@ -282,7 +282,7 @@ discard block  | 
                                                    ||
| 282 | 282 | <?php endif; ?>  | 
                                                        
| 283 | 283 | |
| 284 | 284 | <!-- Date et heures -->  | 
                                                        
| 285 | -        <?php if($formFlight->has('date')): ?> | 
                                                        |
| 285 | +        <?php if ($formFlight->has('date')): ?> | 
                                                        |
| 286 | 286 | <section class="form-section">  | 
                                                        
| 287 | 287 |                  <h1 class="form-section-title"><?php echo $langs->trans('Date'); ?></h1> | 
                                                        
| 288 | 288 | <table class="border" width="50%">  | 
                                                        
@@ -294,7 +294,7 @@ discard block  | 
                                                    ||
| 294 | 294 | </section>  | 
                                                        
| 295 | 295 | <?php endif; ?>  | 
                                                        
| 296 | 296 | |
| 297 | -        <?php if($formFlight->has('heureD') && $formFlight->has('heureA')): ?> | 
                                                        |
| 297 | +        <?php if ($formFlight->has('heureD') && $formFlight->has('heureA')): ?> | 
                                                        |
| 298 | 298 | <section class="form-section">  | 
                                                        
| 299 | 299 |                  <h1 class="form-section-title"><?php echo $langs->trans('Heures'); ?></h1> | 
                                                        
| 300 | 300 | <table class="border" width="50%">  | 
                                                        
@@ -314,14 +314,14 @@ discard block  | 
                                                    ||
| 314 | 314 |              <h1 class="form-section-title"><?php echo $langs->trans('Pilote & ballon') ?></h1> | 
                                                        
| 315 | 315 | <table class="border" width="50%">  | 
                                                        
| 316 | 316 | |
| 317 | -                <?php if($formFlight->has('fk_pilot')): ?> | 
                                                        |
| 317 | +                <?php if ($formFlight->has('fk_pilot')): ?> | 
                                                        |
| 318 | 318 | <tr>  | 
                                                        
| 319 | 319 | <td class="fieldrequired"> Pilote </td>  | 
                                                        
| 320 | -                    <td><?php echo $renderer->render($formFlight->getElement('fk_pilot'),['ajax' => true]); ?></td> | 
                                                        |
| 320 | +                    <td><?php echo $renderer->render($formFlight->getElement('fk_pilot'), ['ajax' => true]); ?></td> | 
                                                        |
| 321 | 321 | </tr>  | 
                                                        
| 322 | 322 | <?php endif; ?>  | 
                                                        
| 323 | 323 | |
| 324 | -                <?php if($formFlight->has('BBC_ballons_idBBC_ballons')): ?> | 
                                                        |
| 324 | +                <?php if ($formFlight->has('BBC_ballons_idBBC_ballons')): ?> | 
                                                        |
| 325 | 325 | <tr>  | 
                                                        
| 326 | 326 | <td width="25%" class="fieldrequired">Ballon</td>  | 
                                                        
| 327 | 327 |                      <td><?php echo $renderer->render($formFlight->getElement('BBC_ballons_idBBC_ballons')); ?></td> | 
                                                        
@@ -356,7 +356,7 @@ discard block  | 
                                                    ||
| 356 | 356 | </table>  | 
                                                        
| 357 | 357 | </section>  | 
                                                        
| 358 | 358 | |
| 359 | -        <?php if($formFlight->has('fk_organisateur')): ?> | 
                                                        |
| 359 | +        <?php if ($formFlight->has('fk_organisateur')): ?> | 
                                                        |
| 360 | 360 | <section class="form-section">  | 
                                                        
| 361 | 361 | <h1 class="form-section-title"><span class="js-organisator-field">Organisateur</span></h1>  | 
                                                        
| 362 | 362 | <table class="border" width="50%">  | 
                                                        
@@ -365,7 +365,7 @@ discard block  | 
                                                    ||
| 365 | 365 | <td>  | 
                                                        
| 366 | 366 | <?php  | 
                                                        
| 367 | 367 | //organisateur  | 
                                                        
| 368 | -                            print $renderer->render($formFlight->getElement('fk_organisateur'),['ajax' => true]); | 
                                                        |
| 368 | +                            print $renderer->render($formFlight->getElement('fk_organisateur'), ['ajax' => true]); | 
                                                        |
| 369 | 369 | ?>  | 
                                                        
| 370 | 370 | </td>  | 
                                                        
| 371 | 371 | </tr>  | 
                                                        
@@ -377,7 +377,7 @@ discard block  | 
                                                    ||
| 377 | 377 | <section class="form-section js-expensable-field">  | 
                                                        
| 378 | 378 |              <h1 class="form-section-title"><?php echo $langs->trans('Déplacements') ?></h1> | 
                                                        
| 379 | 379 | <table class="border" width="50%">  | 
                                                        
| 380 | -                <?php if($formFlight->has('kilometers')): ?> | 
                                                        |
| 380 | +                <?php if ($formFlight->has('kilometers')): ?> | 
                                                        |
| 381 | 381 | <!-- number of kilometers done for the flight -->  | 
                                                        
| 382 | 382 | <tr>  | 
                                                        
| 383 | 383 | <td class="fieldrequired">Nombre de kilometres effectués pour le vol</td>  | 
                                                        
@@ -387,7 +387,7 @@ discard block  | 
                                                    ||
| 387 | 387 | </tr>  | 
                                                        
| 388 | 388 | <?php endif; ?>  | 
                                                        
| 389 | 389 | |
| 390 | -                <?php if($formFlight->has('justif_kilometers')): ?> | 
                                                        |
| 390 | +                <?php if ($formFlight->has('justif_kilometers')): ?> | 
                                                        |
| 391 | 391 | <!-- Justif Kilometers -->  | 
                                                        
| 392 | 392 | <tr>  | 
                                                        
| 393 | 393 | |
@@ -405,7 +405,7 @@ discard block  | 
                                                    ||
| 405 | 405 | <section class="form-section">  | 
                                                        
| 406 | 406 |              <h1 class="form-section-title"><?php echo $langs->trans('Passager') ?></h1> | 
                                                        
| 407 | 407 | <table class="border" width="50%">  | 
                                                        
| 408 | -                <?php if($formFlight->has('nbrPax')): ?> | 
                                                        |
| 408 | +                <?php if ($formFlight->has('nbrPax')): ?> | 
                                                        |
| 409 | 409 | <tr>  | 
                                                        
| 410 | 410 |                          <td class="fieldrequired"><?php echo $langs->trans('Nombre de passagers'); ?></td> | 
                                                        
| 411 | 411 | <td>  | 
                                                        
@@ -414,7 +414,7 @@ discard block  | 
                                                    ||
| 414 | 414 | </tr>  | 
                                                        
| 415 | 415 | <?php endif; ?>  | 
                                                        
| 416 | 416 | |
| 417 | -                <?php if($formFlight->has('passengerNames')): ?> | 
                                                        |
| 417 | +                <?php if ($formFlight->has('passengerNames')): ?> | 
                                                        |
| 418 | 418 | <!-- passenger names -->  | 
                                                        
| 419 | 419 | <tr>  | 
                                                        
| 420 | 420 |                          <td width="25%" class="fieldrequired"><?php echo $langs->trans('Noms des passagers'); ?><br/>(Séparé | 
                                                        
@@ -424,7 +424,7 @@ discard block  | 
                                                    ||
| 424 | 424 |                              <?php print $renderer->render($formFlight->getElement('passengerNames')); ?> | 
                                                        
| 425 | 425 | </td>  | 
                                                        
| 426 | 426 | </tr>  | 
                                                        
| 427 | - <?php endif;?>  | 
                                                        |
| 427 | + <?php endif; ?>  | 
                                                        |
| 428 | 428 | </table>  | 
                                                        
| 429 | 429 | </section>  | 
                                                        
| 430 | 430 | |
@@ -433,17 +433,17 @@ discard block  | 
                                                    ||
| 433 | 433 |              <h1 class="form-section-title js-billable-field"><?php echo $langs->trans('Facturation') ?></h1> | 
                                                        
| 434 | 434 | <table class="border" width="50%">  | 
                                                        
| 435 | 435 | |
| 436 | -                <?php if($formFlight->has('fk_receiver')): ?> | 
                                                        |
| 436 | +                <?php if ($formFlight->has('fk_receiver')): ?> | 
                                                        |
| 437 | 437 | <!-- Money receiver -->  | 
                                                        
| 438 | 438 | <tr class="js-hide-order js-billable-field">  | 
                                                        
| 439 | 439 |                          <td class="fieldrequired"><?php echo $langs->trans('Qui a perçu l\'argent') ?></td> | 
                                                        
| 440 | 440 | <td>  | 
                                                        
| 441 | -                            <?php print $renderer->render($formFlight->getElement('fk_receiver'),['ajax' => true]); ?> | 
                                                        |
| 441 | +                            <?php print $renderer->render($formFlight->getElement('fk_receiver'), ['ajax' => true]); ?> | 
                                                        |
| 442 | 442 | </td>  | 
                                                        
| 443 | 443 | </tr>  | 
                                                        
| 444 | 444 | <?php endif; ?>  | 
                                                        
| 445 | 445 | |
| 446 | -                <?php if($formFlight->has('cost')): ?> | 
                                                        |
| 446 | +                <?php if ($formFlight->has('cost')): ?> | 
                                                        |
| 447 | 447 | <!-- Flight cost -->  | 
                                                        
| 448 | 448 | <tr class="js-hide-order js-billable-field">  | 
                                                        
| 449 | 449 | <td class="fieldrequired">Montant perçu</td>  | 
                                                        
@@ -461,7 +461,7 @@ discard block  | 
                                                    ||
| 461 | 461 |              <h1 class="form-section-title"><?php echo $langs->trans('Commentaires') ?></h1> | 
                                                        
| 462 | 462 | <table class="border" width="50%">  | 
                                                        
| 463 | 463 | |
| 464 | -                <?php if($formFlight->has('remarque')): ?> | 
                                                        |
| 464 | +                <?php if ($formFlight->has('remarque')): ?> | 
                                                        |
| 465 | 465 | <!-- commentaires -->  | 
                                                        
| 466 | 466 | <tr class="">  | 
                                                        
| 467 | 467 | <td class="fieldrequired"> Commentaire</td>  | 
                                                        
@@ -471,7 +471,7 @@ discard block  | 
                                                    ||
| 471 | 471 | </tr>  | 
                                                        
| 472 | 472 | <?php endif; ?>  | 
                                                        
| 473 | 473 | |
| 474 | -                <?php if($formFlight->has('incidents')): ?> | 
                                                        |
| 474 | +                <?php if ($formFlight->has('incidents')): ?> | 
                                                        |
| 475 | 475 | <!-- incidents -->  | 
                                                        
| 476 | 476 | <tr class="">  | 
                                                        
| 477 | 477 | <td class="fieldrequired"> incidents</td>  | 
                                                        
@@ -505,7 +505,7 @@ discard block  | 
                                                    ||
| 505 | 505 |          $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), | 
                                                        
| 506 | 506 |              $langs->trans('êtes-vous sure de vouloir supprimer ce vol ?'), 'confirm_delete', '', 0, 1); | 
                                                        
| 507 | 507 | print $formconfirm;  | 
                                                        
| 508 | -    } elseif ($user->rights->flightlog->vol->financial  && $action == ACTION_FLAG_BILLED) { | 
                                                        |
| 508 | +    } elseif ($user->rights->flightlog->vol->financial && $action == ACTION_FLAG_BILLED) { | 
                                                        |
| 509 | 509 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id,  | 
                                                        
| 510 | 510 |              $langs->trans('Marque comme facturé'), | 
                                                        
| 511 | 511 |              $langs->trans('Ce vol va être marqué comme facturé, est-ce bien le cas ?'), ACTION_CONFIRM_FLAG_BILLED, '', | 
                                                        
@@ -537,7 +537,7 @@ discard block  | 
                                                    ||
| 537 | 537 | print '<div class="tabsAction">' . "\n";  | 
                                                        
| 538 | 538 | $parameters = array();  | 
                                                        
| 539 | 539 |      $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, | 
                                                        
| 540 | - $action); // Note that $action and $object may have been modified by hook  | 
                                                        |
| 540 | + $action); // Note that $action and $object may have been modified by hook  | 
                                                        |
| 541 | 541 |      if ($reshook < 0) { | 
                                                        
| 542 | 542 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');  | 
                                                        
| 543 | 543 | }  | 
                                                        
@@ -132,7 +132,7 @@  | 
                                                    ||
| 132 | 132 | $name = $command->getName() . ' ' . $command->getFirstname();  | 
                                                        
| 133 | 133 | |
| 134 | 134 | $existingCustomers = $this->societe->fetch(null, $name);  | 
                                                        
| 135 | -        if($existingCustomers > 0){ | 
                                                        |
| 135 | +        if ($existingCustomers > 0) { | 
                                                        |
| 136 | 136 | $this->societe = $existingCustomers[0];  | 
                                                        
| 137 | 137 | return $this->societe;  | 
                                                        
| 138 | 138 | }  | 
                                                        
@@ -272,7 +272,7 @@  | 
                                                    ||
| 272 | 272 | $expenseNoteUser = new User($this->db);  | 
                                                        
| 273 | 273 | $expenseNoteUser->id = $currentMissionUserId;  | 
                                                        
| 274 | 274 | $id = $expenseNote->create($expenseNoteUser);  | 
                                                        
| 275 | -        if($id < 0){ | 
                                                        |
| 275 | +        if ($id < 0) { | 
                                                        |
| 276 | 276 | return null;  | 
                                                        
| 277 | 277 | }  | 
                                                        
| 278 | 278 | |
@@ -44,7 +44,7 @@ discard block  | 
                                                    ||
| 44 | 44 | )  | 
                                                        
| 45 | 45 |      { | 
                                                        
| 46 | 46 | Assert::integerish($pilotId);  | 
                                                        
| 47 | - $pilotId = (int)$pilotId;  | 
                                                        |
| 47 | + $pilotId = (int) $pilotId;  | 
                                                        |
| 48 | 48 | |
| 49 | 49 |          if (!isset($this->items[$pilotId])) { | 
                                                        
| 50 | 50 | $this->items[$pilotId] = new PilotMissions($pilotId, $pilotFirstname, $pilotLastname);  | 
                                                        
@@ -61,7 +61,7 @@ discard block  | 
                                                    ||
| 61 | 61 | public function addPilot($pilotId, $pilotFirstname, $pilotLastname)  | 
                                                        
| 62 | 62 |      { | 
                                                        
| 63 | 63 | Assert::integerish($pilotId);  | 
                                                        
| 64 | - $pilotId = (int)$pilotId;  | 
                                                        |
| 64 | + $pilotId = (int) $pilotId;  | 
                                                        |
| 65 | 65 | |
| 66 | 66 |          if (isset($this->items[$pilotId])) { | 
                                                        
| 67 | 67 | return;  | 
                                                        
@@ -52,9 +52,9 @@ discard block  | 
                                                    ||
| 52 | 52 | $pilotLastname = $obj->lastname;  | 
                                                        
| 53 | 53 | $pilotFirstname = $obj->firstname;  | 
                                                        
| 54 | 54 | |
| 55 | -                        if($query->isPilotsOnly()){ | 
                                                        |
| 55 | +                        if ($query->isPilotsOnly()) { | 
                                                        |
| 56 | 56 | $result->addPilot($pilotId, $pilotFirstname, $pilotLastname);  | 
                                                        
| 57 | -                        }else{ | 
                                                        |
| 57 | +                        } else { | 
                                                        |
| 58 | 58 | $result->addMission($obj->quartil, $pilotId, $pilotFirstname, $pilotLastname,  | 
                                                        
| 59 | 59 | $obj->number_flights, $obj->total_kilometers);  | 
                                                        
| 60 | 60 | }  | 
                                                        
@@ -79,7 +79,7 @@ discard block  | 
                                                    ||
| 79 | 79 | $sql .= " , SUM(VOL.kilometers) as total_kilometers ";  | 
                                                        
| 80 | 80 | $sql .= " , COUNT(VOL.idBBC_vols) as number_flights";  | 
                                                        
| 81 | 81 | |
| 82 | -        if(!$query->isPilotsOnly()){ | 
                                                        |
| 82 | +        if (!$query->isPilotsOnly()) { | 
                                                        |
| 83 | 83 | $sql .= " , QUARTER(VOL.date) as quartil ";  | 
                                                        
| 84 | 84 | }  | 
                                                        
| 85 | 85 | |
@@ -54,7 +54,7 @@  | 
                                                    ||
| 54 | 54 | |
| 55 | 55 |                          if($query->isPilotsOnly()){ | 
                                                        
| 56 | 56 | $result->addPilot($pilotId, $pilotFirstname, $pilotLastname);  | 
                                                        
| 57 | -                        }else{ | 
                                                        |
| 57 | +                        } else{ | 
                                                        |
| 58 | 58 | $result->addMission($obj->quartil, $pilotId, $pilotFirstname, $pilotLastname,  | 
                                                        
| 59 | 59 | $obj->number_flights, $obj->total_kilometers);  | 
                                                        
| 60 | 60 | }  | 
                                                        
@@ -43,7 +43,7 @@ discard block  | 
                                                    ||
| 43 | 43 | |
| 44 | 44 |  $id = GETPOST('id', 'int') ?: GETPOST('idBBC_vols', 'int'); | 
                                                        
| 45 | 45 |  $action = GETPOST('action', 'alpha'); | 
                                                        
| 46 | -$permissiondellink=$user->rights->flightlog->vol->financial;  | 
                                                        |
| 46 | +$permissiondellink = $user->rights->flightlog->vol->financial;  | 
                                                        |
| 47 | 47 | |
| 48 | 48 | $object = new Bbcvols($db);  | 
                                                        
| 49 | 49 | $extrafields = new ExtraFields($db);  | 
                                                        
@@ -62,8 +62,8 @@ discard block  | 
                                                    ||
| 62 | 62 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element);  | 
                                                        
| 63 | 63 | |
| 64 | 64 | // Load object  | 
                                                        
| 65 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals  | 
                                                        |
| 66 | -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';  | 
                                                        |
| 65 | +include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals  | 
                                                        |
| 66 | +include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php';  | 
                                                        |
| 67 | 67 | |
| 68 | 68 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array  | 
                                                        
| 69 | 69 |  $hookmanager->initHooks(array('bbcvols')); | 
                                                        
@@ -93,18 +93,18 @@ discard block  | 
                                                    ||
| 93 | 93 |  print '<tr><td class="fieldrequired">' . $langs->trans("Fielddate") . '</td><td>' . dol_print_date($object->date) . '</td></tr>'; | 
                                                        
| 94 | 94 | |
| 95 | 95 |  if ($user->rights->flightlog->vol->financial) { | 
                                                        
| 96 | -    print '<tr><td class="fieldrequired">' . $langs->trans("Fieldis_facture") . '</td><td>' . $object->getLibStatut(5). '</td></tr>'; | 
                                                        |
| 96 | +    print '<tr><td class="fieldrequired">' . $langs->trans("Fieldis_facture") . '</td><td>' . $object->getLibStatut(5) . '</td></tr>'; | 
                                                        |
| 97 | 97 | }  | 
                                                        
| 98 | 98 | |
| 99 | 99 |  print '<tr><td class="fieldrequired">' . $langs->trans("Fieldkilometers") . '</td><td>' . $object->kilometers . ' KM</td></tr>'; | 
                                                        
| 100 | 100 |  print '<tr><td class="fieldrequired">' . $langs->trans("Fieldjustif_kilometers") . '</td><td>' . $object->justif_kilometers . '</td></tr>'; | 
                                                        
| 101 | -if(!$object->isLinkedToOrder()){ | 
                                                        |
| 101 | +if (!$object->isLinkedToOrder()) { | 
                                                        |
| 102 | 102 |      print '<tr><td class="fieldrequired">' . $langs->trans("Fieldcost") . '</td><td>' . $object->cost . " " . $langs->getCurrencySymbol($conf->currency) . '</td></tr>'; | 
                                                        
| 103 | 103 |      print '<tr><td class="fieldrequired">' . $langs->trans("Fieldfk_receiver") . '</td><td>' . $receiver->getNomUrl(1) . '</td></tr>'; | 
                                                        
| 104 | -}else{ | 
                                                        |
| 104 | +} else { | 
                                                        |
| 105 | 105 |      print '<tr><td class="fieldrequired">' . $langs->trans("Order") . '</td><td><ul>'; | 
                                                        
| 106 | -    foreach($object->getOrders() as $currentOrder){ | 
                                                        |
| 107 | - print '<li>'.$currentOrder->getNomUrl(1).'</li>';  | 
                                                        |
| 106 | +    foreach ($object->getOrders() as $currentOrder) { | 
                                                        |
| 107 | + print '<li>' . $currentOrder->getNomUrl(1) . '</li>';  | 
                                                        |
| 108 | 108 | }  | 
                                                        
| 109 | 109 | print '</ul></td></tr>';  | 
                                                        
| 110 | 110 | }  | 
                                                        
@@ -115,13 +115,13 @@ discard block  | 
                                                    ||
| 115 | 115 | // Buttons  | 
                                                        
| 116 | 116 | print '<div class="tabsAction">' . "\n";  | 
                                                        
| 117 | 117 | |
| 118 | -if($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()){ | 
                                                        |
| 119 | -    print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/flightlog/facture.php?id=' . $object->id.'">' . $langs->trans("Facturer") . '</a></div>' . "\n"; | 
                                                        |
| 118 | +if ($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()) { | 
                                                        |
| 119 | +    print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/flightlog/facture.php?id=' . $object->id . '">' . $langs->trans("Facturer") . '</a></div>' . "\n"; | 
                                                        |
| 120 | 120 | }  | 
                                                        
| 121 | 121 | |
| 122 | 122 | print '</div>' . "\n";  | 
                                                        
| 123 | 123 | |
| 124 | -if($user->rights->flightlog->vol->financial){ | 
                                                        |
| 124 | +if ($user->rights->flightlog->vol->financial) { | 
                                                        |
| 125 | 125 | print '<div class="fichecenter"><div class="fichehalfleft">';  | 
                                                        
| 126 | 126 | $form->showLinkedObjectBlock($object);  | 
                                                        
| 127 | 127 | print '</div></div>';  | 
                                                        
@@ -101,7 +101,7 @@  | 
                                                    ||
| 101 | 101 |  if(!$object->isLinkedToOrder()){ | 
                                                        
| 102 | 102 |      print '<tr><td class="fieldrequired">' . $langs->trans("Fieldcost") . '</td><td>' . $object->cost . " " . $langs->getCurrencySymbol($conf->currency) . '</td></tr>'; | 
                                                        
| 103 | 103 |      print '<tr><td class="fieldrequired">' . $langs->trans("Fieldfk_receiver") . '</td><td>' . $receiver->getNomUrl(1) . '</td></tr>'; | 
                                                        
| 104 | -}else{ | 
                                                        |
| 104 | +} else{ | 
                                                        |
| 105 | 105 |      print '<tr><td class="fieldrequired">' . $langs->trans("Order") . '</td><td><ul>'; | 
                                                        
| 106 | 106 |      foreach($object->getOrders() as $currentOrder){ | 
                                                        
| 107 | 107 | print '<li>'.$currentOrder->getNomUrl(1).'</li>';  | 
                                                        
@@ -61,7 +61,7 @@ discard block  | 
                                                    ||
| 61 | 61 | ->setGroupedFlight($isGroupedFlight)  | 
                                                        
| 62 | 62 | ->setOrderIds($orderPassengersCount);  | 
                                                        
| 63 | 63 | |
| 64 | -        try{ | 
                                                        |
| 64 | +        try { | 
                                                        |
| 65 | 65 | $vol = $createFlightHandler->handle($volCommand);  | 
                                                        
| 66 | 66 | |
| 67 | 67 | include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';  | 
                                                        
@@ -70,7 +70,7 @@ discard block  | 
                                                    ||
| 70 | 70 | |
| 71 | 71 | $msg = '<div class="ok">L\'ajout du vol du : ' . $_POST["reday"] . '/' . $_POST["remonth"] . '/' . $_POST["reyear"] . ' s\'est correctement effectue ! </div>';  | 
                                                        
| 72 | 72 |              Header("Location: card.php?id=" . $vol->id); | 
                                                        
| 73 | -        }catch (\Exception $e){ | 
                                                        |
| 73 | +        } catch (\Exception $e) { | 
                                                        |
| 74 | 74 | $msg = '<div class="error">Erreur lors de l\'ajout du vol : ' . $vol->error . '! </div>';  | 
                                                        
| 75 | 75 | }  | 
                                                        
| 76 | 76 | |
@@ -150,7 +150,7 @@ discard block  | 
                                                    ||
| 150 | 150 | //Pilote  | 
                                                        
| 151 | 151 | print "<tr>";  | 
                                                        
| 152 | 152 | print '<td class="fieldrequired"> Pilote </td><td >';  | 
                                                        
| 153 | - print $html->select_dolusers($_POST["pilot"] ? $_POST["pilot"] : $user->id, 'pilot', 0, null, 0, '', '', 0,0,0,'',0,'','', true);  | 
                                                        |
| 153 | + print $html->select_dolusers($_POST["pilot"] ? $_POST["pilot"] : $user->id, 'pilot', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', true);  | 
                                                        |
| 154 | 154 | print '</td></tr>';  | 
                                                        
| 155 | 155 | |
| 156 | 156 | //Ballon  | 
                                                        
@@ -196,7 +196,7 @@ discard block  | 
                                                    ||
| 196 | 196 | <td>  | 
                                                        
| 197 | 197 | <?php  | 
                                                        
| 198 | 198 | //organisateur  | 
                                                        
| 199 | - print $html->select_dolusers($_POST["orga"] ? $_POST["orga"] : $user->id, 'orga', 0, null, 0, '', '', 0,0,0,'',0,'','', true);  | 
                                                        |
| 199 | + print $html->select_dolusers($_POST["orga"] ? $_POST["orga"] : $user->id, 'orga', 0, null, 0, '', '', 0, 0, 0, '', 0, '', '', true);  | 
                                                        |
| 200 | 200 | ?>  | 
                                                        
| 201 | 201 | </td>  | 
                                                        
| 202 | 202 | </tr>  | 
                                                        
@@ -236,7 +236,7 @@ discard block  | 
                                                    ||
| 236 | 236 | <input type="number"  | 
                                                        
| 237 | 237 | name="nbrPax"  | 
                                                        
| 238 | 238 |                             class="flat <?php echo $validator->hasError('nbrPax') ? 'error' : '' ?>" | 
                                                        
| 239 | - value="<?php echo $_POST['nbrPax']?: 0 ?>"/>  | 
                                                        |
| 239 | + value="<?php echo $_POST['nbrPax'] ?: 0 ?>"/>  | 
                                                        |
| 240 | 240 | </td>  | 
                                                        
| 241 | 241 | </tr>  | 
                                                        
| 242 | 242 | |
@@ -260,7 +260,7 @@ discard block  | 
                                                    ||
| 260 | 260 |                  <td class="fieldrequired"><?php echo $langs->trans('Commande du vol')?></td> | 
                                                        
| 261 | 261 | <td class="js-order">  | 
                                                        
| 262 | 262 | <?php  | 
                                                        
| 263 | -                        echo $html::multiselectarray('order_id', $commande->liste_array(2),$_POST['order_id'],0,0,'',0,'100%'); | 
                                                        |
| 263 | +                        echo $html::multiselectarray('order_id', $commande->liste_array(2), $_POST['order_id'], 0, 0, '', 0, '100%'); | 
                                                        |
| 264 | 264 | ?>  | 
                                                        
| 265 | 265 | </td>  | 
                                                        
| 266 | 266 | </tr>  | 
                                                        
@@ -269,7 +269,7 @@ discard block  | 
                                                    ||
| 269 | 269 | <tr class="js-hide-order js-billable-field">  | 
                                                        
| 270 | 270 |                  <td class="fieldrequired"><?php echo $langs->trans('Qui a perçu l\'argent')?></td><td> | 
                                                        
| 271 | 271 | <?php print $html->select_dolusers($_POST["fk_receiver"] ? $_POST["fk_receiver"] : $user->id,  | 
                                                        
| 272 | - 'fk_receiver', true, null, 0, '', '', 0,0,0,'',0,'','', true); ?>  | 
                                                        |
| 272 | + 'fk_receiver', true, null, 0, '', '', 0, 0, 0, '', 0, '', '', true); ?>  | 
                                                        |
| 273 | 273 | </td>  | 
                                                        
| 274 | 274 | </tr>  | 
                                                        
| 275 | 275 | |
@@ -277,7 +277,7 @@ discard block  | 
                                                    ||
| 277 | 277 | <tr class="js-hide-order js-billable-field">  | 
                                                        
| 278 | 278 | <td class="fieldrequired">Montant perçu</td>  | 
                                                        
| 279 | 279 | <td>  | 
                                                        
| 280 | -                    <input type="text" name="cost" class="flat  <?php echo $validator->hasError('cost') ? 'error' : '' ?>" value="<?php echo $_POST['cost']?:0 ?> "/> | 
                                                        |
| 280 | +                    <input type="text" name="cost" class="flat  <?php echo $validator->hasError('cost') ? 'error' : '' ?>" value="<?php echo $_POST['cost'] ?: 0 ?> "/> | 
                                                        |
| 281 | 281 | €  | 
                                                        
| 282 | 282 | </td>  | 
                                                        
| 283 | 283 | </tr>  | 
                                                        
@@ -324,9 +324,9 @@ discard block  | 
                                                    ||
| 324 | 324 | |
| 325 | 325 | <script type="application/javascript">  | 
                                                        
| 326 | 326 | |
| 327 | -    <?php if(!empty(GETPOST('order_passengers_count', 'array', 2))): ?> | 
                                                        |
| 327 | +    <?php if (!empty(GETPOST('order_passengers_count', 'array', 2))): ?> | 
                                                        |
| 328 | 328 |          var orders = {}; | 
                                                        
| 329 | -        <?php foreach( GETPOST('order_passengers_count', 'array', 2) as $currentOrderId=>$nbrPaxForOrder): ?> | 
                                                        |
| 329 | +        <?php foreach (GETPOST('order_passengers_count', 'array', 2) as $currentOrderId=>$nbrPaxForOrder): ?> | 
                                                        |
| 330 | 330 | orders[<?php echo $currentOrderId; ?>] = <?php echo $nbrPaxForOrder; ?>;  | 
                                                        
| 331 | 331 | <?php endforeach; ?>  | 
                                                        
| 332 | 332 | <?php endif; ?>  |