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 '';