Fix warning when using extrafield separator
This commit is contained in:
parent
8a400f0e6f
commit
347d9c3e93
@ -8026,7 +8026,6 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
if ($object->fetch_optionals() > 0) {
|
||||
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0) {
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) {
|
||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = $object->array_options['options_'.$key];
|
||||
if ($extrafields->attributes[$object->table_element]['type'][$key] == 'date') {
|
||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = dol_print_date($object->array_options['options_'.$key], 'day');
|
||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'_LOCALE__'] = dol_print_date($object->array_options['options_'.$key], 'day', 'tzserver', $outputlangs);
|
||||
@ -8042,6 +8041,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] == 'price') {
|
||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = $object->array_options['options_'.$key];
|
||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'_FORMATED__'] = price($object->array_options['options_'.$key]);
|
||||
} elseif ($extrafields->attributes[$object->table_element]['type'][$key] != 'separator') {
|
||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = $object->array_options['options_'.$key];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user