$user = JFactory::getUser();
$canCheckin = $user->authorise('core.manage', 'com_checkin') || $displayData->checked_out == $user->id || $displayData->checked_out == 0;
$userChkOut = JFactory::getUser($displayData->checked_out);
$canDo = CostbenefitprojectionHelper::getActions('company', $displayData, 'companies');
// setup the cause risk list
$causesrisks = '<div class="uk-alert">' . JText::_('COM_COSTBENEFITPROJECTION_NO_CAUSERISK_SELECTED') . '</div>';
if (isset($displayData->causesrisks) && CostbenefitprojectionHelper::checkArray($displayData->causesrisks)) {
    $causesrisks = '';
    $body = '';
    $keys = array('name' => JText::_('COM_COSTBENEFITPROJECTION_NAME'), 'description' => JText::_('COM_COSTBENEFITPROJECTION_DESCRIPTION'), 'ref' => JText::_('REF'), 'importname' => JText::_('COM_COSTBENEFITPROJECTION_FULL_NAME'));
    $getValues = array('name', 'description', 'ref', 'importname');
    // header switces
    $dataSwitch = array('name' => ' data-toggle="true"', 'description' => ' data-hide="phone"', 'ref' => ' data-hide="phone,tablet"', 'importname' => ' data-hide="all"');
    foreach ($displayData->causesrisks as $id) {
        // get cause risk details
        $details = CostbenefitprojectionHelper::getCauseRiskDetails($id, $getValues);
        if (CostbenefitprojectionHelper::checkObject($details)) {
            // build the dl list
            $row = '<tr>';
            foreach ($details as $title => $value) {
                // fix the ref display
                if ('ref' == $title) {
                    $key = explode('.0', $value);
                    $sort = explode('.', $value);
                    $value = implode('.', $key);
                    $sort = implode('', $key);
                    // now set
                    $row .= '<td data-value="' . $sort . '">' . $value . '</td>';
                } else {
                    $row .= '<td>' . $value . '</td>';
                }