From 7c8b252b66ddd67d982db564a08a6ba014d2f641 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 7 Dec 2005 02:40:37 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Si=20facture=20n'a=20pas=20d'auteur=20de?= =?UTF-8?q?=20renseign=E9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/compta/facture/apercu.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/facture/apercu.php b/htdocs/compta/facture/apercu.php index 3a726067290..5252343a0d5 100644 --- a/htdocs/compta/facture/apercu.php +++ b/htdocs/compta/facture/apercu.php @@ -67,16 +67,20 @@ if ($_GET["facid"] > 0) $soc = new Societe($db, $fac->socidp); $soc->fetch($fac->socidp); $author = new User($db); - $author->id = $fac->user_author; - $author->fetch(); - $head = facture_prepare_head($fac); - $hselected = $conf->use_preview_tabs ? 2 : false; + if ($fac->user_author) + { + $author->id = $fac->user_author; + $author->fetch(); + } + + $head = facture_prepare_head($fac); + $hselected = $conf->use_preview_tabs ? 2 : false; dolibarr_fiche_head($head, $hselected, $langs->trans("Bill")." : $fac->ref"); /* - * Facture - */ + * Facture + */ print ''; $rowspan=3;