début ajout possibilité de déterminer si le contenu d'une catégorie sera visible ou
non dans la liste des produits/services, ceci afin de pouvoir cacher les sous-produits par exemple.
This commit is contained in:
parent
bd40959922
commit
c3804bdac3
@ -5,7 +5,7 @@ Services=Services
|
|||||||
Product=Product
|
Product=Product
|
||||||
Service=Service
|
Service=Service
|
||||||
Create=Create
|
Create=Create
|
||||||
References=References
|
Reference=Reference
|
||||||
NewProduct=New product
|
NewProduct=New product
|
||||||
NewService=New service
|
NewService=New service
|
||||||
ProductCode=Product code
|
ProductCode=Product code
|
||||||
|
|||||||
@ -5,7 +5,7 @@ Services=Services
|
|||||||
Product=Produit
|
Product=Produit
|
||||||
Service=Service
|
Service=Service
|
||||||
Create=Créer
|
Create=Créer
|
||||||
References=Références
|
Reference=Référence
|
||||||
NewProduct=Nouveau produit
|
NewProduct=Nouveau produit
|
||||||
NewService=Nouveau service
|
NewService=Nouveau service
|
||||||
ProductCode=Code produit
|
ProductCode=Code produit
|
||||||
|
|||||||
@ -281,7 +281,21 @@ class Entrepot
|
|||||||
*/
|
*/
|
||||||
function nb_products()
|
function nb_products()
|
||||||
{
|
{
|
||||||
$sql = "SELECT sum(reel) FROM llx_product_stock WHERE fk_entrepot = ".$this->id;
|
global $conf,$user;
|
||||||
|
|
||||||
|
$sql = "SELECT sum(ps.reel)";
|
||||||
|
$sql .= " FROM llx_product_stock as ps";
|
||||||
|
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
||||||
|
{
|
||||||
|
$sql .= ", ".MAIN_DB_PREFIX."categorie_product as cp";
|
||||||
|
$sql .= ", ".MAIN_DB_PREFIX."categorie as c";
|
||||||
|
}
|
||||||
|
$sql .= " WHERE ps.fk_entrepot = ".$this->id;
|
||||||
|
if ($conf->categorie->enabled && !$user->rights->categorie->voir)
|
||||||
|
{
|
||||||
|
$sql .= " AND cp.fk_product = ps.fk_product";
|
||||||
|
$sql .= " AND cp.fk_categorie = c.rowid AND c.visible = 1";
|
||||||
|
}
|
||||||
|
|
||||||
$result = $this->db->query($sql) ;
|
$result = $this->db->query($sql) ;
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user