From 5fe31e90c84936c1f8a45f41e19e3996e1ad0404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 23 May 2015 15:32:09 +0200 Subject: [PATCH 1/3] Remove duplicate modify button on user's card Fix #2879 --- htdocs/user/card.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/user/card.php b/htdocs/user/card.php index b7c7f7f6d9c..3a561ce8ebb 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -1474,7 +1474,6 @@ else else { print '
'.$langs->trans("Modify").'
'; - print '
'; } } elseif ($caneditpassword && ! $object->ldap_sid && From 139b41c014b4b8bae49b216e9edeb85418fe30bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 23 May 2015 16:38:54 +0200 Subject: [PATCH 2/3] Make select_salesrepresentative() return 0 when empty Fix #2881 --- htdocs/core/class/html.formother.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/html.formother.class.php b/htdocs/core/class/html.formother.class.php index b14ff626480..08c19463d27 100644 --- a/htdocs/core/class/html.formother.class.php +++ b/htdocs/core/class/html.formother.class.php @@ -384,7 +384,7 @@ class FormOther } // Select each sales and print them in a select input $out.=' - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2013 Antoine Iauch +/* Copyright (C) 2001-2003 Rodolphe Quiedeville + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005-2009 Regis Houssin + * Copyright (C) 2007 Franky Van Liedekerke + * Copyright (C) 2013 Antoine Iauch + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -313,7 +314,7 @@ print ""; // Category filter print ''; print '"; @@ -1265,9 +1266,9 @@ else // Categories print ''; - print ''; + print ''; } print '
'; -print $langs->trans("Category") . ': ' . $formother->select_categories(2, $selected_cat, 'search_categ', true); +print $langs->trans("Category") . ': ' . $formother->select_categories(Categorie::TYPE_CUSTOMER, $selected_cat, 'search_categ', true); print ' '; print $langs->trans("SubCats") . '? '; print ' - * Copyright (C) 2003 Eric Seigne - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Raphaël Doursenaud - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2013 Alexandre Spangaro - * Copyright (C) 2015 Jean-François Ferry +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2003 Eric Seigne + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013-2015 Raphaël Doursenaud + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -276,7 +276,7 @@ if ($result) if (! empty($conf->categorie->enabled)) { $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$formother->select_categories(4,$search_categ,'search_categ',1); + $moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1); $moreforfilter.='       '; } if ($moreforfilter) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 6eab9d8b545..b4e5a8a0ec0 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -1,21 +1,21 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2004 Benoit Mortier - * Copyright (C) 2004 Sebastien Di Cintio - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2014 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2006 Marc Barilley/Ocebo - * Copyright (C) 2007 Franky Van Liedekerke - * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2010 Juanjo Menent - * Copyright (C) 2010-2014 Philippe Grand - * Copyright (C) 2011 Herve Prot - * Copyright (C) 2012-2014 Marcos García - * Copyright (C) 2012 Cedric Salvador - * Copyright (C) 2012-2014 Raphaël Doursenaud - * Copyright (C) 2014 Alexandre Spangaro +/* Copyright (c) 2002-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004 Benoit Mortier + * Copyright (C) 2004 Sebastien Di Cintio + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2014 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2006 Marc Barilley/Ocebo + * Copyright (C) 2007 Franky Van Liedekerke + * Copyright (C) 2007 Patrick Raguin + * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2010-2014 Philippe Grand + * Copyright (C) 2011 Herve Prot + * Copyright (C) 2012-2014 Marcos García + * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2012-2015 Raphaël Doursenaud + * Copyright (C) 2014 Alexandre Spangaro * * 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 @@ -4593,7 +4593,7 @@ class Form if ($rendermode == 0) { - $cate_arbo = $this->select_all_categories(0, '', 'parent', 64, 0, 1); + $cate_arbo = $this->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1); foreach($categories as $c) { $arrayselected[] = $c->id; } diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 690d015ac38..c1c9d9e2311 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -1,13 +1,14 @@ - * Copyright (C) 2006 Rodolphe Quiedeville - * Copyright (C) 2007 Patrick Raguin - * Copyright (C) 2010-2012 Regis Houssin - * Copyright (C) 2013-2014 Florian Henry - * Copyright (C) 2013-2014 Juanjo Menent - * Copyright (C) 2013 Christophe Battarel +/* Copyright (C) 2006-2011 Laurent Destailleur + * Copyright (C) 2006 Rodolphe Quiedeville + * Copyright (C) 2007 Patrick Raguin + * Copyright (C) 2010-2012 Regis Houssin + * Copyright (C) 2013-2014 Florian Henry + * Copyright (C) 2013-2014 Juanjo Menent + * Copyright (C) 2013 Christophe Battarel * Copyright (C) 2013 Alexandre Spangaro * Copyright (C) 2015 Frederic France + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -83,8 +84,8 @@ function societe_prepare_head(Societe $object) //show categorie tab if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { - $type = 2; - if ($object->fournisseur) $type = 1; + $type = Categorie::TYPE_CUSTOMER; + if ($object->fournisseur) $type = Categorie::TYPE_SUPPLIER; $head[$h][0] = DOL_URL_ROOT.'/categories/categorie.php?socid='.$object->id."&type=".$type; $head[$h][1] = $langs->trans('Categories'); $head[$h][2] = 'category'; diff --git a/htdocs/core/lib/contact.lib.php b/htdocs/core/lib/contact.lib.php index 278402679f8..26b0b0c0e5f 100644 --- a/htdocs/core/lib/contact.lib.php +++ b/htdocs/core/lib/contact.lib.php @@ -1,7 +1,8 @@ - * Copyright (C) 2010-2012 Regis Houssin +/* Copyright (C) 2006-2010 Laurent Destailleur + * Copyright (C) 2010-2012 Regis Houssin * Copyright (C) 2015 Frederic France + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -88,7 +89,7 @@ function contact_prepare_head(Contact $object) if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { - $type = 4; + $type = Categorie::TYPE_CONTACT; $head[$tab][0] = DOL_URL_ROOT.'/categories/categorie.php?id='.$object->id."&type=".$type; $head[$tab][1] = $langs->trans('Categories'); $head[$tab][2] = 'category'; diff --git a/htdocs/core/lib/member.lib.php b/htdocs/core/lib/member.lib.php index 695c3d65629..e3bc5c236bc 100644 --- a/htdocs/core/lib/member.lib.php +++ b/htdocs/core/lib/member.lib.php @@ -1,6 +1,7 @@ - * Copyright (C) 2015 Alexandre Spangaro +/* Copyright (C) 2006-2011 Laurent Destailleur + * Copyright (C) 2015 Alexandre Spangaro + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -70,7 +71,8 @@ function member_prepare_head(Adherent $object) // Show category tab if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire)) { - $head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type=3'; + $type = Categorie::TYPE_MEMBER; + $head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type; $head[$h][1] = $langs->trans('Categories'); $head[$h][2] = 'category'; $h++; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 6c94d5595dd..6174e2de121 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -6,7 +6,7 @@ * Copyright (C) 2010 Juanjo Menent * Copyright (C) 2012 Christophe Battarel * Copyright (C) 2012 Cédric Salvador - * Copyright (C) 2012-2014 Raphaël Doursenaud + * Copyright (C) 2012-2015 Raphaël Doursenaud * Copyright (C) 2014 Cedric GROSS * Copyright (C) 2014 Teddy Andreotti <125155@supinfo.com> * @@ -1099,7 +1099,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $categstatic=new Categorie($db); // recovering the list of all the categories linked to product - $tblcateg=$categstatic->containing($idprod,0); + $tblcateg=$categstatic->containing($idprod, Categorie::TYPE_PRODUCT); foreach ($tblcateg as $cate) { // Adding the descriptions if they are filled diff --git a/htdocs/core/lib/product.lib.php b/htdocs/core/lib/product.lib.php index 32e5fa4ba78..f8c3ed12cf6 100644 --- a/htdocs/core/lib/product.lib.php +++ b/htdocs/core/lib/product.lib.php @@ -1,7 +1,8 @@ - * Copyright (C) 2007 Rodolphe Quiedeville - * Copyright (C) 2009-2010 Regis Houssin +/* Copyright (C) 2006-2008 Laurent Destailleur + * Copyright (C) 2007 Rodolphe Quiedeville + * Copyright (C) 2009-2010 Regis Houssin + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -60,7 +61,8 @@ function product_prepare_head($object) /* No more required. Replaced with new multiselect component if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire) { - $head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type=0'; + $type = Categorie::TYPE_PRODUCT; + $head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type; $head[$h][1] = $langs->trans('Categories'); $head[$h][2] = 'category'; $h++; diff --git a/htdocs/fourn/list.php b/htdocs/fourn/list.php index c44aa39622d..62985db80b2 100644 --- a/htdocs/fourn/list.php +++ b/htdocs/fourn/list.php @@ -1,9 +1,10 @@ - * Copyright (C) 2004-2012 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2011 Philippe Grand - * Copyright (C) 2013 Cédric Salvador +/* Copyright (C) 2001-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2011 Philippe Grand + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -168,7 +169,7 @@ if ($resql) if (! empty($conf->categorie->enabled)) { $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$htmlother->select_categories(1,$search_categ,'search_categ',1); + $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1); $moreforfilter.='       '; } if ($moreforfilter) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index f6e64b36f6a..7780bb560a5 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -11,7 +11,8 @@ * Copyright (C) 2011-2014 Alexandre Spangaro * Copyright (C) 2014 Cédric Gross * Copyright (C) 2014 Ferran Marcet - * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Jean-François Ferry + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -974,7 +975,7 @@ else // Categories print '
'.$langs->trans("Categories").''; - $cate_arbo = $form->select_all_categories(0, '', 'parent', 64, 0, 1); + $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1); print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, 250); print "
'.$langs->trans("Categories").''; - $cate_arbo = $form->select_all_categories(0, '', 'parent', 64, 0, 1); + $cate_arbo = $form->select_all_categories(Categorie::TYPE_PRODUCT, '', 'parent', 64, 0, 1); $c = new Categorie($db); - $cats = $c->containing($object->id,0); + $cats = $c->containing($object->id,Categorie::TYPE_PRODUCT); foreach($cats as $cat) { $arrayselected[] = $cat->id; } diff --git a/htdocs/product/composition/card.php b/htdocs/product/composition/card.php index cdb20e28dbf..112d6d2d44b 100644 --- a/htdocs/product/composition/card.php +++ b/htdocs/product/composition/card.php @@ -1,10 +1,11 @@ - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005 Eric Seigne - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2011-2014 Juanjo Menent +/* Copyright (C) 2001-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005 Eric Seigne + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -473,7 +474,7 @@ if ($id > 0 || ! empty($ref)) if (! empty($conf->categorie->enabled)) { print '
'.$langs->trans("CategoryFilter").'   '.$form->select_all_categories(0, $parent).'
'.$form->select_all_categories(Categorie::TYPE_PRODUCT, $parent).'
'; print ''; diff --git a/htdocs/product/list.php b/htdocs/product/list.php index 2f61a07fa60..83e15cb104e 100644 --- a/htdocs/product/list.php +++ b/htdocs/product/list.php @@ -1,15 +1,15 @@ - * Copyright (C) 2004-2011 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012-2013 Marcos García - * Copyright (C) 2013 Juanjo Menent - * Copyright (C) 2013 Raphaël Doursenaud - * Copyright (C) 2013 Jean Heimburger - * Copyright (C) 2013 Cédric Salvador - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Adolfo segura - * Copyright (C) 2015 Jean-François Ferry +/* Copyright (C) 2001-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012-2013 Marcos García + * Copyright (C) 2013 Juanjo Menent + * Copyright (C) 2013-2015 Raphaël Doursenaud + * Copyright (C) 2013 Jean Heimburger + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Adolfo segura + * Copyright (C) 2015 Jean-François Ferry * * 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 @@ -292,7 +292,7 @@ else if (! empty($conf->categorie->enabled)) { $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$htmlother->select_categories(0,$search_categ,'search_categ',1); + $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ',1); $moreforfilter.='       '; } if ($moreforfilter) diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php index 4a93741e4e7..ce2e7363feb 100644 --- a/htdocs/product/reassort.php +++ b/htdocs/product/reassort.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Cédric Salvador +/* Copyright (C) 2001-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -221,7 +222,7 @@ if ($resql) if (! empty($conf->categorie->enabled)) { $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$htmlother->select_categories(0,$search_categ,'search_categ'); + $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ'); $moreforfilter.='           '; } $moreforfilter.=$langs->trans("StockTooLow").' '; diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php index 3caeadacef5..86410df8a00 100644 --- a/htdocs/product/reassortlot.php +++ b/htdocs/product/reassortlot.php @@ -1,8 +1,9 @@ - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2013 Cédric Salvador +/* Copyright (C) 2001-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2013 Cédric Salvador + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -233,7 +234,7 @@ if ($resql) if (! empty($conf->categorie->enabled)) { $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$htmlother->select_categories(0,$search_categ,'search_categ'); + $moreforfilter.=$htmlother->select_categories(Categorie::TYPE_PRODUCT,$search_categ,'search_categ'); $moreforfilter.='           '; } //$moreforfilter.=$langs->trans("StockTooLow").' '; diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 85d8c3ac83b..18bfea5fb0c 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -1,16 +1,17 @@ - * Copyright (C) 2004-2015 Laurent Destailleur - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2003 Brian Fraval - * Copyright (C) 2006 Andre Cianfarani - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2008 Patrick Raguin - * Copyright (C) 2010-2014 Juanjo Menent - * Copyright (C) 2013 Florian Henry - * Copyright (C) 2013 Alexandre Spangaro - * Copyright (C) 2013 Peter Fontaine - * Copyright (C) 2014-2015 Marcos García +/* Copyright (C) 2002-2006 Rodolphe Quiedeville + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2003 Brian Fraval + * Copyright (C) 2006 Andre Cianfarani + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2008 Patrick Raguin + * Copyright (C) 2010-2014 Juanjo Menent + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2013 Alexandre Spangaro + * Copyright (C) 2013 Peter Fontaine + * Copyright (C) 2014-2015 Marcos García + * Copyright (C) 2015 Raphaël Doursenaud * * 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 @@ -1334,11 +1335,11 @@ class Societe extends CommonObject // Fill $toute_categs array with an array of (type => array of ("Categorie" instance)) if ($this->client || $this->prospect) { - $toute_categs ['societe'] = $static_cat->containing($this->id,2); + $toute_categs ['societe'] = $static_cat->containing($this->id,Categorie::TYPE_CUSTOMER); } if ($this->fournisseur) { - $toute_categs ['fournisseur'] = $static_cat->containing($this->id,1); + $toute_categs ['fournisseur'] = $static_cat->containing($this->id,Categorie::TYPE_SUPPLIER); } // Remove each "Categorie" @@ -2747,7 +2748,7 @@ class Societe extends CommonObject $this->SupplierCategories = array(); $sql = "SELECT rowid, label"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; - $sql.= " WHERE type = 1"; + $sql.= " WHERE type = ".Categorie::TYPE_SUPPLIER; $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/societe/societe.php b/htdocs/societe/societe.php index b3484a7c008..8a5a77cbb0b 100644 --- a/htdocs/societe/societe.php +++ b/htdocs/societe/societe.php @@ -1,9 +1,9 @@ - * Copyright (C) 2004-2013 Laurent Destailleur - * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012 Marcos García - * Copyright (C) 2013 Raphaël Doursenaud +/* Copyright (C) 2001-2004 Rodolphe Quiedeville + * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2005-2012 Regis Houssin + * Copyright (C) 2012 Marcos García + * Copyright (C) 2013-2015 Raphaël Doursenaud * * 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 @@ -311,7 +311,7 @@ if ($resql) if (! empty($conf->categorie->enabled)) { $moreforfilter.=$langs->trans('Categories'). ': '; - $moreforfilter.=$htmlother->select_categories(2,$search_categ,'search_categ'); + $moreforfilter.=$htmlother->select_categories(Categories::TYPE_CUSTOMER,$search_categ,'search_categ'); $moreforfilter.='       '; } // If the user can view prospects other than his'