Merge branch '5.0' of git@github.com:Dolibarr/dolibarr.git into 6.0

Conflicts:
	htdocs/expensereport/payment/payment.php
This commit is contained in:
Laurent Destailleur 2017-07-08 21:54:37 +02:00
commit 9d0cb07ff9
2 changed files with 22 additions and 22 deletions

View File

@ -547,18 +547,18 @@ class PaymentExpenseReport extends CommonObject
// Add link 'user' in bank_url between user and bank transaction // Add link 'user' in bank_url between user and bank transaction
if (! $error) if (! $error)
{ {
foreach ($this->amounts as $key => $value) // We should have always same third party but we loop in case of. foreach ($this->amounts as $key => $value) // We should have always same user but we loop in case of.
{ {
if ($mode == 'payment_expensereport') if ($mode == 'payment_expensereport')
{ {
$er = new ExpenseReport($this->db); $fuser = new User($this->db);
$er->fetch($key); $fuser->fetch($key);
$er->fetch_user($er->fk_user_author);
$result=$acc->add_url_line( $result=$acc->add_url_line(
$bank_line_id, $bank_line_id,
$er->user->id, $fuser->id,
DOL_URL_ROOT.'/user/card.php?id=', DOL_URL_ROOT.'/user/card.php?id=',
$er->user->getFullName($langs), $fuser->getFullName($langs),
'user' 'user'
); );
if ($result <= 0) if ($result <= 0)