From 6e4a3508e46c3bf8d3bcbe6633d0db6270cadcec Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 14 Jan 2005 20:55:20 +0000 Subject: [PATCH] Modif mineur sur ordre du code --- htdocs/compta/facture/note.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 12c6e25ca5b..7a549f7519d 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -46,24 +46,31 @@ if ($user->societe_id > 0) $socidp = $user->societe_id; } + + /******************************************************************************/ /* Actions */ /******************************************************************************/ if ($_POST["action"] == 'update' && $user->rights->facture->creer) { + + $facture = new Facture($db); $facture->fetch($_GET["facid"]); $facture->update_note($_POST["note"]); - } -llxHeader(); -$html = new Form($db); /******************************************************************************/ /* Fin des Actions */ /******************************************************************************/ + +llxHeader(); + +$html = new Form($db); + + if ($_GET["facid"]) { $facture = new Facture($db); @@ -114,7 +121,7 @@ if ($_GET["facid"]) print ''.$soc->nom.''; print ''.$langs->trans("Status").''.$facture->statut_libelle.''; - print 'Date'.strftime("%A %d %B %Y",$facture->date); + print ''.$langs->trans("Date").''.strftime("%A %d %B %Y",$facture->date); if ($facture->fin_validite) { print " (".strftime("%d %B %Y",$facture->fin_validite).")"; @@ -128,7 +135,7 @@ if ($_GET["facid"]) print ''.$langs->trans("Note").' :'; - print ''.nl2br($facture->note).""; + print ''.($facture->note?nl2br($facture->note):" ").""; if ($_GET["action"] == 'edit') {