mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Qual: Factorize duplicate code
This commit is contained in:
@@ -1391,51 +1391,6 @@ class Commande extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Mets <20> jour les commentaires priv<69>s
|
||||
* \param note Commentaire
|
||||
* \return int <0 si ko, >0 si ok
|
||||
*/
|
||||
function update_note($note)
|
||||
{
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
|
||||
$sql.= " SET note = '".addslashes($note)."'";
|
||||
$sql.= " WHERE rowid =". $this->id;
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$this->note = $note;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Mets <20> jour les commentaires publiques
|
||||
* \param note_public Commentaire
|
||||
* \return int <0 si ko, >0 si ok
|
||||
*/
|
||||
function update_note_public($note_public)
|
||||
{
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
|
||||
$sql.= " SET note_public = '".addslashes($note_public)."'";
|
||||
$sql.= " WHERE rowid =". $this->id;
|
||||
|
||||
if ($this->db->query($sql))
|
||||
{
|
||||
$this->note_public = $note_public;
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$this->db->error();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief D<>finit une date de livraison
|
||||
|
||||
Reference in New Issue
Block a user