diff --git a/htdocs/livraison/fiche.php b/htdocs/livraison/fiche.php
index 27811f9688d..03a985aeda2 100644
--- a/htdocs/livraison/fiche.php
+++ b/htdocs/livraison/fiche.php
@@ -424,13 +424,16 @@ else
// Date
print '
| '.$langs->trans("Date").' | ';
- print "".strftime("%A %d %B %Y",$livraison->date)." | \n";
-/*
- // Entrepot
- $entrepot = new Entrepot($db);
- $entrepot->fetch($expedition->entrepot_id);
- print ''.$langs->trans("Warehouse").' | '.$entrepot->libelle.' | ';
-*/
+ print "".strftime("%A %d %B %Y",$livraison->date_creation)." | \n";
+
+ if (!$conf->expedition->enabled && $conf->stock->enabled)
+ {
+ // Entrepot
+ $entrepot = new Entrepot($db);
+ $entrepot->fetch($expedition->entrepot_id);
+ print ''.$langs->trans("Warehouse").' | '.$entrepot->libelle.' | ';
+ }
+
print '
';
print "\n";
diff --git a/htdocs/livraison/livraison.class.php b/htdocs/livraison/livraison.class.php
index 1f89547e14d..b2c7b7afb8d 100644
--- a/htdocs/livraison/livraison.class.php
+++ b/htdocs/livraison/livraison.class.php
@@ -214,6 +214,7 @@ class Livraison
$obj = $this->db->fetch_object($result);
$this->id = $obj->rowid;
+ $this->date_creation = $obj->date_creation;
$this->ref = $obj->ref;
$this->soc_id = $obj->socid;
$this->statut = $obj->fk_statut;
@@ -221,11 +222,11 @@ class Livraison
$this->expedition_id = $obj->fk_expedition;
$this->user_author_id = $obj->fk_user_author;
$this->user_valid_id = $obj->fk_user_valid;
- $this->date = $obj->date_livraison;
+ $this->date_livraison = $obj->date_livraison;
$this->adresse_livraison_id = $obj->fk_entrepot;
$this->note = $obj->note;
$this->note_public = $obj->note_public;
- $this->modelpdf = $obj->model_pdf;
+ $this->modelpdf = $obj->model_pdf;
$this->db->free();
if ($this->statut == 0) $this->brouillon = 1;