Skip to content
Snippets Groups Projects
Commit e1a92c82 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Merge pull request #3506 from atm-maxime/3.6

Fix multientity stock management (F.Henry followup)
parents 70df5538 c6081f0f
Branches
Tags
No related merge requests found
......@@ -2994,7 +2994,7 @@ class Product extends CommonObject
$sql = "SELECT ps.reel, ps.fk_entrepot, ps.pmp, ps.rowid";
$sql.= " FROM ".MAIN_DB_PREFIX."product_stock as ps";
$sql.= ", ".MAIN_DB_PREFIX."entrepot as w";
$sql.= " WHERE w.entity IN (".getEntity('warehouse', 1).")";
$sql.= " WHERE w.entity IN (".getEntity('stock', 1).")";
$sql.= " AND w.rowid = ps.fk_entrepot";
$sql.= " AND ps.fk_product = ".$this->id;
......
......@@ -358,7 +358,7 @@ class Entrepot extends CommonObject
$sql = "SELECT rowid, label";
$sql.= " FROM ".MAIN_DB_PREFIX."entrepot";
$sql.= " WHERE entity IN (".getEntity('warehouse', 1).")";
$sql.= " WHERE entity IN (".getEntity('stock', 1).")";
$sql.= " AND statut = ".$status;
$result = $this->db->query($sql);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment