Fix #6497 : deposit lines were not translated

This commit is contained in:
Maxime Kohlhaas 2019-11-30 16:14:16 +01:00
parent 2c165d0a61
commit 558669dd88
3 changed files with 6 additions and 1 deletions

View File

@ -1314,7 +1314,7 @@ if (empty($reshook))
if (empty($amount)) continue;
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
$descline = $langs->trans('Deposit');
$descline = '(DEPOSIT)';
//$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
if ($typeamount=='amount') {
$descline.= ' ('. price($valuedeposit, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).')';

View File

@ -1238,6 +1238,9 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl
if (! empty($prodser->multilangs[$outputlangs->defaultlang]["note"]) && ($textwasmodified || $translatealsoifmodified)) $note=$prodser->multilangs[$outputlangs->defaultlang]["note"];
}
}
elseif ($object->type == Facture::TYPE_DEPOSIT && $object->element == 'facture') {
$desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc);
}
// Description short of product line
$libelleproduitservice=$label;

View File

@ -137,6 +137,8 @@ $domData .= ' data-product_type="'.$line->product_type.'"';
if (! empty($line->label)) {
$text.= ' <strong>'.$line->label.'</strong>';
echo $form->textwithtooltip($text,dol_htmlentitiesbr($line->description),3,'','',$i,0,(!empty($line->fk_parent_line)?img_picto('', 'rightarrow'):''));
} elseif (strpos($line->description, '(DEPOSIT)') === 0) {
echo $text.' '.str_replace('(DEPOSIT)', $langs->trans("Deposit"), $line->description);;
} else {
if (! empty($line->fk_parent_line)) echo img_picto('', 'rightarrow');
echo $text.' '.dol_htmlentitiesbr($line->description);