I'm trying to calculate a date for a follow up call based on customer type, having some issues with the code in the calc element. When I enable the code the list won't load.
My code is
Is this the correct way to do it?
Marc
My code is
PHP:
$followup = new DateTime('{missed_sales___date_time}');
$type = str('{missed_sales___enquiry_for}');
$val = int();
if ($type == "cv") {
$val = 14;
} elseif ($type == "ncv") {
$val = 2;
} else {
$val = -1000000;
}
$followup->modify('+{$val} day');
return $followup->format('d-m-Y');
Is this the correct way to do it?
Marc
Last edited: