diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php index 7850300d6bd..f43470b7fa9 100644 --- a/htdocs/commande/apercu.php +++ b/htdocs/commande/apercu.php @@ -40,6 +40,7 @@ if (!$user->rights->commande->lire) $langs->load('propal'); $langs->load("bills"); $langs->load('compta'); +$langs->load('sendings'); require_once(DOL_DOCUMENT_ROOT.'/commande/commande.class.php'); @@ -206,15 +207,15 @@ if ($_GET["id"] > 0) { /* * Documents */ - $propalref = sanitize_string($propal->ref); - $file = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . ".pdf"; - $filedetail = $conf->propal->dir_output . "/" . $propalref . "/" . $propalref . "-detail.pdf"; - $relativepath = "${propalref}/${propalref}.pdf"; - $relativepathdetail = "${propalref}/${propalref}-detail.pdf"; + $commanderef = sanitize_string($commande->ref); + $file = $conf->commande->dir_output . "/" . $commanderef . "/" . $commanderef . ".pdf"; + $filedetail = $conf->commande->dir_output . "/" . $commanderef . "/" . $commanderef . "-detail.pdf"; + $relativepath = "${commanderef}/${commanderef}.pdf"; + $relativepathdetail = "${commanderef}/${commanderef}-detail.pdf"; // Chemin vers png aperçus - $relativepathimage = "${propalref}/${propalref}.pdf.png"; - $relativepathimagebis = "${propalref}/${propalref}.pdf.png.0"; + $relativepathimage = "${commanderef}/${commanderef}.pdf.png"; + $relativepathimagebis = "${commanderef}/${commanderef}.pdf.png.0"; $fileimage = $file.".png"; // Si PDF d'1 page $fileimagebis = $file.".png.0"; // Si PDF de plus d'1 page @@ -229,16 +230,16 @@ if ($_GET["id"] > 0) { print "