Closed f1-outsourcing closed 2 years ago
SuiteCRM recals date fields whenever date_start
and duration_*
fields are set.
https://github.com/salesagility/SuiteCRM/blob/51e182b29271876a9518bcef0c5c313c4a273954/modules/Calls/Call.php#L176
Setting date_start
to null
in modules/AsterLink/AsterLinkEntryPoint.php should prevent suitecrm from doing that.
case 'update_call_record':
$callBean = BeanFactory::getBean('Calls', $_POST['id']);
foreach ($_POST['data'] as $k => $v) {
$callBean->{$k} = $v;
}
+ $callBean->date_start = null; // prevent suitecrm from recalculating dates
$callBean->save();
break;
I see, why would someone do this.
1. The first thing I noticed is that the date_end is set to the date_start, when the record is being created. I do not think this is a correct way to enter data into database. It does not make sense setting by default an incorrect value. Just leave the field null.
2. date_end seems to be not included in the update of the call record