mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-13 19:25:22 +01:00
FIX concatenation of labels in extrafields (#36888)
IF: - The extrafield is of type "Select from list" - AND it would use a join as table - AND the label would be a concatenation of fields from both tables THEN, the EF value could not be displayed (showOutputField os showInputField). example of syntax that would trigger this error : `commande c INNER JOIN llx_societe s ON s.rowid = c.fk_soc:s.nom|c.ref:c.rowid::` This commit fixes this.
This commit is contained in:
committed by
GitHub
parent
b304e13499
commit
a025628c97
@@ -1622,6 +1622,7 @@ class ExtraFields
|
||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||
$notrans = true;
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$field_toshow = preg_replace('/^.*\./', '', $field_toshow);
|
||||
$labeltoshow .= $obj->$field_toshow.' ';
|
||||
}
|
||||
} else {
|
||||
@@ -2216,6 +2217,7 @@ class ExtraFields
|
||||
if (is_array($fields_label) && count($fields_label) > 1) {
|
||||
foreach ($fields_label as $field_toshow) {
|
||||
$translabel = '';
|
||||
$field_toshow = preg_replace('/^.*\./', '', $field_toshow);
|
||||
if (!empty($obj->$field_toshow)) {
|
||||
$translabel = $outputlangs->trans($obj->$field_toshow);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user