Doxygen
This commit is contained in:
parent
3acd0bc2ff
commit
a4a805f618
@ -4365,7 +4365,7 @@ class Product extends CommonObject
|
|||||||
* This function need a lot of load. If you use it on list, use a cache to execute it once for each product id.
|
* This function need a lot of load. If you use it on list, use a cache to execute it once for each product id.
|
||||||
* If ENTREPOT_EXTRA_STATUS set, filtering on warehouse status possible.
|
* If ENTREPOT_EXTRA_STATUS set, filtering on warehouse status possible.
|
||||||
*
|
*
|
||||||
* @param string $option '' = Load all stock info, also from closed and internal warehouses,
|
* @param string $option '' = Load all stock info, also from closed and internal warehouses, 'nobatch', 'novirtual'
|
||||||
* @return int < 0 if KO, > 0 if OK
|
* @return int < 0 if KO, > 0 if OK
|
||||||
* @see load_virtual_stock(), loadBatchInfo()
|
* @see load_virtual_stock(), loadBatchInfo()
|
||||||
*/
|
*/
|
||||||
@ -4396,7 +4396,8 @@ class Product extends CommonObject
|
|||||||
$sql.= " WHERE w.entity IN (".getEntity('stock').")";
|
$sql.= " WHERE w.entity IN (".getEntity('stock').")";
|
||||||
$sql.= " AND w.rowid = ps.fk_entrepot";
|
$sql.= " AND w.rowid = ps.fk_entrepot";
|
||||||
$sql.= " AND ps.fk_product = ".$this->id;
|
$sql.= " AND ps.fk_product = ".$this->id;
|
||||||
if ($conf->global->ENTREPOT_EXTRA_STATUS && count($warehouseStatus)) { $sql.= " AND w.statut IN (".$this->db->escape(implode(',', $warehouseStatus)).")";
|
if ($conf->global->ENTREPOT_EXTRA_STATUS && count($warehouseStatus)) {
|
||||||
|
$sql.= " AND w.statut IN (".$this->db->escape(implode(',', $warehouseStatus)).")";
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_syslog(get_class($this)."::load_stock", LOG_DEBUG);
|
dol_syslog(get_class($this)."::load_stock", LOG_DEBUG);
|
||||||
@ -4411,7 +4412,8 @@ class Product extends CommonObject
|
|||||||
$this->stock_warehouse[$row->fk_entrepot] = new stdClass();
|
$this->stock_warehouse[$row->fk_entrepot] = new stdClass();
|
||||||
$this->stock_warehouse[$row->fk_entrepot]->real = $row->reel;
|
$this->stock_warehouse[$row->fk_entrepot]->real = $row->reel;
|
||||||
$this->stock_warehouse[$row->fk_entrepot]->id = $row->rowid;
|
$this->stock_warehouse[$row->fk_entrepot]->id = $row->rowid;
|
||||||
if ((! preg_match('/nobatch/', $option)) && $this->hasbatch()) { $this->stock_warehouse[$row->fk_entrepot]->detail_batch=Productbatch::findAll($this->db, $row->rowid, 1, $this->id);
|
if ((! preg_match('/nobatch/', $option)) && $this->hasbatch()) {
|
||||||
|
$this->stock_warehouse[$row->fk_entrepot]->detail_batch=Productbatch::findAll($this->db, $row->rowid, 1, $this->id);
|
||||||
}
|
}
|
||||||
$this->stock_reel+=$row->reel;
|
$this->stock_reel+=$row->reel;
|
||||||
$i++;
|
$i++;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user