2
0
forked from Wavyzz/dolibarr
This commit is contained in:
Laurent Destailleur
2024-06-22 19:13:08 +02:00
parent 58df1b74a9
commit 3ef67a68cc

View File

@@ -3570,7 +3570,7 @@ class Product extends CommonObject
$sql .= ", ".$this->db->prefix()."societe_commerciaux as sc";
}
$sql .= " WHERE m.rowid = mp.fk_mo";
$sql .= " AND m.entity IN (".getEntity($forVirtualStock && getDolGlobalString('STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE') ? 'stock' : 'mrp').")";
$sql .= " AND m.entity IN (".getEntity(($forVirtualStock && getDolGlobalString('STOCK_CALCULATE_VIRTUAL_STOCK_TRANSVERSE_MODE')) ? 'stock' : 'mrp').")";
$sql .= " AND mp.fk_product = ".((int) $this->id);
$sql .= " AND mp.disable_stock_change IN (0)";
if (!$user->hasRight('societe', 'client', 'voir') && !$forVirtualStock) {