Merge pull request #20778 from FHenry/dev_new_total_list_computed_fields
NEW: extrafields computed numeric and totalizable are correctly calculated in total table row
This commit is contained in:
commit
03ffbabb4a
@ -39,6 +39,9 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
|
|||||||
//var_dump($obj);
|
//var_dump($obj);
|
||||||
//var_dump($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]);
|
//var_dump($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]);
|
||||||
$value = dol_eval($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key], 1, 1, '0');
|
$value = dol_eval($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key], 1, 1, '0');
|
||||||
|
if (is_numeric(price2num($value)) && $extrafields->attributes[$extrafieldsobjectkey]['totalizable'][$key]) {
|
||||||
|
$obj->$tmpkey = price2num($value);
|
||||||
|
}
|
||||||
//var_dump($value);
|
//var_dump($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user