|
@@ -431,13 +431,13 @@ class BOM extends CommonObject
|
|
|
if (count($filter) > 0) {
|
|
|
foreach ($filter as $key => $value) {
|
|
|
if ($key == 't.rowid') {
|
|
|
- $sqlwhere[] = $key.'='.$value;
|
|
|
+ $sqlwhere[] = $key.' = '.((int) $value);
|
|
|
} elseif (strpos($key, 'date') !== false) {
|
|
|
- $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
|
|
|
+ $sqlwhere[] = $key." = '".$this->db->idate($value)."'";
|
|
|
} elseif ($key == 'customsql') {
|
|
|
$sqlwhere[] = $value;
|
|
|
} else {
|
|
|
- $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
|
|
|
+ $sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'";
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -946,7 +946,7 @@ class BOM extends CommonObject
|
|
|
$this->lines = array();
|
|
|
|
|
|
$objectline = new BOMLine($this->db);
|
|
|
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_bom = '.$this->id));
|
|
|
+ $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_bom = '.((int) $this->id)));
|
|
|
|
|
|
if (is_numeric($result)) {
|
|
|
$this->error = $this->error;
|