Merge pull request #10945 from aspangaro/7_p1

FIX: Don't show accountingjournal:getNomUrl without data
This commit is contained in:
Laurent Destailleur 2019-03-31 18:49:50 +02:00 committed by GitHub
commit f671b8bce7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -637,11 +637,12 @@ else
print '<tr><td>'.$langs->trans("AccountancyJournal").'</td>';
print '<td>';
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($object->fk_accountancy_journal);
print $accountingjournal->getNomUrl(0,1,1,'',1);
if ($object->fk_accountancy_journal > 0) {
$accountingjournal = new AccountingJournal($db);
$accountingjournal->fetch($object->fk_accountancy_journal);
print $accountingjournal->getNomUrl(0, 1, 1, '', 1);
}
print '</td></tr>';
}