diff --git a/htdocs/commande/commande.class.php b/htdocs/commande/commande.class.php index bfae7157046..5dc6787be19 100644 --- a/htdocs/commande/commande.class.php +++ b/htdocs/commande/commande.class.php @@ -509,7 +509,7 @@ class Commande extends CommonObject $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->date_livraison?$this->db->idate($this->date_livraison):'')."',"; $sql.= " '".$this->adresse_livraison_id."',"; $sql.= " '".$this->remise_absolue."',"; $sql.= " '".$this->remise_percent."')"; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 932c409f2dd..b0af05ecfac 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1174,7 +1174,7 @@ else } else { - print dolibarr_print_date($commande->date_livraison,'daytext'); + print $commande->date_livraison ? dolibarr_print_date($commande->date_livraison,'daytext') : ' '; } print ''; print '