Merge pull request #14712 from indelog/12.0

Fix: short label of unit in Product::getLabelOfUnit()
This commit is contained in:
Laurent Destailleur 2020-09-12 01:10:13 +02:00 committed by GitHub
commit 29a45c46d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5392,7 +5392,7 @@ class Product extends CommonObject
$resql = $this->db->query($sql);
if ($resql && $this->db->num_rows($resql) > 0) {
$res = $this->db->fetch_array($resql);
$label = ($label_type == 'short' ? $res[$label_type] : 'unit'.$res['code']);
$label = ($label_type == 'short_label' ? $res[$label_type] : 'unit'.$res['code']);
$this->db->free($resql);
return $label;
}