if ($e_obj->getColumn('severity_id') == 20) { $exceptions['med'] = $e_obj->getColumn('count'); } if ($e_obj->getColumn('severity_id') == 30) { $exceptions['high'] = $e_obj->getColumn('count'); } } } else { Debug::Text(' No Exceptions!', __FILE__, __LINE__, __METHOD__, 10); } //Get all pending requests $pending_requests = 0; $rlf = new RequestListFactory(); $rlf->getSumByPayPeriodIdAndStatus($pay_period_obj->getId(), 30); if ($rlf->getRecordCount() > 0) { $pending_requests = $rlf->getCurrent()->getColumn('total'); } $pay_period_data['pending_requests'] = $pending_requests; //Count how many punches are in this pay period. $plf = new PunchListFactory(); $pay_period_data['total_punches'] = $plf->getByPayPeriodId($pay_period_id)->getRecordCount(); Debug::Text(' Total Punches: ' . $pay_period_data['total_punches'], __FILE__, __LINE__, __METHOD__, 10); } //var_dump($pay_period_data); $smarty->assign_by_ref('exceptions', $exceptions); $smarty->assign_by_ref('pay_period_data', $pay_period_data); $smarty->assign_by_ref('current_epoch', TTDate::getTime()); break; } $smarty->assign_by_ref('ppf', $ppf); $smarty->display('payperiod/ViewPayPeriod.tpl');