Fix: label of input method not translated.
This commit is contained in:
parent
ac2ff5c604
commit
c30f13a03d
@ -6,6 +6,7 @@ English Dolibarr ChangeLog
|
||||
***** ChangeLog for 3.6.2 compared to 3.6.1 *****
|
||||
- Fix: fix ErrorBadValueForParamNotAString error message in price customer multiprice
|
||||
- Fix: bug 1588 : relative discount
|
||||
- Fix: label of input method not tranlated.
|
||||
|
||||
***** ChangeLog for 3.6.1 compared to 3.6.* *****
|
||||
For users:
|
||||
|
||||
@ -2016,7 +2016,8 @@ class CommandeFournisseur extends CommonOrder
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the translated input method
|
||||
* Returns the translated input method of object (defined if $this->methode_commande_id > 0).
|
||||
* This function make a sql request to get translation. No cache yet, try to not use it inside a loop.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
@ -2026,21 +2027,19 @@ class CommandeFournisseur extends CommonOrder
|
||||
|
||||
if ($this->methode_commande_id > 0)
|
||||
{
|
||||
$sql = "SELECT rowid, code, libelle";
|
||||
$sql = "SELECT rowid, code, libelle as label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX.'c_input_method';
|
||||
$sql.= " WHERE active=1 AND rowid = ".$db->escape($this->methode_commande_id);
|
||||
|
||||
$query = $db->query($sql);
|
||||
|
||||
if ($query && $db->num_rows($query))
|
||||
{
|
||||
$result = $db->fetch_object($query);
|
||||
$obj = $db->fetch_object($query);
|
||||
|
||||
$string = $langs->trans($result->code);
|
||||
|
||||
if ($string == $result->code)
|
||||
$string = $langs->trans($obj->code);
|
||||
if ($string == $obj->code)
|
||||
{
|
||||
$string = $obj->libelle != '-' ? $obj->libelle : '';
|
||||
$string = $obj->label != '-' ? $obj->label : '';
|
||||
}
|
||||
|
||||
return $string;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user