forked from Wavyzz/dolibarr
Include Categories class whenever Categorie::TYPE is used
This commit is contained in:
@@ -32,6 +32,7 @@
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -209,6 +209,7 @@ if ($resql)
|
|||||||
$moreforfilter='';
|
$moreforfilter='';
|
||||||
if (! empty($conf->categorie->enabled))
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
|
$moreforfilter.=$formother->select_categories(Categorie::TYPE_MEMBER,$search_categ,'search_categ',1);
|
||||||
$moreforfilter.=' ';
|
$moreforfilter.=' ';
|
||||||
|
|||||||
@@ -299,6 +299,7 @@ if ($resql)
|
|||||||
$moreforfilter='';
|
$moreforfilter='';
|
||||||
if (! empty($conf->categorie->enabled))
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1);
|
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CUSTOMER,$search_categ,'search_categ',1);
|
||||||
$moreforfilter.=' ';
|
$moreforfilter.=' ';
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
|
|
||||||
$langs->load("products");
|
$langs->load("products");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/report.lib.php';
|
|||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/tax.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("categories");
|
$langs->load("categories");
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ if ($result)
|
|||||||
|
|
||||||
if (! empty($conf->categorie->enabled))
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||||
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
$moreforfilter.=$formother->select_categories(Categorie::TYPE_CONTACT,$search_categ,'search_categ',1);
|
||||||
$moreforfilter.=' ';
|
$moreforfilter.=' ';
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ function societe_prepare_head(Societe $object)
|
|||||||
//show categorie tab
|
//show categorie tab
|
||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$type = Categorie::TYPE_CUSTOMER;
|
$type = Categorie::TYPE_CUSTOMER;
|
||||||
if ($object->fournisseur) $type = Categorie::TYPE_SUPPLIER;
|
if ($object->fournisseur) $type = Categorie::TYPE_SUPPLIER;
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/categories/categorie.php?socid='.$object->id."&type=".$type;
|
$head[$h][0] = DOL_URL_ROOT.'/categories/categorie.php?socid='.$object->id."&type=".$type;
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ function contact_prepare_head(Contact $object)
|
|||||||
|
|
||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$type = Categorie::TYPE_CONTACT;
|
$type = Categorie::TYPE_CONTACT;
|
||||||
$head[$tab][0] = DOL_URL_ROOT.'/categories/categorie.php?id='.$object->id."&type=".$type;
|
$head[$tab][0] = DOL_URL_ROOT.'/categories/categorie.php?id='.$object->id."&type=".$type;
|
||||||
$head[$tab][1] = $langs->trans('Categories');
|
$head[$tab][1] = $langs->trans('Categories');
|
||||||
|
|||||||
@@ -71,6 +71,7 @@ function member_prepare_head(Adherent $object)
|
|||||||
// Show category tab
|
// Show category tab
|
||||||
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
if (! empty($conf->categorie->enabled) && ! empty($user->rights->categorie->lire))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$type = Categorie::TYPE_MEMBER;
|
$type = Categorie::TYPE_MEMBER;
|
||||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
||||||
$head[$h][1] = $langs->trans('Categories');
|
$head[$h][1] = $langs->trans('Categories');
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ function product_prepare_head($object)
|
|||||||
/* No more required. Replaced with new multiselect component
|
/* No more required. Replaced with new multiselect component
|
||||||
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire)
|
if (! empty($conf->categorie->enabled) && $user->rights->categorie->lire)
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$type = Categorie::TYPE_PRODUCT;
|
$type = Categorie::TYPE_PRODUCT;
|
||||||
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
$head[$h][0] = DOL_URL_ROOT."/categories/categorie.php?id=".$object->id.'&type='.$type;
|
||||||
$head[$h][1] = $langs->trans('Categories');
|
$head[$h][1] = $langs->trans('Categories');
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ if ($resql)
|
|||||||
$moreforfilter='';
|
$moreforfilter='';
|
||||||
if (! empty($conf->categorie->enabled))
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
$moreforfilter.=$langs->trans('Categories'). ': ';
|
$moreforfilter.=$langs->trans('Categories'). ': ';
|
||||||
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1);
|
$moreforfilter.=$htmlother->select_categories(Categorie::TYPE_SUPPLIER,$search_categ,'search_categ',1);
|
||||||
$moreforfilter.=' ';
|
$moreforfilter.=' ';
|
||||||
|
|||||||
@@ -473,6 +473,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
if (! empty($conf->categorie->enabled))
|
if (! empty($conf->categorie->enabled))
|
||||||
{
|
{
|
||||||
|
require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
|
||||||
print '<tr><td>'.$langs->trans("CategoryFilter").' </td>';
|
print '<tr><td>'.$langs->trans("CategoryFilter").' </td>';
|
||||||
print '<td class="maxwidthonsmartphone">'.$form->select_all_categories(Categorie::TYPE_PRODUCT, $parent).'</td></tr>';
|
print '<td class="maxwidthonsmartphone">'.$form->select_all_categories(Categorie::TYPE_PRODUCT, $parent).'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user