From fd03f582c97c728ee5cc1d5e382fe0214be22535 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Sun, 31 Aug 2014 12:38:33 +0200 Subject: [PATCH 1/3] Fix SQL syntax --- htdocs/admin/limits.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 69237fe4f74..9c0bc80a25a 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -206,9 +206,9 @@ else // Add vat rates examples specific to country $vat_rates=array(); - $sql.="SELECT taux as vat_rate"; + $sql="SELECT taux as vat_rate"; $sql.=" FROM ".MAIN_DB_PREFIX."c_tva as t, ".MAIN_DB_PREFIX."c_pays as p"; - $sql.=" WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$mysoc->country_code."' AND taux != 0"; + $sql.=" WHERE t.active=1 AND t.fk_pays = p.rowid AND p.code='".$mysoc->country_code."' AND taux <> 0"; $sql.=" ORDER BY t.taux ASC"; $resql=$db->query($sql); if ($resql) From 0473bc5138e31459279fb478e8f56c524bf26c58 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 1 Sep 2014 11:51:16 +0200 Subject: [PATCH 2/3] Fix missing $user into create call categorie --- htdocs/categories/class/categorie.class.php | 2 +- htdocs/categories/fiche.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index ad436d5c6c8..c4de7377ebd 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -137,7 +137,7 @@ class Categorie extends CommonObject * -3 : categorie invalide * -4 : category already exists */ - function create($user='') + function create($user) { global $conf,$langs,$hookmanager; $langs->load('categories'); diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index aca14acce2b..a2f9dc54df2 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -138,7 +138,7 @@ if ($action == 'add' && $user->rights->categorie->creer) // Create category in database if (! $error) { - $result = $object->create(); + $result = $object->create($user); if ($result > 0) { $action = 'confirmed'; From db1c97bdad116c5d9c393d9918949826a76605fa Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Mon, 1 Sep 2014 11:52:20 +0200 Subject: [PATCH 3/3] changelog --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index dad4cb65c1e..82d4efebcba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -9,6 +9,7 @@ For users: - Fix: debian script syntax error - Fix: error "menu param is not inside list" into pos module. - Fix: Salary payments are not reflected on the reporting sheets +- Fix: Trigger on create category call failed because user is not passed on card ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: