From 363b286df3ced24bf5a682b5d2fd2f0088d4709a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 8 Feb 2006 17:14:10 +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 | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) 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 "".$langs->trans("Propal")." PDF"; - print ''.$propal->ref.'.pdf'; + print ''.$commande->ref.'.pdf'; print ''.filesize($file). ' bytes'; print ''.strftime("%d %b %Y %H:%M:%S",filemtime($file)).''; print ''; // Si fichier detail PDF existe - if (file_exists($filedetail)) { // propal détaillée supplémentaire - print "Propal détaillée"; + if (file_exists($filedetail)) { // commande détaillée supplémentaire + print "Commande détaillée"; - print ''.$propal->ref.'-detail.pdf'; + print ''.$commande->ref.'-detail.pdf'; print ''.filesize($filedetail). ' bytes'; print ''.strftime("%d %b %Y %H:%M:%S",filemtime($filedetail)).''; print ''; @@ -284,7 +285,7 @@ if ($_GET["id"] > 0) { // ligne 5 // partie Gauche print ''.$langs->trans('AmountHT').''; - print ''.price($propal->price).''; + print ''.price($commande->price).''; print ''.$langs->trans("Currency".$conf->monnaie).''; print ''; } @@ -293,7 +294,7 @@ if ($_GET["id"] > 0) { } } else { // Propal non trouvée - print $langs->trans("ErrorPropalNotFound",$_GET["propalid"]); + print $langs->trans("ErrorPropalNotFound",$_GET["id"]); } }