Fix: remove unused and deprecated method

This commit is contained in:
Regis Houssin
2012-03-13 20:15:13 +01:00
parent a76447c12e
commit 4d1416d0e6
5 changed files with 0 additions and 309 deletions

View File

@@ -1975,77 +1975,6 @@ class Commande extends CommonObject
}
}
/**
* Change les conditions de reglement de la commande
*
* @param int $cond_reglement_id Id de la nouvelle condition de reglement
* @return int >0 if OK, <0 if KO
* TODO deprecated
*/
function cond_reglement($cond_reglement_id)
{
dol_syslog('Commande::cond_reglement('.$cond_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
$sql .= ' SET fk_cond_reglement = '.$cond_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->cond_reglement_id = $cond_reglement_id;
return 1;
}
else
{
dol_syslog('Commande::cond_reglement Erreur '.$sql.' - '.$this->db->error(), LOG_ERR);
$this->error=$this->db->lasterror();
return -1;
}
}
else
{
dol_syslog('Commande::cond_reglement, etat commande incompatible', LOG_ERR);
$this->error='Etat commande incompatible '.$this->statut;
return -2;
}
}
/**
* Change le mode de reglement
*
* @param int $mode Id du nouveau mode
* @return int >0 si ok, <0 si ko
* TODO deprecated
*/
function mode_reglement($mode_reglement_id)
{
dol_syslog('Commande::mode_reglement('.$mode_reglement_id.')');
if ($this->statut >= 0)
{
$sql = 'UPDATE '.MAIN_DB_PREFIX.'commande';
$sql .= ' SET fk_mode_reglement = '.$mode_reglement_id;
$sql .= ' WHERE rowid='.$this->id;
if ( $this->db->query($sql) )
{
$this->mode_reglement_id = $mode_reglement_id;
return 1;
}
else
{
dol_syslog('Commande::mode_reglement Erreur '.$sql.' - '.$this->db->error(), LOG_ERR);
$this->error=$this->db->lasterror();
return -1;
}
}
else
{
dol_syslog('Commande::mode_reglement, etat facture incompatible', LOG_ERR);
$this->error='Etat commande incompatible '.$this->statut;
return -2;
}
}
/**
* Change le delai de livraison
*