From 7556a604e364a6d4cb3d5517605170012277bf84 Mon Sep 17 00:00:00 2001 From: florian HENRY Date: Thu, 29 Jun 2017 16:30:57 +0200 Subject: [PATCH] fix travis --- .../class/accountancycategory.class.php | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 7668756a046..a7bab16b30d 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -429,7 +429,7 @@ class AccountancyCategory return - 1; } } - + public function getCats() { global $db, $langs, $user, $mysoc; @@ -462,7 +462,7 @@ class AccountancyCategory if ($num) { while ( $i < $num ) { $obj = $this->db->fetch_object($resql); - + $data[] = array ( 'rowid' => $obj->rowid, 'code' => $obj->code, @@ -483,10 +483,10 @@ class AccountancyCategory return - 1; } } - - - // calcule - + + + // calcule + const PATTERN = '/(?:\-?\d+(?:\.?\d+)?[\+\-\*\/])+\-?\d+(?:\.?\d+)?/'; const PARENTHESIS_DEPTH = 10; @@ -535,10 +535,12 @@ class AccountancyCategory return 0; } - + /** * get cpts of category * + * @param int $cat_id Id accounting account category + * * @return array Result in table */ public function getCptsCat($cat_id) { @@ -554,7 +556,7 @@ class AccountancyCategory $sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as t"; $sql .= " WHERE t.fk_accounting_category = ".$cat_id; $sql .= " ORDER BY t.account_number "; - + //echo $sql; $resql = $this->db->query($sql); @@ -582,5 +584,5 @@ class AccountancyCategory return -1; } } - + }