Merge pull request #23171 from Easya-Solutions/new-inventory-without-kit

NEW inventory without virtual products (kits)
This commit is contained in:
Laurent Destailleur
2023-09-28 00:35:12 +02:00
committed by GitHub

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);