diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 974b55ca332..11e4550b9ba 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -878,7 +878,7 @@ abstract class CommonObject if ($this->element == 'societe') $fieldname = 'cond_reglement'; $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; - $sql .= ' SET fk_cond_reglement = '.$id; + $sql .= ' SET '.$fieldname.' = '.$id; $sql .= ' WHERE rowid='.$this->id; if ($this->db->query($sql))