diff --git a/htdocs/accountancy/bookkeeping/list.php b/htdocs/accountancy/bookkeeping/list.php index b3cec7710a4..ebd768de1dc 100644 --- a/htdocs/accountancy/bookkeeping/list.php +++ b/htdocs/accountancy/bookkeeping/list.php @@ -937,6 +937,11 @@ while ($i < min($num, $limit)) $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); + } elseif ($line->doc_type == 'bank') + { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $objectstatic = new AccountLine($db); + $objectstatic->fetch($line->fk_doc); } else { // Other type } @@ -951,6 +956,10 @@ while ($i < min($num, $limit)) { print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); print $documentlink; + } elseif ($line->doc_type == 'bank') { + print $objectstatic->getNomUrl(1); + $bank_ref = strstr($line->doc_ref, '-'); + print " " . $bank_ref; } else { print $line->doc_ref; } diff --git a/htdocs/accountancy/bookkeeping/listbyaccount.php b/htdocs/accountancy/bookkeeping/listbyaccount.php index 0b063adb1ff..5ee0989c97c 100644 --- a/htdocs/accountancy/bookkeeping/listbyaccount.php +++ b/htdocs/accountancy/bookkeeping/listbyaccount.php @@ -667,6 +667,11 @@ while ($i < min($num, $limit)) $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); + } elseif ($line->doc_type == 'bank') + { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $objectstatic = new AccountLine($db); + $objectstatic->fetch($line->fk_doc); } else { // Other type } @@ -681,6 +686,10 @@ while ($i < min($num, $limit)) { print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); print $documentlink; + } elseif ($line->doc_type == 'bank') { + print $objectstatic->getNomUrl(1); + $bank_ref = strstr($line->doc_ref, '-'); + print " " . $bank_ref; } else { print $line->doc_ref; } diff --git a/htdocs/accountancy/bookkeeping/listbysubaccount.php b/htdocs/accountancy/bookkeeping/listbysubaccount.php index 2bdf5e11d09..e54d20cd647 100644 --- a/htdocs/accountancy/bookkeeping/listbysubaccount.php +++ b/htdocs/accountancy/bookkeeping/listbysubaccount.php @@ -679,6 +679,11 @@ while ($i < min($num, $limit)) $filedir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($line->doc_ref); $urlsource = $_SERVER['PHP_SELF'].'?id='.$objectstatic->id; $documentlink = $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir); + } elseif ($line->doc_type == 'bank') + { + require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; + $objectstatic = new AccountLine($db); + $objectstatic->fetch($line->fk_doc); } else { // Other type } @@ -693,6 +698,10 @@ while ($i < min($num, $limit)) { print $objectstatic->getNomUrl(1, '', 0, 0, '', 0, -1, 1); print $documentlink; + } elseif ($line->doc_type == 'bank') { + print $objectstatic->getNomUrl(1); + $bank_ref = strstr($line->doc_ref, '-'); + print " " . $bank_ref; } else { print $line->doc_ref; }