NEW 10.0: link to template of origin in bill cards for bills created from a template

This commit is contained in:
Florian Mortgat 2019-12-06 13:48:24 +01:00
parent 21a0e962ad
commit 6227d14cf3

View File

@ -3817,9 +3817,14 @@ elseif ($id > 0 || ! empty($ref))
if ($object->fk_fac_rec_source > 0)
{
$tmptemplate = new FactureRec($db);
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
if ($result > 0) print '. '.$langs->trans("GeneratedFromTemplate", $tmptemplate->ref);
$tmptemplate = new FactureRec($db);
$result = $tmptemplate->fetch($object->fk_fac_rec_source);
if ($result > 0) {
print '. '.$langs->trans(
"GeneratedFromTemplate",
'<a href="'.DOL_MAIN_URL_ROOT.'/compta/facture/fiche-rec.php?facid='.$tmptemplate->id.'">'.$tmptemplate->ref.'</a>'
);
}
}
print '</td></tr>';