| @@ -61,8 +61,8 @@ | ||
| 61 | 61 | $form = new Form($db); | 
| 62 | 62 | print '<!-- debut cartouche rapport --> | 
| 63 | 63 | <div class="tabs"> | 
| 64 | - <a id="'.($viewSelection == 1 ? 'active' : '').'" class="tab" href="listFact.php?view=1">Facturation</a> | |
| 65 | - <a id="'.($viewSelection == 2 ? 'active' : '').'" class="tab" href="listFact.php?view=2">AVIABEL</a> | |
| 64 | + <a id="'.($viewSelection == 1 ? 'active' : '') . '" class="tab" href="listFact.php?view=1">Facturation</a> | |
| 65 | + <a id="'.($viewSelection == 2 ? 'active' : '') . '" class="tab" href="listFact.php?view=2">AVIABEL</a> | |
| 66 | 66 | </div>'; | 
| 67 | 67 | print '<div class="tabBar">'; | 
| 68 | 68 | print "<form name='listFact' action=\"listFact.php\" method=\"get\">\n"; | 
| @@ -69,7 +69,7 @@ | ||
| 69 | 69 | $result = [$this->year]; | 
| 70 | 70 | |
| 71 | 71 |          foreach ($this->graphData as $typeId => $data) { | 
| 72 | -            if(!in_array($typeId, [1,2,3,6])){ | |
| 72 | +            if (!in_array($typeId, [1, 2, 3, 6])) { | |
| 73 | 73 | continue; | 
| 74 | 74 | } | 
| 75 | 75 | |
| @@ -36,14 +36,14 @@ | ||
| 36 | 36 | /** | 
| 37 | 37 | * @param GraphicalValue $value | 
| 38 | 38 | */ | 
| 39 | -    public function addValue(GraphicalValue $value){ | |
| 39 | +    public function addValue(GraphicalValue $value) { | |
| 40 | 40 | $this->counter = $this->counter->add($value); | 
| 41 | 41 | } | 
| 42 | 42 | |
| 43 | 43 | /** | 
| 44 | 44 | * @return int | 
| 45 | 45 | */ | 
| 46 | -    public function getValue(){ | |
| 46 | +    public function getValue() { | |
| 47 | 47 | return $this->counter->getValue(); | 
| 48 | 48 | } | 
| 49 | 49 | |
| @@ -40,7 +40,7 @@ discard block | ||
| 40 | 40 | */ | 
| 41 | 41 | public function addValue($year, GraphicalValue $value) | 
| 42 | 42 |      { | 
| 43 | -        if(!isset($this->data[$year])){ | |
| 43 | +        if (!isset($this->data[$year])) { | |
| 44 | 44 |              throw new \Exception("Year is not defined"); | 
| 45 | 45 | } | 
| 46 | 46 | |
| @@ -54,7 +54,7 @@ discard block | ||
| 54 | 54 |      { | 
| 55 | 55 | $result = []; | 
| 56 | 56 | |
| 57 | -        foreach($this->data as $year){ | |
| 57 | +        foreach ($this->data as $year) { | |
| 58 | 58 | $result[] = $year->export(); | 
| 59 | 59 | } | 
| 60 | 60 | |
| @@ -45,17 +45,17 @@ | ||
| 45 | 45 | * | 
| 46 | 46 | * @return TabCollection | 
| 47 | 47 | */ | 
| 48 | -    public function addTab(Tab $tab){ | |
| 48 | +    public function addTab(Tab $tab) { | |
| 49 | 49 | $this->tabs[] = $tab; | 
| 50 | 50 | } | 
| 51 | 51 | |
| 52 | 52 | /** | 
| 53 | 53 | * @return array | 
| 54 | 54 | */ | 
| 55 | -    public function toArray(){ | |
| 55 | +    public function toArray() { | |
| 56 | 56 | $tabAsArray = []; | 
| 57 | 57 | |
| 58 | -        foreach ($this->tabs as $tab){ | |
| 58 | +        foreach ($this->tabs as $tab) { | |
| 59 | 59 | $tabAsArray[] = $tab->toArray(); | 
| 60 | 60 | } | 
| 61 | 61 | |
| @@ -613,9 +613,12 @@ | ||
| 613 | 613 | |
| 614 | 614 | <?php if ($year >= $currentYear || !$t1->service || !$t2->service || !$t3->service || !$t4->service || !$t5->service || !$t6->service || !$t7->service) : ?> | 
| 615 | 615 | <a class="butActionRefused" href="#">Générer</a> | 
| 616 | - <?php else: ?> | |
| 616 | +        <?php else { | |
| 617 | + : ?> | |
| 617 | 618 | <button class="butAction" type="submit">Générer</button> | 
| 618 | - <?php endif; ?> | |
| 619 | + <?php endif; | |
| 620 | +} | |
| 621 | +?> | |
| 619 | 622 | |
| 620 | 623 | </form> | 
| 621 | 624 | |
| @@ -51,9 +51,9 @@ | ||
| 51 | 51 | <tr <?php echo $GLOBALS['bc'][$var]; ?> > | 
| 52 | 52 |          <td><?php echo $langs->trans("Vol"); ?></td> | 
| 53 | 53 | <td><?= $flight->getNomUrl()?></td> | 
| 54 | -        <td align="center"><?= sprintf("%s à %s ", $flight->lieuD, $flight->lieuA);?></td> | |
| 54 | +        <td align="center"><?= sprintf("%s à %s ", $flight->lieuD, $flight->lieuA); ?></td> | |
| 55 | 55 | <td align="center"><?= dol_print_date($flight->date, '%d-%m-%Y') ?></td> | 
| 56 | - <td align="right"><?= $flight->cost?:'N/A' ?></td> | |
| 56 | + <td align="right"><?= $flight->cost ?: 'N/A' ?></td> | |
| 57 | 57 | <td align="right"><?= $flight->getLibStatut(3)?></td> | 
| 58 | 58 | <td align="right"><a | 
| 59 | 59 |                      href="<?php echo $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=dellink&dellinkid=' . $key; ?>"><?php echo img_delete($langs->transnoentitiesnoconv("RemoveLink")); ?></a> | 
| @@ -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')); | 
| @@ -99,7 +99,7 @@ discard block | ||
| 99 | 99 | print '<div class="tabsAction">' . "\n"; | 
| 100 | 100 | print '</div>' . "\n"; | 
| 101 | 101 | |
| 102 | -if($user->rights->flightlog->vol->financial){ | |
| 102 | +if ($user->rights->flightlog->vol->financial) { | |
| 103 | 103 | print '<div class="fichecenter"><div class="fichehalfleft">'; | 
| 104 | 104 | $form->showLinkedObjectBlock($object); | 
| 105 | 105 | print '</div></div>'; | 
| @@ -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')); | 
| @@ -99,7 +99,7 @@ discard block | ||
| 99 | 99 | print '<div class="tabsAction">' . "\n"; | 
| 100 | 100 | print '</div>' . "\n"; | 
| 101 | 101 | |
| 102 | -if($user->rights->flightlog->vol->financial){ | |
| 102 | +if ($user->rights->flightlog->vol->financial) { | |
| 103 | 103 | print '<div class="fichecenter"><div class="fichehalfleft">'; | 
| 104 | 104 | $form->showLinkedObjectBlock($object); | 
| 105 | 105 | print '</div></div>'; |