From 0c50b0aa78dc424d7d54098868a437062ff15cb6 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 26 Nov 2007 16:37:26 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20erreur=20sql=20si=20date=20de=20livraiso?= =?UTF-8?q?n=20n'est=20pas=20utilis=E9=20dans=20les=20propals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/propal.class.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/htdocs/propal.class.php b/htdocs/propal.class.php index 0fc33bec7a0..93e123b020c 100644 --- a/htdocs/propal.class.php +++ b/htdocs/propal.class.php @@ -1905,13 +1905,17 @@ class Propal extends CommonObject // Insertion dans la base $sql = "INSERT INTO ".MAIN_DB_PREFIX."propal (fk_soc, price, remise, remise_percent, remise_absolue,"; - $sql.= " tva, total, datep, datec, ref, fk_user_author, note, note_public, model_pdf, fin_validite, fk_cond_reglement, fk_mode_reglement, date_livraison, fk_adresse_livraison) "; + $sql.= " tva, total, datep, datec, ref, fk_user_author, note, note_public, model_pdf, fin_validite, fk_cond_reglement, fk_mode_reglement, fk_adresse_livraison"; + if ($conf->global->PROPALE_ADD_SHIPPING_DATE) $sql.= ", date_livraison"; + $sql.= ")"; $sql.= " VALUES ('$this->socid', '0', '$this->remise', '$this->remise_percent', '$this->remise_absolue',"; $sql.= " '0','0','".$this->db->idate($this->datep)."', now(), '$this->ref', '$this->author',"; $sql.= "'".addslashes($this->note)."',"; $sql.= "'".addslashes($this->note_public)."',"; $sql.= "'$this->modelpdf','".$this->db->idate($this->fin_validite)."',"; - $sql.= " '$this->cond_reglement_id', '$this->mode_reglement_id', '".$this->db->idate($this->date_livraison)."', '$this->adresse_livraison_id')"; + $sql.= " '$this->cond_reglement_id', '$this->mode_reglement_id', '$this->adresse_livraison_id'"; + if ($conf->global->PROPALE_ADD_SHIPPING_DATE) $sql.= ", '".$this->db->idate($this->date_livraison); + $sql.= ")"; $resql=$this->db->query($sql); if ($resql)