Fix [ bug #911 ] Reorder intervention do not work

This commit is contained in:
Florian Henry 2013-05-26 10:15:43 +02:00
parent 389d64c25b
commit 56556ba222

View File

@ -1068,7 +1068,13 @@ abstract class CommonObject
// We frist search all lines that are parent lines (for multilevel details lines)
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.$this->table_element_line;
$sql.= ' WHERE '.$this->fk_element.' = '.$this->id;
$sql.= ' AND fk_parent_line IS NULL';
//This test is to fix Fix [ bug #911 ] Reorder intervention do not work in 3.3
//Do not merge in 3.4 'table column fk_parent_line already added into 3.4
if ($this->table_element_line != 'fichinterdet') {
$sql.= ' AND fk_parent_line IS NULL';
}
$sql.= ' ORDER BY rang ASC, rowid '.$rowidorder;
dol_syslog(get_class($this)."::line_order search all parent lines sql=".$sql, LOG_DEBUG);