From fd9b6365a76883b487870225d36df6a90c06e038 Mon Sep 17 00:00:00 2001 From: Abbes Bahfir Date: Mon, 7 May 2018 09:19:45 +0100 Subject: [PATCH] New : Translate list element in journal selection --- htdocs/core/class/html.formaccounting.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.formaccounting.class.php b/htdocs/core/class/html.formaccounting.class.php index 18cf165e641..17e437f5223 100644 --- a/htdocs/core/class/html.formaccounting.class.php +++ b/htdocs/core/class/html.formaccounting.class.php @@ -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;