@@ -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 |
@@ -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>'; |
@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | */ |
17 | 17 | |
18 | 18 | |
19 | -require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; |
|
19 | +require_once DOL_DOCUMENT_ROOT . '/core/triggers/dolibarrtriggers.class.php'; |
|
20 | 20 | dol_include_once('/flightlog/class/bbcvols.class.php'); |
21 | 21 | dol_include_once('/core/class/CMailFile.class.php'); |
22 | 22 | |
@@ -78,23 +78,23 @@ discard block |
||
78 | 78 | */ |
79 | 79 | public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) |
80 | 80 | { |
81 | - if (empty($conf->flightlog->enabled) || empty($conf->workflow->enabled)){ |
|
81 | + if (empty($conf->flightlog->enabled) || empty($conf->workflow->enabled)) { |
|
82 | 82 | return 0; |
83 | 83 | } |
84 | 84 | |
85 | - if(empty($conf->global->WORKFLOW_BBC_FLIGHTLOG_SEND_MAIL_ON_INCIDENT)){ |
|
85 | + if (empty($conf->global->WORKFLOW_BBC_FLIGHTLOG_SEND_MAIL_ON_INCIDENT)) { |
|
86 | 86 | return 0; |
87 | 87 | } |
88 | 88 | |
89 | - if($action !== 'BBC_FLIGHT_LOG_ADD_FLIGHT'){ |
|
89 | + if ($action !== 'BBC_FLIGHT_LOG_ADD_FLIGHT') { |
|
90 | 90 | return 0; |
91 | 91 | } |
92 | 92 | |
93 | - if(empty(trim($object->incidents)) && empty(trim($object->remarque))){ |
|
93 | + if (empty(trim($object->incidents)) && empty(trim($object->remarque))) { |
|
94 | 94 | return 0; |
95 | 95 | } |
96 | 96 | |
97 | - if(!empty($conf->global->MAIN_DISABLE_ALL_MAILS)){ |
|
97 | + if (!empty($conf->global->MAIN_DISABLE_ALL_MAILS)) { |
|
98 | 98 | return 0; |
99 | 99 | } |
100 | 100 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | ); |
128 | 128 | |
129 | 129 | |
130 | - if (! $mailfile->sendfile()) |
|
130 | + if (!$mailfile->sendfile()) |
|
131 | 131 | { |
132 | 132 | dol_syslog("Error while sending mail in flight log module : incident", LOG_ERR); |
133 | 133 | } |