From 9d8a4e463b55d16831710f13bc9402ea42826604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 9 Sep 2018 23:09:52 +0200 Subject: [PATCH 1/7] Update accountancycategory.class.php --- htdocs/accountancy/class/accountancycategory.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 3c28d4b6932..5a427a79882 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -378,7 +378,7 @@ class AccountancyCategory * Return list of personalized groups that are active * * @param int $categorytype -1=All, 0=Only non computed groups, 1=Only computed groups - * @return array Array of groups + * @return array|int Array of groups or -1 if error */ public function getCats($categorytype=-1) { From d8f77f040f87d8551b2be988e2841e165481251b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sun, 9 Sep 2018 23:12:16 +0200 Subject: [PATCH 2/7] Update accountancycategory.class.php --- htdocs/accountancy/class/accountancycategory.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/accountancy/class/accountancycategory.class.php b/htdocs/accountancy/class/accountancycategory.class.php index 5a427a79882..98d688da9ce 100644 --- a/htdocs/accountancy/class/accountancycategory.class.php +++ b/htdocs/accountancy/class/accountancycategory.class.php @@ -493,7 +493,7 @@ class AccountancyCategory * * @param int $cat_id Id if personalized accounting group/category * @param string $predefinedgroupwhere Sql criteria filter to select accounting accounts - * @return array Array of accounting accounts + * @return array|int Array of accounting accounts or -1 if error */ public function getCptsCat($cat_id, $predefinedgroupwhere='') { From 8699866062493ff46961a3e37dacee72b4394630 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 10 Sep 2018 10:08:04 +0200 Subject: [PATCH 3/7] FIX better compatibility with multicompany --- htdocs/core/class/commonobject.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b4426a02f74..d908913d408 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1064,7 +1064,7 @@ abstract class CommonObject $sql.= " ".MAIN_DB_PREFIX."c_type_contact as tc"; $sql.= " WHERE ec.element_id = ".$id; $sql.= " AND ec.fk_socpeople = c.rowid"; - if ($source == 'internal') $sql.= " AND c.entity IN (0,".$conf->entity.")"; + if ($source == 'internal') $sql.= " AND c.entity IN (".getEntity('user').")"; if ($source == 'external') $sql.= " AND c.entity IN (".getEntity('societe').")"; $sql.= " AND ec.fk_c_type_contact = tc.rowid"; $sql.= " AND tc.element = '".$element."'"; @@ -1072,7 +1072,7 @@ abstract class CommonObject $sql.= " AND tc.code = '".$code."'"; $sql.= " AND tc.active = 1"; if ($status) $sql.= " AND ec.statut = ".$status; - +echo $sql;exit; dol_syslog(get_class($this)."::getIdContact", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) From 43ac51b44c04464cbfb4f48556459cbab327c2fc Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Mon, 10 Sep 2018 10:11:07 +0200 Subject: [PATCH 4/7] FIX remove debug --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index d908913d408..b99c2f8ccd8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1072,7 +1072,7 @@ abstract class CommonObject $sql.= " AND tc.code = '".$code."'"; $sql.= " AND tc.active = 1"; if ($status) $sql.= " AND ec.statut = ".$status; -echo $sql;exit; + dol_syslog(get_class($this)."::getIdContact", LOG_DEBUG); $resql=$this->db->query($sql); if ($resql) From c42f39cc34f27e104b01aabe4b436b2ff2e1f869 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Wed, 12 Sep 2018 14:44:08 +0200 Subject: [PATCH 5/7] FIX character making error on list --- htdocs/compta/facture/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 2cfd1d03a0e..dbbdf5fa8b9 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -73,7 +73,7 @@ $search_product_category=GETPOST('search_product_category','int'); $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref','alpha'):GETPOST('search_ref','alpha'); $search_refcustomer=GETPOST('search_refcustomer','alpha'); $search_type=GETPOST('search_type','int'); -$search_project=GETPOST('search_project','alpha');< +$search_project=GETPOST('search_project','alpha'); $search_societe=GETPOST('search_societe','alpha'); $search_montant_ht=GETPOST('search_montant_ht','alpha'); $search_montant_vat=GETPOST('search_montant_vat','alpha'); From fece67b6294bdd7cd33583558cb3c105621eed31 Mon Sep 17 00:00:00 2001 From: ias-ceo Date: Mon, 10 Sep 2018 17:29:29 +0200 Subject: [PATCH 6/7] use correct resultset --- htdocs/core/modules/modAgenda.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/modAgenda.class.php b/htdocs/core/modules/modAgenda.class.php index 89085ea4d6c..6c8fda578f2 100644 --- a/htdocs/core/modules/modAgenda.class.php +++ b/htdocs/core/modules/modAgenda.class.php @@ -90,7 +90,7 @@ class modAgenda extends DolibarrModules $resql = $this->db->query($sqlreadactions); if ($resql) { - while ($obj = $this->db->fetch_object($sqlreadactions)) + while ($obj = $this->db->fetch_object($resql)) { //if (preg_match('/_CREATE$/',$obj->code) && (! in_array($obj->code, array('COMPANY_CREATE','PRODUCT_CREATE','TASK_CREATE')))) continue; // We don't track such events (*_CREATE) by default, we prefer validation (except thirdparty/product/task creation because there is no validation). if (preg_match('/^TASK_/',$obj->code)) continue; // We don't track such events by default. From 7838b75ec9dba723f6f0f11ce97f4b180efb6001 Mon Sep 17 00:00:00 2001 From: gauthier Date: Thu, 13 Sep 2018 16:11:42 +0200 Subject: [PATCH 7/7] FIX : wrong var name --- htdocs/fourn/commande/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 7a1d80daa28..e4f79f6ac88 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -401,7 +401,7 @@ if (empty($reshook)) $localtax2_tx, $idprod, $productsupplier->product_fourn_price_id, - $productsupplier->fourn_ref, + $productsupplier->ref_supplier, $remise_percent, 'HT', $pu_ttc,