Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0

Conflicts:
	htdocs/core/class/commonobject.class.php
This commit is contained in:
Laurent Destailleur 2022-06-13 13:32:11 +02:00
commit 12ee8eb40b
2 changed files with 14 additions and 2 deletions

View File

@ -305,8 +305,16 @@ if ($result) {
// get_url may return -1 which is not traversable
if (is_array($links) && count($links) > 0) {
$is_sc = false;
foreach ($links as $v) {
if ($v['type'] == 'sc') {
$is_sc = true;
break;
}
}
// Now loop on each link of record in bank (code similar to bankentries_list.php)
foreach ($links as $key => $val) {
if ($links[$key]['type'] == 'user' && !$is_sc) continue;
if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport', 'banktransfert', 'payment_donation', 'member', 'payment_loan', 'payment_salary', 'payment_various'))) {
// So we excluded 'company' and 'user' here. We want only payment lines

View File

@ -564,8 +564,12 @@ while ($i < min($num, $limit)) {
// Bank transaction
if (!empty($arrayfields['transaction']['checked'])) {
$bankline->fetch($objp->fk_bank);
print '<td>'.$bankline->getNomUrl(1, 0).'</td>';
print '<td>';
if ($objp->fk_bank > 0) {
$bankline->fetch($objp->fk_bank);
print $bankline->getNomUrl(1, 0);
}
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}