diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index f5392961441..1dd253c52a1 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -762,6 +762,19 @@ class CommonObject $this->updateLineDown($rowid, $rang, $max); } + /** + * Update position of line (rang) + */ + function updateRangOfLine($rowid,$rang) + { + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element_line.' SET rang = '.$rang; + $sql.= ' WHERE rowid = '.$rowid; + if (! $this->db->query($sql) ) + { + dol_print_error($this->db); + } + } + /** * Update position of line up (rang) */