commit
f6ac2d2545
@ -5387,11 +5387,11 @@ class Product extends CommonObject
|
||||
$label_type = 'short_label';
|
||||
}
|
||||
|
||||
$sql = 'select '.$label_type.' from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit;
|
||||
$sql = 'select '.$label_type.', code from '.MAIN_DB_PREFIX.'c_units where rowid='.$this->fk_unit;
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql && $this->db->num_rows($resql) > 0) {
|
||||
$res = $this->db->fetch_array($resql);
|
||||
$label = $res[$label_type];
|
||||
$label = ($label_type == 'short' ? $res[$label_type] : 'unit'.$res['code']);
|
||||
$this->db->free($resql);
|
||||
return $label;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user