@@ -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 |
@@ -149,9 +149,9 @@ |
||
149 | 149 | } |
150 | 150 | |
151 | 151 | /** |
152 | - * @param null $year |
|
153 | - * @param null $pilotId |
|
154 | - * @param null $quarter |
|
152 | + * @param integer $year |
|
153 | + * @param integer $pilotId |
|
154 | + * @param integer $quarter |
|
155 | 155 | * @param bool $groupBy |
156 | 156 | * |
157 | 157 | * @return string |
@@ -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> |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $this->results["flightlog"] = [ |
30 | 30 | 'label' => $langs->trans("Search flight"), |
31 | 31 | 'text' => $langs->trans("Search flight"), |
32 | - 'url' => DOL_URL_ROOT . '/flightlog/list.php?mainmenu=flightlog&sall='.$searchInfo['search_boxvalue'] |
|
32 | + 'url' => DOL_URL_ROOT . '/flightlog/list.php?mainmenu=flightlog&sall=' . $searchInfo['search_boxvalue'] |
|
33 | 33 | ]; |
34 | 34 | } |
35 | 35 | |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | * @param $object |
39 | 39 | * @param $action |
40 | 40 | */ |
41 | - public function showLinkToObjectBlock($parameter, $object, $action){ |
|
42 | - $this->results["flightlog_bbcvols"]= array('enabled'=>1, 'perms'=>1, 'label'=>'LinkToFlight', 'sql'=>"SELECT f.idBBC_vols as rowid, CONCAT('(ID : ',f.idBBC_vols, ') -',f.date, '-',f.lieuD, ' ; ', f.lieuA) as ref FROM ".MAIN_DB_PREFIX."bbc_vols as f WHERE YEAR(f.date) = (YEAR(NOW())) ORDER BY date DESC"); |
|
41 | + public function showLinkToObjectBlock($parameter, $object, $action) { |
|
42 | + $this->results["flightlog_bbcvols"] = array('enabled'=>1, 'perms'=>1, 'label'=>'LinkToFlight', 'sql'=>"SELECT f.idBBC_vols as rowid, CONCAT('(ID : ',f.idBBC_vols, ') -',f.date, '-',f.lieuD, ' ; ', f.lieuA) as ref FROM " . MAIN_DB_PREFIX . "bbc_vols as f WHERE YEAR(f.date) = (YEAR(NOW())) ORDER BY date DESC"); |
|
43 | 43 | |
44 | 44 | } |
45 | 45 | } |
46 | 46 | \ No newline at end of file |