Hi,
I have created a custom scheduler, which runs fine, but it gives me the following warning:
Warning [2]: Undefined array key "calculated" over /var/www/html/include/Expressions/DependencyManager.php op regel 188
I feel like this is a bug, but maybe anyone here has an explanation?
The scheduler runs the following code:
$bean = BeanFactory::retrieveBean('Quotes', "ed55fc4e-b3cc-11ef-94ac-0242ac120007");
$bean->quote_stage = 'Concept offerte';
$bean->projectcode_c = '123746';
$bean->save();
Performing a postman request to the REST API setting the same values does not result in any warnings. Any idea why this warning occurs?
Looking in the source code of Sugar I get to this line of code:
if (!empty($def['required']) && isset($def['required_formula']) && !$def['calculated']) {
...
}
I would expect either the sugar code has to be changed to:
&& (!array_key_exists('calculated', $def) || !$def['calculated'])
OR we have to figure out why $def['calculated'] is not being set.
I am running version 13.0.3
Update: running the same code on another module, does not give the same error, so it is related to the quote module. Maybe it has something to do with calculations of totals of quote line items or something?
Kind regards,
Stijn