@@ -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 |
@@ -338,9 +338,12 @@ |
||
338 | 338 | |
339 | 339 | <?php if (!$flightProduct) : ?> |
340 | 340 | <a class="butActionRefused" href="#">Générer</a> |
341 | - <?php else: ?> |
|
341 | + <?php else { |
|
342 | + : ?> |
|
342 | 343 | <button class="butAction" type="submit">Générer</button> |
343 | - <?php endif; ?> |
|
344 | + <?php endif; |
|
345 | +} |
|
346 | +?> |
|
344 | 347 | |
345 | 348 | <a class="butAction" href="<?php echo DOL_URL_ROOT . '/flightlog/card.php?id=' . $flight->id; ?>">Retour au |
346 | 349 | vol</a> |
@@ -25,10 +25,10 @@ discard block |
||
25 | 25 | * Actions |
26 | 26 | */ |
27 | 27 | // Save |
28 | -if($action === ACTION_SAVE){ |
|
29 | - foreach($services as $flightTypeId => $serviceId){ |
|
28 | +if ($action === ACTION_SAVE) { |
|
29 | + foreach ($services as $flightTypeId => $serviceId) { |
|
30 | 30 | $res = $flightType->fetch($flightTypeId); |
31 | - if($res > 0 ){ |
|
31 | + if ($res > 0) { |
|
32 | 32 | $flightType->fkService = $serviceId; |
33 | 33 | $flightType->update($user); |
34 | 34 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | <tr class="<?= $flightTypeLine->id % 2 == 0 ? "pair" : "impair" ?>"> |
67 | 67 | <td>(T<?= $flightTypeLine->numero ?>) - <?= $flightTypeLine->nom ?></td> |
68 | 68 | <td> |
69 | - <?php $form->select_produits($flightTypeLine->fkService, 'idprod['.$flightTypeLine->id.']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?> |
|
69 | + <?php $form->select_produits($flightTypeLine->fkService, 'idprod[' . $flightTypeLine->id . ']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?> |
|
70 | 70 | </td> |
71 | 71 | </tr> |
72 | 72 | <?php endforeach; ?> |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | Vol client |
78 | 78 | </td> |
79 | 79 | <td> |
80 | - <?php $form->select_produits($conf->global->BBC_FLIGHT_TYPE_CUSTOMER, 'customer_product', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?> |
|
80 | + <?php $form->select_produits($conf->global->BBC_FLIGHT_TYPE_CUSTOMER, 'customer_product', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?> |
|
81 | 81 | </td> |
82 | 82 | </tr> |
83 | 83 |
@@ -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')); |
@@ -93,7 +93,7 @@ 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>'; |
@@ -107,13 +107,13 @@ discard block |
||
107 | 107 | // Buttons |
108 | 108 | print '<div class="tabsAction">' . "\n"; |
109 | 109 | |
110 | -if($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()){ |
|
111 | - 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"; |
|
110 | +if ($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()) { |
|
111 | + 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"; |
|
112 | 112 | } |
113 | 113 | |
114 | 114 | print '</div>' . "\n"; |
115 | 115 | |
116 | -if($user->rights->flightlog->vol->financial){ |
|
116 | +if ($user->rights->flightlog->vol->financial) { |
|
117 | 117 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
118 | 118 | $form->showLinkedObjectBlock($object); |
119 | 119 | 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>'; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | private $pilot; |
87 | 87 | |
88 | 88 | /** |
89 | - * @return int |
|
89 | + * @return string |
|
90 | 90 | */ |
91 | 91 | public function getIdBBCVols() |
92 | 92 | { |
@@ -94,7 +94,7 @@ discard block |
||
94 | 94 | } |
95 | 95 | |
96 | 96 | /** |
97 | - * @return int |
|
97 | + * @return string |
|
98 | 98 | */ |
99 | 99 | public function getId() |
100 | 100 | { |
@@ -891,7 +891,7 @@ |
||
891 | 891 | */ |
892 | 892 | public function hasPax() |
893 | 893 | { |
894 | - return (int)$this->nbrPax > 0; |
|
894 | + return (int) $this->nbrPax > 0; |
|
895 | 895 | } |
896 | 896 | |
897 | 897 | /** |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 2 : Baptême") . '</td>'; |
156 | 156 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Organisateur (T1/T2)") . '</td>'; |
157 | 157 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Instructeur (orga T6)") . '</td>'; |
158 | - print '<td class="liste_titre" >' . $langs->trans("Total bonus") . '</td>'; |
|
158 | + print '<td class="liste_titre" >' . $langs->trans("Total bonus") . '</td>'; |
|
159 | 159 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 3 : Privé") . '</td>'; |
160 | 160 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 4: Meeting") . '</td>'; |
161 | 161 | print '<td class="liste_titre" colspan="1">' . $langs->trans("Type 5: Chambley") . '</td>'; |
@@ -259,7 +259,7 @@ discard block |
||
259 | 259 | print "<tr>"; |
260 | 260 | print "<td colspan='20'></td>"; |
261 | 261 | print "<td>Total à reçevoir</td>"; |
262 | - print "<td>".price($total)."€</td>"; |
|
262 | + print "<td>" . price($total) . "€</td>"; |
|
263 | 263 | print "</tr>"; |
264 | 264 | |
265 | 265 | print '</tbody>'; |