From 56556ba222b8a353ac7c0a1e3b4eb8b85ecd70b8 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Sun, 26 May 2013 10:15:43 +0200 Subject: [PATCH] Fix [ bug #911 ] Reorder intervention do not work --- htdocs/core/class/commonobject.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8b9e210b4f9..3938a799b37 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -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);