From cd22cc70c8a307f4feda0cde338b7a799712fdb3 Mon Sep 17 00:00:00 2001 From: Alexandre SPANGARO Date: Mon, 29 Jul 2019 06:41:51 +0200 Subject: [PATCH] FIX FEC Format - Save translation of the journal --- htdocs/accountancy/class/bookkeeping.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 21e43b524d7..67633e828a5 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -472,14 +472,15 @@ class BookKeeping extends CommonObject */ public function createStd(User $user, $notrigger = false, $mode='') { - global $conf; + global $conf, $langs; + + $langs->loadLangs(array("accountancy", "bills", "compta")); dol_syslog(__METHOD__, LOG_DEBUG); $error = 0; // Clean parameters - if (isset($this->doc_type)) { $this->doc_type = trim($this->doc_type); } @@ -546,7 +547,7 @@ class BookKeeping extends CommonObject $now = dol_now(); // Check parameters - // Put here code to add control on parameters values + $this->journal_label = $langs->trans($this->journal_label); // Insert request $sql = 'INSERT INTO ' . MAIN_DB_PREFIX . $this->table_element . $mode.' (';