Ver Fonte

NEW: extrafields computed numeric and totalizable are correctly calculated in total table row

Florian HENRY há 3 anos atrás
pai
commit
089289d13b
1 ficheiros alterados com 3 adições e 0 exclusões
  1. 3 0
      htdocs/core/tpl/extrafields_list_print_fields.tpl.php

+ 3 - 0
htdocs/core/tpl/extrafields_list_print_fields.tpl.php

@@ -39,6 +39,9 @@ if (!empty($extrafieldsobjectkey) && !empty($extrafields->attributes[$extrafield
 					//var_dump($obj);
 					//var_dump($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]);
 					$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);
 				}