@@ -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 | |
@@ -152,7 +152,7 @@ discard block |
||
| 152 | 152 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 1 : Sponsor") . '</td>'; |
| 153 | 153 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 2 : Baptême") . '</td>'; |
| 154 | 154 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Organisateur (T1/T2)") . '</td>'; |
| 155 | - print '<td class="liste_titre" >' . $langs->trans("Total bonus") . '</td>'; |
|
| 155 | + print '<td class="liste_titre" >' . $langs->trans("Total bonus") . '</td>'; |
|
| 156 | 156 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 3 : Privé") . '</td>'; |
| 157 | 157 | print '<td class="liste_titre" colspan="2">' . $langs->trans("Type 4: Meeting") . '</td>'; |
| 158 | 158 | print '<td class="liste_titre" colspan="1">' . $langs->trans("Type 5: Chambley") . '</td>'; |
@@ -250,7 +250,7 @@ discard block |
||
| 250 | 250 | print "<tr>"; |
| 251 | 251 | print "<td colspan='18'></td>"; |
| 252 | 252 | print "<td>Total à reçevoir</td>"; |
| 253 | - print "<td>".price($total)."€</td>"; |
|
| 253 | + print "<td>" . price($total) . "€</td>"; |
|
| 254 | 254 | print "</tr>"; |
| 255 | 255 | |
| 256 | 256 | |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $adherent = new Adherent($db); |
| 110 | 110 | $adherent->fetch($expenseNoteUser->fk_member); |
| 111 | 111 | |
| 112 | - $addBonus = (int)$additionalBonus[$currentMissionUserId]; |
|
| 112 | + $addBonus = (int) $additionalBonus[$currentMissionUserId]; |
|
| 113 | 113 | if ($addBonus < 0) { |
| 114 | 114 | dol_htmloutput_mesg("Facture ignorée " . $adherent->getFullName($langs), '', 'warning'); |
| 115 | 115 | continue; |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | $object->insert_discount($discountid); |
| 336 | 336 | |
| 337 | 337 | //Additional bonus |
| 338 | - if ((int)$addBonus > 0) { |
|
| 338 | + if ((int) $addBonus > 0) { |
|
| 339 | 339 | |
| 340 | 340 | $pu_ht = price2num($addBonus, 'MU'); |
| 341 | 341 | |
@@ -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 | |
@@ -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 | } |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | <tr class="<?= $flightTypeLine->id % 2 == 0 ? "pair" : "impair" ?>"> |
| 64 | 64 | <td>(T<?= $flightTypeLine->numero ?>) - <?= $flightTypeLine->nom ?></td> |
| 65 | 65 | <td> |
| 66 | - <?php $form->select_produits($flightTypeLine->fkService, 'idprod['.$flightTypeLine->id.']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(),$buyer->id); ?> |
|
| 66 | + <?php $form->select_produits($flightTypeLine->fkService, 'idprod[' . $flightTypeLine->id . ']', $filtertype, $conf->product->limit_size, $buyer->price_level, 1, 2, '', 1, array(), $buyer->id); ?> |
|
| 67 | 67 | </td> |
| 68 | 68 | </tr> |
| 69 | 69 | <?php endforeach; ?> |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
| 60 | 60 | |
| 61 | 61 | // Load object |
| 62 | -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 |
|
| 62 | +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 |
|
| 63 | 63 | |
| 64 | 64 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
| 65 | 65 | $hookmanager->initHooks(array('bbcvols')); |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | print '<div class="tabsAction">' . "\n"; |
| 99 | 99 | print '</div>' . "\n"; |
| 100 | 100 | |
| 101 | -if($user->rights->flightLog->vol->financial){ |
|
| 101 | +if ($user->rights->flightLog->vol->financial) { |
|
| 102 | 102 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 103 | 103 | $form->showLinkedObjectBlock($object); |
| 104 | 104 | print '</div></div>'; |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
| 112 | 112 | |
| 113 | 113 | // Load object |
| 114 | -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 |
|
| 114 | +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 |
|
| 115 | 115 | |
| 116 | 116 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
| 117 | 117 | $hookmanager->initHooks(array('bbcvols')); |
@@ -130,7 +130,7 @@ discard block |
||
| 130 | 130 | |
| 131 | 131 | $parameters = array(); |
| 132 | 132 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, |
| 133 | - $action); // Note that $action and $object may have been modified by some hooks |
|
| 133 | + $action); // Note that $action and $object may have been modified by some hooks |
|
| 134 | 134 | if ($reshook < 0) { |
| 135 | 135 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 136 | 136 | } |
@@ -480,7 +480,7 @@ discard block |
||
| 480 | 480 | print '<div class="tabsAction">' . "\n"; |
| 481 | 481 | $parameters = array(); |
| 482 | 482 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, |
| 483 | - $action); // Note that $action and $object may have been modified by hook |
|
| 483 | + $action); // Note that $action and $object may have been modified by hook |
|
| 484 | 484 | if ($reshook < 0) { |
| 485 | 485 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 486 | 486 | } |
@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | } |
| 495 | 495 | print '</div>' . "\n"; |
| 496 | 496 | |
| 497 | - if($user->rights->flightLog->vol->financial){ |
|
| 497 | + if ($user->rights->flightLog->vol->financial) { |
|
| 498 | 498 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 499 | 499 | $form->showLinkedObjectBlock($object); |
| 500 | 500 | print '</div></div>'; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
| 60 | 60 | |
| 61 | 61 | // Load object |
| 62 | -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 |
|
| 62 | +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 |
|
| 63 | 63 | |
| 64 | 64 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
| 65 | 65 | $hookmanager->initHooks(array('bbcvols')); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | print '<tr><td class="fieldrequired">' . $langs->trans("Fielddate") . '</td><td>' . dol_print_date($object->date) . '</td></tr>'; |
| 90 | 90 | |
| 91 | 91 | if ($user->rights->flightLog->vol->financial) { |
| 92 | - print '<tr><td class="fieldrequired">' . $langs->trans("Fieldis_facture") . '</td><td>' . $object->getLibStatut(5). '</td></tr>'; |
|
| 92 | + print '<tr><td class="fieldrequired">' . $langs->trans("Fieldis_facture") . '</td><td>' . $object->getLibStatut(5) . '</td></tr>'; |
|
| 93 | 93 | } |
| 94 | 94 | |
| 95 | 95 | print '<tr><td class="fieldrequired">' . $langs->trans("Fieldkilometers") . '</td><td>' . $object->kilometers . ' KM</td></tr>'; |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | print '<div class="tabsAction">' . "\n"; |
| 105 | 105 | print '</div>' . "\n"; |
| 106 | 106 | |
| 107 | -if($user->rights->flightLog->vol->financial){ |
|
| 107 | +if ($user->rights->flightLog->vol->financial) { |
|
| 108 | 108 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 109 | 109 | $form->showLinkedObjectBlock($object); |
| 110 | 110 | print '</div></div>'; |
@@ -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(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(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 |