On dict, test $obj->code if empty before translation
This commit is contained in:
parent
2fdd8486c9
commit
56bb2bbd14
@ -2015,13 +2015,13 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
|
||||
print '<td class="'.$classtd.'">';
|
||||
$transfound = 0;
|
||||
$transkey = '';
|
||||
if (in_array($fieldlist[$field], array('label', 'libelle')) and !empty($obj->code)) // For label
|
||||
if (in_array($fieldlist[$field], array('label', 'libelle'))) // For label
|
||||
{
|
||||
// Special case for labels
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_civility') {
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_civility' && !empty($obj->code)) {
|
||||
$transkey = "Civility".strtoupper($obj->code);
|
||||
}
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_payment_term') {
|
||||
if ($tabname == MAIN_DB_PREFIX.'c_payment_term' && !empty($obj->code)) {
|
||||
$langs->load("bills");
|
||||
$transkey = "PaymentConditionShort".strtoupper($obj->code);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user