Merge pull request #21865 from fappels/16_best_buy_price_sharing

FIX: Sharing of best buy price
This commit is contained in:
Laurent Destailleur 2022-08-24 18:06:55 +02:00 committed by GitHub
commit 808a1e82b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -808,7 +808,7 @@ class ProductFournisseur extends Product
$sql .= " ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code";
$sql .= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."product_fournisseur_price as pfp";
$sql .= " WHERE s.entity IN (".getEntity('societe').")";
$sql .= " AND pfp.entity = ".$conf->entity; // only current entity
$sql .= " AND pfp.entity IN (".getEntity('productsupplierprice').")";
$sql .= " AND pfp.fk_product = ".((int) $prodid);
$sql .= " AND pfp.fk_soc = s.rowid";
$sql .= " AND s.status = 1"; // only enabled society