Merge pull request #9374 from bafbes/abb80014

Fix: No link is shown to access for bank transfers.
This commit is contained in:
Laurent Destailleur 2018-09-01 13:36:08 +02:00 committed by GitHub
commit aa2655d604
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -147,6 +147,7 @@ $paymentsalstatic = new PaymentSalary($db);
$paymentexpensereportstatic = new PaymentExpenseReport($db);
$paymentvariousstatic = new PaymentVarious($db);
$paymentloanstatic = new PaymentLoan($db);
$accountLinestatic=new AccountLine($db);
// Get code of finance journal
$accountingjournalstatic = new AccountingJournal($db);
@ -370,7 +371,8 @@ if ($result) {
$tabpay[$obj->rowid]["paymentloanid"] = $paymentloanstatic->id;
//$tabtp[$obj->rowid][$account_pay_loan] += $obj->amount;
} else if ($links[$key]['type'] == 'banktransfert') {
$tabpay[$obj->rowid]["lib"] .= ' ' . $langs->trans("BankTransfer");
$accountLinestatic->fetch($links[$key]['url_id']);
$tabpay[$obj->rowid]["lib"] .= ' '.$langs->trans("BankTransfer").'- ' .$accountLinestatic ->getNomUrl(1);
$tabtp[$obj->rowid][$account_transfer] += $obj->amount;
$bankaccountstatic->fetch($tabpay[$obj->rowid]['fk_bank_account']);
$tabpay[$obj->rowid]["soclib"] = $bankaccountstatic->getNomUrl(2);