diff --git a/htdocs/commande/apercu.php b/htdocs/commande/apercu.php
index db8205f9c79b1bb0bc306e8c2d80ad217c1c03d2..fa14828b4670127f81b7618a9fe3ae0e219a349c 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');
@@ -122,7 +123,7 @@ if ($_GET["id"] > 0) {
 		$sql = 'SELECT s.nom, s.idp, p.price, p.fk_projet, p.remise, p.tva, p.total, p.ref, p.fk_statut, '.$db->pdate('p.datep').' as dp, p.note,';
 		$sql.= ' x.firstname, x.name, x.fax, x.phone, x.email, p.fk_user_author, p.fk_user_valid, p.fk_user_cloture, p.datec, p.date_valid, p.date_cloture';
 		$sql.= ' FROM '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'propal as p, '.MAIN_DB_PREFIX.'socpeople as x';
-		$sql.= ' WHERE p.fk_soc = s.idp AND p.fk_soc_contact = x.idp AND p.rowid = '.$propal->id;
+		$sql.= ' WHERE p.fk_soc = s.idp AND p.fk_soc_contact = x.idp AND p.rowid = '.$commande->id;
 		if ($socidp) $sql .= ' AND s.idp = '.$socidp;
 
 		$result = $db->query($sql);
diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php
index bc0f492f5ee7c47d7fdc6ac50456da78ba5b9dda..f79646cda6701a02bb1946537757a9a94a9c11c4 100644
--- a/htdocs/commande/info.php
+++ b/htdocs/commande/info.php
@@ -1,5 +1,6 @@
 <?php
-/* Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2005      Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2005-2006 Regis Houssin        <regis.houssin@cap-networks.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -68,7 +69,14 @@ $h = 0;
     	  $head[$h][0] = DOL_URL_ROOT.'/compta/commande/fiche.php?id='.$commande->id;
     	  $head[$h][1] = $langs->trans("ComptaCard");
     	  $h++;
-        }
+      }
+        
+    if ($conf->use_preview_tabs)
+		  {
+    		$head[$h][0] = DOL_URL_ROOT.'/commande/apercu.php?id='.$commande->id;
+    		$head[$h][1] = $langs->trans("Preview");
+    		$h++;
+      }
  
       $head[$h][0] = DOL_URL_ROOT.'/commande/info.php?id='.$commande->id;
       $head[$h][1] = $langs->trans("Info");
diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php
index 54efa592fcf3fd804a9e02a080558bac84b56e6e..5d5a677243fae4db3538fab3812942889909aa7e 100644
--- a/htdocs/compta/commande/fiche.php
+++ b/htdocs/compta/commande/fiche.php
@@ -1,6 +1,7 @@
 <?php
 /* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2005-2006 Regis Houssin        <regis.houssin@cap-networks.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -109,6 +110,13 @@ if ($_GET["id"] > 0)
             $hselected = $h;
             $h++;
         }
+        
+        if ($conf->use_preview_tabs)
+		    {
+    		$head[$h][0] = DOL_URL_ROOT.'/commande/apercu.php?id='.$commande->id;
+    		$head[$h][1] = $langs->trans("Preview");
+    		$h++;
+        }
 
         $head[$h][0] = DOL_URL_ROOT.'/commande/info.php?id='.$commande->id;
         $head[$h][1] = $langs->trans("Info");
diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php
index f048044733af473f46d734c2231e52698bd346c0..d200d73331e452576f4e22ea2c7174bb5a38477a 100644
--- a/htdocs/expedition/commande.php
+++ b/htdocs/expedition/commande.php
@@ -1,6 +1,7 @@
 <?php
-/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
- * Copyright (C) 2005 Laurent Destailleur  <eldy@users.sourceforge.net>
+/* Copyright (C) 2003      Rodolphe Quiedeville <rodolphe@quiedeville.org>
+ * Copyright (C) 2005      Laurent Destailleur  <eldy@users.sourceforge.net>
+ * Copyright (C) 2005-2006 Regis Houssin        <regis.houssin@cap-networks.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -108,6 +109,13 @@ if ($_GET["id"] > 0)
             $head[$h][1] = $langs->trans("ComptaCard");
             $h++;
         }
+        
+        if ($conf->use_preview_tabs)
+		    {
+    		$head[$h][0] = DOL_URL_ROOT.'/commande/apercu.php?id='.$commande->id;
+    		$head[$h][1] = $langs->trans("Preview");
+    		$h++;
+        }
 
         $head[$h][0] = DOL_URL_ROOT.'/commande/info.php?id='.$commande->id;
         $head[$h][1] = $langs->trans("Info");