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