FIX id of user not saved when making a payment of expense report
This commit is contained in:
parent
4290be7ee6
commit
7b6e60077a
@ -520,18 +520,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)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user