Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2023-09-28 01:01:18 +02:00
commit 79f1c7be95

View file

@ -309,6 +309,13 @@ class Inventory extends CommonObject
$sql .= " AND cp.fk_categorie IN (".$this->db->sanitize($this->categories_product).")";
$sql .= ")";
}
if (getDolGlobalInt('PRODUIT_SOUSPRODUITS')) {
$sql .= " AND NOT EXISTS (";
$sql .= " SELECT pa.rowid";
$sql .= " FROM ".$this->db->prefix()."product_association as pa";
$sql .= " WHERE pa.fk_product_pere = ps.fk_product";
$sql .= ")";
}
$inventoryline = new InventoryLine($this->db);