fix warnings
This commit is contained in:
parent
1933072712
commit
56afefd6ad
@ -2666,14 +2666,14 @@ class Product extends CommonObject
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."bom_bomline as bl ON bl.fk_bom=b.rowid";
|
||||
$sql .= " WHERE ";
|
||||
$sql .= " b.entity IN (".getEntity('bom').")";
|
||||
$sql .= " AND b.fk_product =".$this->id;
|
||||
$sql .= " AND b.fk_product =".((int) $this->id);
|
||||
$sql .= " GROUP BY b.rowid";
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
$this->stats_bom['nb_toproduce'] = $obj->nb_toproduce ? $obj->nb_toproduce : 0;
|
||||
$this->stats_bom['qty_toproduce'] = $obj->qty_toproduce ? price2num($obj->qty_toproduce) : 0;
|
||||
$this->stats_bom['nb_toproduce'] = !empty($obj->nb_toproduce) ? $obj->nb_toproduce : 0;
|
||||
$this->stats_bom['qty_toproduce'] = !empty($obj->qty_toproduce) ? price2num($obj->qty_toproduce) : 0;
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$error++;
|
||||
@ -2685,13 +2685,13 @@ class Product extends CommonObject
|
||||
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."bom_bomline as bl ON bl.fk_bom=b.rowid";
|
||||
$sql .= " WHERE ";
|
||||
$sql .= " b.entity IN (".getEntity('bom').")";
|
||||
$sql .= " AND bl.fk_product =".$this->id;
|
||||
$sql .= " AND bl.fk_product =".((int) $this->id);
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
$this->stats_bom['nb_toconsume'] = $obj->nb_toconsume ? $obj->nb_toconsume : 0;
|
||||
$this->stats_bom['qty_toconsume'] = $obj->qty_toconsume ? price2num($obj->qty_toconsume) : 0;
|
||||
$this->stats_bom['nb_toconsume'] = !empty($obj->nb_toconsume) ? $obj->nb_toconsume : 0;
|
||||
$this->stats_bom['qty_toconsume'] = !empty($obj->qty_toconsume) ? price2num($obj->qty_toconsume) : 0;
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
$error++;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user