Skip to content

Commit

Permalink
fix for unit with rowid (netmeasure)
Browse files Browse the repository at this point in the history
  • Loading branch information
ptibogxiv committed Feb 11, 2020
1 parent 558ccdd commit f17c7f4
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion htdocs/core/lib/product.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,14 @@ function measuringUnitString($unit, $measuring_style = '', $scale = '', $use_sho
require_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
$measuringUnits= new CUnits($db);

if ($scale !== '')
if ($measuring_style == '' && $scale == '')
{
$arrayforfilter = array(
't.rowid' => $unit,
't.active' => 1
);
}
elseif ($scale !== '')
{
$arrayforfilter = array(
't.scale' => $scale,
Expand Down

0 comments on commit f17c7f4

Please sign in to comment.