From 64a28131775adbec1047126a1f1c82ae16c8737b Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 8 Feb 2006 17:54:53 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20onglet=20aper=E7u=20sur=20la=20fiche=20?= =?UTF-8?q?commande=20client?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/commande/apercu.php | 10 +++++----- htdocs/viewimage.php | 11 +++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index edeb68a706e..5867ac53566 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -230,7 +230,7 @@ if ($_GET["id"] > 0) { print "".$langs->trans("Propal")." PDF"; - print ''.$commande->ref.'.pdf'; + print ''.$commande->ref.'.pdf'; print ''.filesize($file). ' bytes'; print ''.strftime("%d %b %Y %H:%M:%S",filemtime($file)).''; print ''; @@ -239,7 +239,7 @@ if ($_GET["id"] > 0) { if (file_exists($filedetail)) { // commande détaillée supplémentaire print "Commande détaillée"; - print ''.$commande->ref.'-detail.pdf'; + print ''.$commande->ref.'-detail.pdf'; print ''.filesize($filedetail). ' bytes'; print ''.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).''; print ''; @@ -293,7 +293,7 @@ if ($_GET["id"] > 0) { dolibarr_print_error($db); } } else { - // Propal non trouvée + // Commande non trouvée print $langs->trans("ErrorPropalNotFound",$_GET["id"]); } } @@ -301,12 +301,12 @@ if ($_GET["id"] > 0) { // Si fichier png PDF d'1 page trouvé if (file_exists($fileimage)) { - print ''; + print ''; } // Si fichier png PDF de plus d'1 page trouvé elseif (file_exists($fileimagebis)) { - print ''; + print ''; } diff --git a/htdocs/viewimage.php b/htdocs/viewimage.php index abe0e14a516..527c2b01d12 100644 --- a/htdocs/viewimage.php +++ b/htdocs/viewimage.php @@ -80,6 +80,17 @@ if ($modulepart) } $original_file=$conf->propal->dir_output.'/'.$original_file; } + + // Wrapping pour les apercu commande + if ($modulepart == 'apercucommande') + { + $user->getrights('commande'); + if ($user->rights->commande->lire) + { + $accessallowed=1; + } + $original_file=$conf->commande->dir_output.'/'.$original_file; + } // Wrapping pour les images des stats propales if ($modulepart == 'propalstats')