mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-20 07:43:18 +01:00
Better log
This commit is contained in:
@@ -803,10 +803,7 @@ class Export
|
||||
$remaintopay = $tmpobjforcomputecall->getRemainToPay();
|
||||
}
|
||||
$obj->$alias = $remaintopay;
|
||||
} elseif (is_array($item) &&
|
||||
array_key_exists('rule', $item) &&
|
||||
$item['rule'] == 'compute'
|
||||
) {
|
||||
} elseif (is_array($item) && array_key_exists('rule', $item) && $item['rule'] == 'compute') {
|
||||
// Custom compute
|
||||
$alias = str_replace(array('.', '-', '(', ')'), '_', $key);
|
||||
$value = '';
|
||||
@@ -853,11 +850,11 @@ class Export
|
||||
// TODO FIXME
|
||||
// Export of compute field does not work. $obj contains $obj->alias_field and formula may contains $obj->field
|
||||
// Also the formula may contains objects of class that are not loaded.
|
||||
$computestring = is_string($item) ? $item : json_encode($item);
|
||||
//$computestring = is_string($item) ? $item : json_encode($item);
|
||||
//$tmp = (string) dol_eval($computestring, 1, 0, '2');
|
||||
//$obj->$alias = $tmp;
|
||||
|
||||
$this->error = "ERROPNOTSUPPORTED. Operation ".$computestring." not supported. Export of 'computed' extrafields is not yet supported, please remove field.";
|
||||
$this->error = "ERRORNOTSUPPORTED. Operation not supported. Export of ".var_export($key, true).' '.var_export($item, true)." extrafields is not yet supported, please remove field.";
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user