This commit is contained in:
Laurent Destailleur 2017-10-22 03:47:36 +02:00
parent fb843430bf
commit 5984222794
2 changed files with 4 additions and 3 deletions

View File

@ -3812,7 +3812,7 @@ abstract class CommonObject
$this->tpl['price'] = price($line->subprice);
$this->tpl['multicurrency_price'] = price($line->multicurrency_subprice);
$this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' ';
if($conf->global->PRODUCT_USE_UNITS) $this->tpl['unit'] = $line->getLabelOfUnit('long');
if ($conf->global->PRODUCT_USE_UNITS) $this->tpl['unit'] = $langs->transnoentities($line->getLabelOfUnit('long'));
$this->tpl['remise_percent'] = (($line->info_bits & 2) != 2) ? vatrate($line->remise_percent, true) : ' ';
// Is the line strike or not

View File

@ -51,8 +51,9 @@ abstract class CommonObjectLine extends CommonObject
/**
* Returns the text label from units dictionary
*
* Returns the translation key from units dictionary.
* A langs->trans() must be called on result to get translated value.
*
* @param string $type Label type (long or short)
* @return string|int <0 if ko, label if ok
*/