Added ability to assign a category of product to a customer
This commit is contained in:
parent
e8861bc524
commit
b8410445ff
@ -826,6 +826,7 @@ class Categorie
|
|||||||
|
|
||||||
return implode($sep, $w);
|
return implode($sep, $w);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retourne un tableau contenant la liste des catégories mères
|
* Retourne un tableau contenant la liste des catégories mères
|
||||||
*/
|
*/
|
||||||
@ -838,12 +839,19 @@ class Categorie
|
|||||||
|
|
||||||
$res = $this->db->query ($sql);
|
$res = $this->db->query ($sql);
|
||||||
|
|
||||||
while ($cat = $this->db->fetch_array ($res))
|
if ($res)
|
||||||
{
|
{
|
||||||
$meres[] = new Categorie ($this->db, $cat['fk_categorie_mere']);
|
while ($cat = $this->db->fetch_array ($res))
|
||||||
|
{
|
||||||
|
$meres[] = new Categorie ($this->db, $cat['fk_categorie_mere']);
|
||||||
|
}
|
||||||
|
return $meres;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dolibarr_print_error ($this->db);
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $meres;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -132,6 +132,20 @@ if ($type == 0 && $conf->global->CATEGORY_ASSIGNED_TO_A_CUSTOMER)
|
|||||||
print $langs->trans("AssignedToTheCustomer").'</td><td>';
|
print $langs->trans("AssignedToTheCustomer").'</td><td>';
|
||||||
print $soc->getNomUrl(1);
|
print $soc->getNomUrl(1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
$catsMeres = $c->get_meres ();
|
||||||
|
|
||||||
|
if ($catsMeres < 0)
|
||||||
|
{
|
||||||
|
dolibarr_print_error();
|
||||||
|
}
|
||||||
|
else if (count($catsMeres) > 0)
|
||||||
|
{
|
||||||
|
print '<tr><td width="20%" class="notopnoleft">';
|
||||||
|
print $langs->trans("CategoryContents").'</td><td>';
|
||||||
|
print ($c->visible ? $langs->trans("Visible") : $langs->trans("Invisible"));
|
||||||
|
print '</td></tr>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -74,3 +74,4 @@ ThisCategoryHasNoCustomer=This category does not contain any customer.
|
|||||||
AssignedToCustomer=Assigned to a customer
|
AssignedToCustomer=Assigned to a customer
|
||||||
AssignedToTheCustomer=Assigned to the customer
|
AssignedToTheCustomer=Assigned to the customer
|
||||||
InternalCategory=Inernal category
|
InternalCategory=Inernal category
|
||||||
|
CategoryContents=Category contents
|
||||||
@ -74,3 +74,4 @@ ThisCategoryHasNoCustomer=Cette cat
|
|||||||
AssignedToCustomer=Attribuer à un client
|
AssignedToCustomer=Attribuer à un client
|
||||||
AssignedToTheCustomer=Attribué au client
|
AssignedToTheCustomer=Attribué au client
|
||||||
InternalCategory=Catégorie interne
|
InternalCategory=Catégorie interne
|
||||||
|
CategoryContents=Contenu de la catégorie
|
||||||
Loading…
Reference in New Issue
Block a user