HAR-19 Fix missing shared supplier orders in product related objects.

This commit is contained in:
Francis Appels 2022-08-11 18:49:04 +02:00
parent 03dc21bef2
commit 38ea28813f

View File

@ -150,7 +150,7 @@ if ($id > 0 || !empty($ref)) {
$sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
}
$sql .= " WHERE c.fk_soc = s.rowid";
$sql .= " AND c.entity = ".$conf->entity;
$sql .= " AND c.entity IN (".getEntity('supplier_order').")";
$sql .= " AND d.fk_commande = c.rowid";
$sql .= " AND d.fk_product = ".((int) $product->id);
if (!empty($search_month)) {