Merge pull request #8757 from bafbes/abb7004

New : Translate list elements in journal selection
This commit is contained in:
Laurent Destailleur 2018-05-10 12:15:34 +02:00 committed by GitHub
commit d020741173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;