diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php
index 668bf22104e..aa68fdeb698 100644
--- a/htdocs/core/modules/modProjet.class.php
+++ b/htdocs/core/modules/modProjet.class.php
@@ -216,29 +216,6 @@ class modProjet extends DolibarrModules
$this->export_label[$r]='ProjectsAndTasksLines'; // Translation key (used only if key ExportDataset_xxx_z not found)
$this->export_permission[$r]=array(array("projet","export"));
$this->export_dependencies_array[$r]=array('projecttask'=>'pt.rowid', 'task_time'=>'ptt.rowid');
-/*
- if (!empty($conf->global->PROJECT_USE_OPPORTUNITIES))
- {
- print ' ';
- $htmltext = $langs->trans("ProjectFollowOpportunity");
- print $form->textwithpicto($langs->trans("ProjectFollowOpportunity"), $htmltext);
- print '
';
- }
- if (empty($conf->global->PROJECT_HIDE_TASKS))
- {
- print ' ';
- $htmltext = $langs->trans("ProjectFollowTasks");
- print $form->textwithpicto($langs->trans("ProjectFollowTasks"), $htmltext);
- print '
';
- }
- if (!empty($conf->global->PROJECT_BILL_TIME_SPENT))
- {
- print ' ';
- $htmltext = $langs->trans("ProjectBillTimeDescription");
- print $form->textwithpicto($langs->trans("BillTime"), $htmltext);
- print '
';
- }
-*/
$this->export_TypeFields_array[$r]=array(
's.rowid'=>"List:societe:nom::thirdparty",'s.nom'=>'Text','s.address'=>'Text','s.zip'=>'Text','s.town'=>'Text','s.fk_pays'=>'List:c_country:label',
diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php
index 050c892abb5..af70ce966d2 100644
--- a/htdocs/user/bank.php
+++ b/htdocs/user/bank.php
@@ -147,7 +147,7 @@ if ($action == 'update' && !$cancel)
* View
*/
-$form = new Form($db);
+$childids = $user->getAllChildIds(1);
llxHeader(null, $langs->trans("BankAccounts"));
@@ -286,10 +286,10 @@ if ($action != 'edit' && $action != 'create') // If not bank account yet, $acco
$MAXLIST = $conf->global->MAIN_SIZE_SHORTLIST_LIMIT;
/*
- * Last salaries
+ * Latest salary payments
*/
if (!empty($conf->salaries->enabled) &&
- (($object->fk_user == $user->id) || ($user->rights->salaries->read && $object->id == $user->id))
+ $user->rights->salaries->read && (in_array($object->id, $childids) || $object->id == $user->id)
)
{
$salary = new PaymentSalary($db);