mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: erreur mysql si on n'utilise pas la date de livraison dans une propale
This commit is contained in:
parent
d647b10737
commit
85a5ef9833
|
|
@ -495,14 +495,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,";
|
||||
$sql.= " fk_cond_reglement, fk_mode_reglement, date_livraison, ref_client) ";
|
||||
$sql.= " VALUES ($this->socid, 0, $this->remise, $this->remise_percent, $this->remise_absolue,";
|
||||
$sql.= " fk_cond_reglement, fk_mode_reglement, ref_client";
|
||||
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,";
|
||||
$sql.= " ".$this->db->idate($this->date_livraison).",'".addslashes($this->ref_client)."')";
|
||||
$sql.= "'".$this->modelpdf."',".$this->db->idate($this->fin_validite).",";
|
||||
$sql.= " ".$this->cond_reglement_id.", ".$this->mode_reglement_id.",";
|
||||
if ($conf->global->PROPALE_ADD_SHIPPING_DATE) $sql.= " ".$this->db->idate($this->date_livraison).",";
|
||||
$sql.= "'".addslashes($this->ref_client)."')";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user