Fix : Display supplier prices for shared products in multicompany context (#35600)
* Update SQL join condition for supplier prices to respect multi-entity context. * Update SQL join condition for product supplier prices to use correct entity. --------- Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
parent
ae39bedf27
commit
049fe9f201
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ $sql .= " FROM ".MAIN_DB_PREFIX."product as p";
|
|||
if ($catid) {
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_product as cp ON cp.fk_product = p.rowid";
|
||||
}
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as ppf ON p.rowid = ppf.fk_product AND p.entity = ppf.entity";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as ppf ON p.rowid = ppf.fk_product AND ppf.entity IN (".getEntity('product_fournisseur_price').")";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON ppf.fk_soc = s.rowid AND s.entity IN (".getEntity('societe').")";
|
||||
$sql .= " WHERE p.entity IN (".getEntity('product').")";
|
||||
if ($sRefSupplier) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue