If I were you, I would check this:
before this line:
$this->smarty->assign($data);
check if $order_details have correct data, check if there are date_from and date_to
Then in your tpl use dump function and dump like this:
{dump($order_details)}
Check if this has the valid values you are looking for