diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php
index 9e0ef94cd8395064143da39fe6e64952edba4f6b..cbc220db2a3d6eba0755e27da67ac7897ec1e016 100644
--- a/htdocs/commande/commande.class.php
+++ b/htdocs/commande/commande.class.php
@@ -126,7 +126,7 @@ class Commande extends CommonObject
 	$this->lines[$i] = $CommLigne;
       }
 
-    $this->socid               = $propal->socid;
+    $this->socid                = $propal->socid;
     $this->projetid             = $propal->projetidp;
     $this->cond_reglement_id    = $propal->cond_reglement_id;
     $this->mode_reglement_id    = $propal->mode_reglement_id;
@@ -134,6 +134,8 @@ class Commande extends CommonObject
     $this->adresse_livraison_id = $propal->adresse_livraison_id;
     $this->contact_id           = $propal->contactid;
     $this->ref_client           = $propal->ref_client;
+    $this->note                 = $propal->note;
+    $this->note_public          = $propal->note_public;
     
     /* D�finit la soci�t� comme un client */
     $soc = new Societe($this->db);
@@ -406,13 +408,14 @@ class Commande extends CommonObject
     $this->db->begin();
     
     $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'commande (';
-    $sql.= 'fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note_public, ref_client,';
+    $sql.= 'fk_soc, date_creation, fk_user_author, fk_projet, date_commande, source, note, note_public, ref_client,';
     $sql.= ' model_pdf, fk_cond_reglement, fk_mode_reglement, date_livraison, fk_adresse_livraison,';
     $sql.= ' remise_absolue, remise_percent)';
     $sql.= ' VALUES ('.$this->socid.', now(), '.$user->id.', '.$this->projetid.',';
     $sql.= ' '.$this->db->idate($this->date_commande).',';
     $sql.= ' '.$this->source.', ';
     $sql.= " '".addslashes($this->note)."', ";
+    $sql.= " '".addslashes($this->note_public)."', ";
     $sql.= " '".addslashes($this->ref_client)."', '".$this->modelpdf."', '".$this->cond_reglement_id."', '".$this->mode_reglement_id."',";
     $sql.= " '".($this->date_livraison?$this->db->idate($this->date_livraison):'null')."',";
     $sql.= " '".$this->adresse_livraison_id."',";
@@ -454,11 +457,11 @@ class Commande extends CommonObject
 	    // Mise a jour ref
 	    $sql = 'UPDATE '.MAIN_DB_PREFIX."commande SET ref='(PROV".$this->id.")' WHERE rowid=".$this->id;
 	    if ($this->db->query($sql))
-	      {
-		if ($this->id && $this->propale_id)
-		  {
-		    $sql = 'INSERT INTO '.MAIN_DB_PREFIX.'co_pr (fk_commande, fk_propale) VALUES ('.$this->id.','.$this->propale_id.')';
-		    $this->db->query($sql);
+	    {
+	    	if ($this->id && $this->propale_id)
+	    	{
+	    		$sql = 'INSERT INTO '.MAIN_DB_PREFIX.'co_pr (fk_commande, fk_propale) VALUES ('.$this->id.','.$this->propale_id.')';
+	    		$this->db->query($sql);
 		    
 		    // On r�cup�re les diff�rents contact interne et externe
 		    $prop = New Propal($this->db, $this->socid, $this->propale_id);
@@ -489,6 +492,7 @@ class Commande extends CommonObject
 		// Fin appel triggers
 		
 		$this->db->commit();
+		#$this->valid($user);
 		return $this->id;
 	      }
 	    else
diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php
index fe8b7e30533a0e428391c422c82de89852166b8a..51c85e19ca939c240ab722764958b15589dae6a4 100644
--- a/htdocs/commande/fiche.php
+++ b/htdocs/commande/fiche.php
@@ -1075,7 +1075,7 @@ else
 	  print '</tr>';
 	  
 
-	  // Soci�t
+	  // Soci�t�
 	  print '<tr><td>'.$langs->trans('Company').'</td>';
 	  print '<td colspan="3">'.$soc->getNomUrl(1).'</td>';
 	  print '</tr>';
@@ -1183,7 +1183,20 @@ else
 			{
 				$html->form_conditions_reglement($_SERVER['PHP_SELF'].'?id='.$commande->id,$commande->cond_reglement_id,'none');
 			}
-			print '</td></tr>';
+			print '</td>';
+			
+			//Note public lorsque le module expedition n'est pas activ�
+			if (!$conf->projet->enabled) $nbrow--;
+			if (!$conf->expedition->enabled)
+			{
+				$nbrow--;
+				if ($conf->projet->enabled) $nbrow--;
+				print '<td rowspan="'.$nbrow.'" valign="top">'.$langs->trans('NotePublic').' :<br>';
+				print nl2br($commande->note_public);
+				print '</td>';
+			}
+			
+			print '</tr>';
 			print '<tr><td height="10">';
 			print '<table class="nobordernopadding" width="100%"><tr><td>';
 			print $langs->trans('PaymentMode');
diff --git a/htdocs/includes/modules/modCommande.class.php b/htdocs/includes/modules/modCommande.class.php
index b300f137798bab05cbcb166207a99ebf4200e1f1..e68b6bd584f221b72ea214682a802d293fa40721 100644
--- a/htdocs/includes/modules/modCommande.class.php
+++ b/htdocs/includes/modules/modCommande.class.php
@@ -163,9 +163,9 @@ class modCommande extends DolibarrModules
         $r++;
         $this->export_code[$r]=$this->id.'_'.$r;
         $this->export_label[$r]='Commandes clients et lignes de commande';
-        $this->export_fields_array[$r]=array('s.idp'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"DateOrder",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"OrderShortStatusInvoicee",'c.fk_statut'=>'Status','c.note'=>"Note",'cd.rowid'=>'LineId','cd.description'=>"LineDescription",'cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty");
-        $this->export_entities_array[$r]=array('s.idp'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>'order','c.note'=>"order",'cd.rowid'=>'order_line','cd.description'=>"order_line",'cd.tva_tx'=>"order_line",'cd.qty'=>"order_line");
-        $this->export_alias_array[$r]=array('s.idp'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','c.rowid'=>"orderid",'c.ref'=>"ref",'c.fk_soc'=>"fk_soc",'c.date_creation'=>"datecreation",'c.date_commande'=>"dateorder",'c.amount_ht'=>"amount",'c.remise_percent'=>"globaldiscount",'c.total_ht'=>"totalht",'c.total_ttc'=>"totalttc",'c.facture'=>"invoicee",'c.fk_statut'=>'status','c.note'=>"note",'cd.rowid'=>'lineid','cd.description'=>"linedescription",'cd.tva_tx'=>"linevatrate",'cd.qty'=>"lineqty");
+        $this->export_fields_array[$r]=array('s.idp'=>"IdCompany",'s.nom'=>'CompanyName','s.address'=>'Address','s.cp'=>'Zip','s.ville'=>'Town','s.fk_pays'=>'Country','s.tel'=>'Phone','s.siren'=>'ProfId1','s.siret'=>'ProfId2','s.ape'=>'ProfId3','s.idprof4'=>'ProfId4','c.rowid'=>"Id",'c.ref'=>"Ref",'c.ref_client'=>"RefClient",'c.fk_soc'=>"IdCompany",'c.date_creation'=>"DateCreation",'c.date_commande'=>"DateOrder",'c.amount_ht'=>"Amount",'c.remise_percent'=>"GlobalDiscount",'c.total_ht'=>"TotalHT",'c.total_ttc'=>"TotalTTC",'c.facture'=>"OrderShortStatusInvoicee",'c.fk_statut'=>'Status','c.note'=>"Note",'p.ref'=>'RefProduct','p.label'=>'Label','cd.rowid'=>'LineId','cd.description'=>"LineDescription",'cd.total_ht'=>"TotalHT",'cd.tva_tx'=>"LineVATRate",'cd.qty'=>"LineQty");
+        $this->export_entities_array[$r]=array('s.idp'=>"company",'s.nom'=>'company','s.address'=>'company','s.cp'=>'company','s.ville'=>'company','s.fk_pays'=>'company','s.tel'=>'company','s.siren'=>'company','s.ape'=>'company','s.idprof4'=>'company','s.siret'=>'company','c.rowid'=>"order",'c.ref'=>"order",'c.ref_client'=>"order",'c.fk_soc'=>"order",'c.date_creation'=>"order",'c.date_commande'=>"order",'c.amount_ht'=>"order",'c.remise_percent'=>"order",'c.total_ht'=>"order",'c.total_ttc'=>"order",'c.facture'=>"order",'c.fk_statut'=>'order','c.note'=>"order",'p.ref'=>'product','p.label'=>'product','cd.rowid'=>'order_line','cd.description'=>"order_line",'cd.total_ht'=>"order_line",'cd.tva_tx'=>"order_line",'cd.qty'=>"order_line");
+        $this->export_alias_array[$r]=array('s.idp'=>"socid",'s.nom'=>'soc_name','s.address'=>'soc_adres','s.cp'=>'soc_zip','s.ville'=>'soc_ville','s.fk_pays'=>'soc_pays','s.tel'=>'soc_tel','s.siren'=>'soc_siren','s.siret'=>'soc_siret','s.ape'=>'soc_ape','s.idprof4'=>'soc_idprof4','c.rowid'=>"orderid",'c.ref'=>"ref",'c.ref_client'=>"refclient",'c.fk_soc'=>"fk_soc",'c.date_creation'=>"datecreation",'c.date_commande'=>"dateorder",'c.amount_ht'=>"amount",'c.remise_percent'=>"globaldiscount",'c.total_ht'=>"totalht",'c.total_ttc'=>"totalttc",'c.facture'=>"invoicee",'c.fk_statut'=>'status','c.note'=>"note",'p.ref'=>'refproduct','p.label'=>'label','cd.rowid'=>'lineid','cd.description'=>"linedescription",'cd.total_ht'=>"totalht",'cd.tva_tx'=>"linevatrate",'cd.qty'=>"lineqty");
         $this->export_sql[$r]="select distinct ";
         $i=0;
         foreach ($this->export_alias_array[$r] as $key => $value)
@@ -174,7 +174,7 @@ class modCommande extends DolibarrModules
             else $i++;
             $this->export_sql[$r].=$key.' as '.$value;
         }
-        $this->export_sql[$r].=' from '.MAIN_DB_PREFIX.'commande as c, '.MAIN_DB_PREFIX.'commandedet as cd, '.MAIN_DB_PREFIX.'societe as s WHERE c.fk_soc = s.idp AND c.rowid = cd.fk_commande';
+        $this->export_sql[$r].=' from '.MAIN_DB_PREFIX.'commande as c, '.MAIN_DB_PREFIX.'commandedet as cd, '.MAIN_DB_PREFIX.'societe as s, '.MAIN_DB_PREFIX.'product as p WHERE c.fk_soc = s.idp AND c.rowid = cd.fk_commande AND cd.fk_product = p.rowid';
         $this->export_permission[$r]=array(array("commande","commande","export"));
 
   }
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 4641ea1163d846158223710ab1e0051293d4edfb..17e99f86a1185d7b7e99b6ff6cbe1ebc4aba00e3 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -491,6 +491,7 @@ OrdersSetup=Orders' management setup
 OrdersNumberingModules=Orders numbering modules
 OrdersModelModule=Order documents models
 HideTreadedOrders=Hide the treated orders in the list
+ValidOrderAfterPropalClosed=To validate the order after proposal closer, makes it possible not to step by the provisional order
 ##### Fiche inter #####
 FicheinterNumberingModules=Intervention numbering modules
 TemplatePDFInterventions=Intervention card documents models
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index e6c541fbd9ca1a89a203bb6676fb363878118383..3a4ca6cd9856db3eab85bc5f9100dc8514bb0051 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -490,6 +490,7 @@ OrdersSetup=Configuration du module Commandes
 OrdersNumberingModules=Modules de num�rotation des commandes
 OrdersModelModule=Mod�les de document des commandes
 HideTreadedOrders=Cacher les commandes trait�es de la liste
+ValidOrderAfterPropalClosed=Valider la commande apr�s la cl�ture de la propale, permet de ne pas passer par la commande provisoire
 ##### Fiche inter #####
 FicheinterNumberingModules=Modules de num�rotation des fiches interventions
 TemplatePDFInterventions=Mod�le de documents des fiches d'interventions