BuxFig: recpopie de propale impossible:
create_from : ajout des simples quotes sur tous les champs.
This commit is contained in:
parent
9a16c4d803
commit
e95f00cfa5
@ -689,7 +689,7 @@ class Propal
|
||||
$sql.= " ".MAIN_DB_PREFIX."c_propalst as c";
|
||||
$sql.= " WHERE fk_statut = c.id";
|
||||
$sql.= " AND rowid='".$rowid."';";
|
||||
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
@ -1796,13 +1796,12 @@ class Propal
|
||||
// Insertion dans la base
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."propal (fk_soc, fk_soc_contact, 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.= " VALUES ($this->socidp, $this->contactid, 0, $this->remise, $this->remise_percent, $this->remise_absolue,";
|
||||
$sql.= " 0,0,".$this->db->idate($this->datep).", now(), '$this->ref', $this->author,";
|
||||
$sql.= " VALUES ('$this->socidp', '$this->contactid', '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->date_livraison."', '$this->adresse_livraison_id')";
|
||||
|
||||
$sql.= "'$this->modelpdf','".$this->db->idate($this->fin_validite)."',";
|
||||
$sql.= " '$this->cond_reglement_id', '$this->mode_reglement_id', '".$this->date_livraison."', '$this->adresse_livraison_id')";
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
@ -1850,7 +1849,7 @@ class Propal
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
dolibarr_syslog("Propal::Create -2 ".$this->error);
|
||||
dolibarr_syslog("Propal::Create_from -2 ".$this->error);
|
||||
$this->db->rollback();
|
||||
return -2;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user