@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $isAllowedEdit = ($user->rights->flightlog->vol->edit || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id)); |
71 | 71 | $isAllowedDelete = ($user->rights->flightlog->vol->delete || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id && !$object->is_facture)); |
72 | -$permissiondellink=$user->rights->flightlog->vol->financial; |
|
72 | +$permissiondellink = $user->rights->flightlog->vol->financial; |
|
73 | 73 | |
74 | 74 | $search_idBBC_vols = GETPOST('search_idBBC_vols', 'int'); |
75 | 75 | $search_lieuD = GETPOST('search_lieuD', 'alpha'); |
@@ -116,8 +116,8 @@ discard block |
||
116 | 116 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
117 | 117 | |
118 | 118 | // Load object |
119 | -include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
120 | -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; |
|
119 | +include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals |
|
120 | +include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; |
|
121 | 121 | |
122 | 122 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
123 | 123 | $hookmanager->initHooks(array('bbcvols')); |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | |
143 | 143 | $parameters = array(); |
144 | 144 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, |
145 | - $action); // Note that $action and $object may have been modified by some hooks |
|
145 | + $action); // Note that $action and $object may have been modified by some hooks |
|
146 | 146 | if ($reshook < 0) { |
147 | 147 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
148 | 148 | } |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | print '<div class="tabsAction">' . "\n"; |
377 | 377 | $parameters = array(); |
378 | 378 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, |
379 | - $action); // Note that $action and $object may have been modified by hook |
|
379 | + $action); // Note that $action and $object may have been modified by hook |
|
380 | 380 | if ($reshook < 0) { |
381 | 381 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
382 | 382 | } |
@@ -389,14 +389,14 @@ discard block |
||
389 | 389 | print '<div class="inline-block divButAction"><a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete">' . $langs->trans('Delete') . '</a></div>' . "\n"; |
390 | 390 | } |
391 | 391 | |
392 | - if($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()){ |
|
393 | - 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"; |
|
392 | + if ($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()) { |
|
393 | + 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"; |
|
394 | 394 | } |
395 | 395 | ?> |
396 | 396 | |
397 | - <?php if($user->rights->flightlog->vol->financial && !$object->isBilled() ): ?> |
|
397 | + <?php if ($user->rights->flightlog->vol->financial && !$object->isBilled()): ?> |
|
398 | 398 | <div class="inline-block divButAction"> |
399 | - <a class="butAction" href="<?php echo sprintf('%s?id=%s&action=%s' , $_SERVER["PHP_SELF"], $object->id, ACTION_FLAG_BILLED);?>"> |
|
399 | + <a class="butAction" href="<?php echo sprintf('%s?id=%s&action=%s', $_SERVER["PHP_SELF"], $object->id, ACTION_FLAG_BILLED); ?>"> |
|
400 | 400 | <?php echo $langs->trans("Marqué comme facturé ") ?> |
401 | 401 | </a> |
402 | 402 | </div> |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | |
405 | 405 | </div> |
406 | 406 | <?php |
407 | - if($user->rights->flightlog->vol->financial){ |
|
407 | + if ($user->rights->flightlog->vol->financial) { |
|
408 | 408 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
409 | 409 | $form->showLinkedObjectBlock($object); |
410 | 410 | print '</div></div>'; |
@@ -347,7 +347,7 @@ |
||
347 | 347 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DeleteMyOjbect'), |
348 | 348 | $langs->trans('êtes-vous sure de vouloir supprimer ce vol ?'), 'confirm_delete', '', 0, 1); |
349 | 349 | print $formconfirm; |
350 | - }elseif ($user->rights->flightlog->vol->financial && !$object->isBilled() && $action == ACTION_FLAG_BILLED) { |
|
350 | + } elseif ($user->rights->flightlog->vol->financial && !$object->isBilled() && $action == ACTION_FLAG_BILLED) { |
|
351 | 351 | $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('Marque comme facturé'), |
352 | 352 | $langs->trans('Ce vol va être marqué comme facturé, est-ce bien le cas ?'), ACTION_CONFIRM_FLAG_BILLED, '', 0, 1); |
353 | 353 | print $formconfirm; |