From 6227d14cf3e501f4784e30b6e5ac23cf220465db Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Fri, 6 Dec 2019 13:48:24 +0100 Subject: [PATCH] NEW 10.0: link to template of origin in bill cards for bills created from a template --- htdocs/compta/facture/card.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index 9cb76a2f292..d320105ae2a 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -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", + ''.$tmptemplate->ref.'' + ); + } } print '';