@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | |
| 67 | 67 | $isAllowedEdit = ($user->rights->flightlog->vol->edit || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id)); |
| 68 | 68 | $isAllowedDelete = ($user->rights->flightlog->vol->delete || ($user->rights->flightlog->vol->add && $object->fk_pilot == $user->id && !$object->is_facture)); |
| 69 | -$permissiondellink=$user->rights->flightlog->vol->financial; |
|
| 69 | +$permissiondellink = $user->rights->flightlog->vol->financial; |
|
| 70 | 70 | |
| 71 | 71 | $search_idBBC_vols = GETPOST('search_idBBC_vols', 'int'); |
| 72 | 72 | $search_lieuD = GETPOST('search_lieuD', 'alpha'); |
@@ -113,8 +113,8 @@ discard block |
||
| 113 | 113 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
| 114 | 114 | |
| 115 | 115 | // Load object |
| 116 | -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 |
|
| 117 | -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; |
|
| 116 | +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 |
|
| 117 | +include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; |
|
| 118 | 118 | |
| 119 | 119 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
| 120 | 120 | $hookmanager->initHooks(array('bbcvols')); |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | |
| 140 | 140 | $parameters = array(); |
| 141 | 141 | $reshook = $hookmanager->executeHooks('doActions', $parameters, $object, |
| 142 | - $action); // Note that $action and $object may have been modified by some hooks |
|
| 142 | + $action); // Note that $action and $object may have been modified by some hooks |
|
| 143 | 143 | if ($reshook < 0) { |
| 144 | 144 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 145 | 145 | } |
@@ -477,7 +477,7 @@ discard block |
||
| 477 | 477 | print '<div class="tabsAction">' . "\n"; |
| 478 | 478 | $parameters = array(); |
| 479 | 479 | $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, |
| 480 | - $action); // Note that $action and $object may have been modified by hook |
|
| 480 | + $action); // Note that $action and $object may have been modified by hook |
|
| 481 | 481 | if ($reshook < 0) { |
| 482 | 482 | setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); |
| 483 | 483 | } |
@@ -490,13 +490,13 @@ discard block |
||
| 490 | 490 | print '<div class="inline-block divButAction"><a class="butActionDelete" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete">' . $langs->trans('Delete') . '</a></div>' . "\n"; |
| 491 | 491 | } |
| 492 | 492 | |
| 493 | - if($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()){ |
|
| 494 | - 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"; |
|
| 493 | + if ($user->rights->flightlog->vol->financial && $object->fk_type == 2 && !$object->hasFacture()) { |
|
| 494 | + 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"; |
|
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | print '</div>' . "\n"; |
| 498 | 498 | |
| 499 | - if($user->rights->flightlog->vol->financial){ |
|
| 499 | + if ($user->rights->flightlog->vol->financial) { |
|
| 500 | 500 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 501 | 501 | $form->showLinkedObjectBlock($object); |
| 502 | 502 | 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>'; |
@@ -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>'; |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | $id = GETPOST('id', 'int') ?: GETPOST('idBBC_vols', 'int'); |
| 44 | 44 | $action = GETPOST('action', 'alpha'); |
| 45 | -$permissiondellink=$user->rights->flightlog->vol->financial; |
|
| 45 | +$permissiondellink = $user->rights->flightlog->vol->financial; |
|
| 46 | 46 | |
| 47 | 47 | $object = new Bbcvols($db); |
| 48 | 48 | $extrafields = new ExtraFields($db); |
@@ -61,8 +61,8 @@ discard block |
||
| 61 | 61 | $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); |
| 62 | 62 | |
| 63 | 63 | // Load object |
| 64 | -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 |
|
| 65 | -include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; |
|
| 64 | +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 |
|
| 65 | +include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; |
|
| 66 | 66 | |
| 67 | 67 | // Initialize technical object to manage hooks of modules. Note that conf->hooks_modules contains array array |
| 68 | 68 | $hookmanager->initHooks(array('bbcvols')); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | print '<div class="tabsAction">' . "\n"; |
| 98 | 98 | print '</div>' . "\n"; |
| 99 | 99 | |
| 100 | -if($user->rights->flightlog->vol->financial){ |
|
| 100 | +if ($user->rights->flightlog->vol->financial) { |
|
| 101 | 101 | print '<div class="fichecenter"><div class="fichehalfleft">'; |
| 102 | 102 | $form->showLinkedObjectBlock($object); |
| 103 | 103 | print '</div></div>'; |