Fix: use "supplier" instead "reseller"
This commit is contained in:
parent
1522a5b22d
commit
e8afd7e833
@ -2654,7 +2654,7 @@ class Form
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON pfp.fk_soc = s.rowid";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('productresellerprice').")";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('productsupplierprice').")";
|
||||
$sql.= " AND p.tobuy = 1";
|
||||
$sql.= " AND s.fournisseur = 1";
|
||||
$sql.= " AND p.rowid = ".$productid;
|
||||
|
||||
@ -530,7 +530,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."product_fournisseur_price as pfp";
|
||||
$sql.= ", ".MAIN_DB_PREFIX."societe as s";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('productresellerprice').")";
|
||||
$sql.= " WHERE pfp.entity IN (".getEntity('productsupplierprice').")";
|
||||
$sql.= " AND pfp.fk_soc = s.rowid";
|
||||
$sql.= " AND s.status=1"; // only enabled company selected
|
||||
$sql.= " AND pfp.fk_product = ".$prodid;
|
||||
|
||||
@ -3081,7 +3081,7 @@ class Product extends CommonObject
|
||||
$sql.= " WHERE fk_soc = ".$id_fourn;
|
||||
$sql.= " AND ref_fourn = '".$this->db->escape($ref_fourn)."'";
|
||||
$sql.= " AND fk_product != ".$this->id;
|
||||
$sql.= " AND entity IN (".getEntity('productresellerprice').")";
|
||||
$sql.= " AND entity IN (".getEntity('productsupplierprice').")";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
@ -3104,7 +3104,7 @@ class Product extends CommonObject
|
||||
else $sql.= " AND (ref_fourn = '' OR ref_fourn IS NULL)";
|
||||
$sql.= " AND quantity = '".$quantity."'";
|
||||
$sql.= " AND fk_product = ".$this->id;
|
||||
$sql.= " AND entity IN (".getEntity('productresellerprice').")";
|
||||
$sql.= " AND entity IN (".getEntity('productsupplierprice').")";
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user