forked from Wavyzz/dolibarr
FIX #11861 Not consistent code to manage measuring units
This commit is contained in:
@@ -4522,7 +4522,7 @@ function price2num($amount, $rounding = '', $alreadysqlnb = 0)
|
||||
* Output a dimension with best unit
|
||||
*
|
||||
* @param float $dimension Dimension
|
||||
* @param int $unit Unit of dimension (Example: 0=kg, -3=g, 98=ounce, 99=pound, ...)
|
||||
* @param int $unit Unit scale of dimension (Example: 0=kg, -3=g, -6=mg, 98=ounce, 99=pound, ...)
|
||||
* @param string $type 'weight', 'volume', ...
|
||||
* @param Translate $outputlangs Translate language object
|
||||
* @param int $round -1 = non rounding, x = number of decimal
|
||||
@@ -4566,7 +4566,7 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round
|
||||
$unit = $forceunitoutput;
|
||||
}*/
|
||||
|
||||
$ret=price($dimension, 0, $outputlangs, 0, 0, $round).' '.measuring_units_string($unit, $type);
|
||||
$ret=price($dimension, 0, $outputlangs, 0, 0, $round).' '.measuring_units_string(0, $type, $unit);
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user