New : Translate list element in journal selection

This commit is contained in:
Abbes Bahfir 2018-05-07 09:19:45 +01:00
parent 5fe8249706
commit fd9b6365a7

View File

@ -64,7 +64,7 @@ class FormAccounting extends Form
*/
function select_journal($selectid, $htmlname = 'journal', $nature=0, $showempty = 0, $select_in = 0, $select_out = 0, $morecss='maxwidth300 maxwidthonsmartphone', $usecache='', $disabledajaxcombo=0)
{
global $conf;
global $conf,$langs;
$out = '';
@ -93,9 +93,10 @@ class FormAccounting extends Form
}
$selected = 0;
$langs->load('accountancy');
while ($obj = $this->db->fetch_object($resql))
{
$label = $obj->code . ' - ' . $obj->label;
$label = $obj->code . ' - ' . $langs->trans($obj->label);
$select_value_in = $obj->rowid;
$select_value_out = $obj->rowid;