From 2462716eb455299339416aa4d2c7f3179501c672 Mon Sep 17 00:00:00 2001 From: fappels Date: Tue, 12 Apr 2016 16:24:00 +0200 Subject: [PATCH 1/2] Fix migration script --- htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 15de62fb3e8..eb2077c6dfa 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -359,7 +359,7 @@ CREATE TABLE llx_c_accounting_category ( ) ENGINE=innodb; ALTER TABLE llx_c_accounting_category ADD UNIQUE INDEX uk_c_accounting_category(code); - +UPDATE llx_accounting_account SET account_parent = '0' WHERE account_parent = ''; ALTER TABLE llx_accounting_account MODIFY COLUMN account_parent integer; From 1676595b93b0a0edeeb5314abdf2a70d7ce605e9 Mon Sep 17 00:00:00 2001 From: Christophe Battarel Date: Thu, 14 Apr 2016 10:50:32 +0200 Subject: [PATCH 2/2] NEW: fichinter lines ordered by rang AND DATE --- htdocs/fichinter/card.php | 2 +- htdocs/fichinter/class/fichinter.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index a247341cdec..7a54d4237f3 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1409,7 +1409,7 @@ else if ($id > 0 || ! empty($ref)) $sql.= ' WHERE ft.fk_fichinter = '.$object->id; if (!empty($conf->global->FICHINTER_HIDE_EMPTY_DURATION)) $sql.= ' AND ft.duree <> 0'; - $sql.= ' ORDER BY ft.rang ASC, ft.rowid'; + $sql.= ' ORDER BY ft.rang ASC, ft.date ASC, ft.rowid'; $resql = $db->query($sql); if ($resql) diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index c1e7a3aaca2..11b8629bc3a 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -969,7 +969,7 @@ class Fichinter extends CommonObject { $sql = 'SELECT rowid, description, duree, date, rang'; $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet'; - $sql.=' WHERE fk_fichinter = '.$this->id .' ORDER BY rang ASC' ; + $sql.=' WHERE fk_fichinter = '.$this->id .' ORDER BY rang ASC, date ASC' ; dol_syslog(get_class($this)."::fetch_lines", LOG_DEBUG); $resql=$this->db->query($sql);