diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 50084ba1af0..010f452755d 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -1,7 +1,7 @@ * Copyright (C) 2016-2017 Alexandre Spangaro - * Copyright (C) 2018 Frédéric France + * Copyright (C) 2018-2019 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -661,13 +661,11 @@ class AccountancyCategory // extends CommonObject /** * Function to know all category from accounting account * - * @return array Result in table + * @return array|integer Result in table (array), -1 if KO */ public function getCatsCpts() { - global $mysoc,$conf; - - $sql = ""; + global $mysoc, $conf; if (empty($mysoc->country_id)) { dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');