}
        $rhf->setDayOfMonth($data['day_of_month']);
        $rhf->setMonth($data['month']);
        if ($rhf->isValid()) {
            $rhf->Save();
            Redirect::Page(URLBuilder::getURL(NULL, 'RecurringHolidayList.php'));
            break;
        }
    default:
        if (isset($id)) {
            BreadCrumb::setCrumb($title);
            $rhlf = new RecurringHolidayListFactory();
            $rhlf->getByIdAndCompanyID($id, $current_company->getID());
            foreach ($rhlf as $rh_obj) {
                //Debug::Arr($station,'Department', __FILE__, __LINE__, __METHOD__,10);
                $data = array('id' => $rh_obj->getId(), 'name' => $rh_obj->getName(), 'type_id' => $rh_obj->getType(), 'special_day_id' => $rh_obj->getSpecialDay(), 'week_interval' => $rh_obj->getWeekInterval(), 'pivot_day_direction_id' => $rh_obj->getPivotDayDirection(), 'day_of_week' => $rh_obj->getDayOfWeek(), 'day_of_month' => $rh_obj->getDayOfMonth(), 'month' => $rh_obj->getMonth(), 'created_date' => $rh_obj->getCreatedDate(), 'created_by' => $rh_obj->getCreatedBy(), 'updated_date' => $rh_obj->getUpdatedDate(), 'updated_by' => $rh_obj->getUpdatedBy(), 'deleted_date' => $rh_obj->getDeletedDate(), 'deleted_by' => $rh_obj->getDeletedBy());
            }
        }
        //Select box options;
        $data['special_day_options'] = $rhf->getOptions('special_day');
        $data['type_options'] = $rhf->getOptions('type');
        $data['week_interval_options'] = $rhf->getOptions('week_interval');
        $data['pivot_day_direction_options'] = $rhf->getOptions('pivot_day_direction');
        $data['day_of_week_options'] = TTDate::getDayOfWeekArray();
        $data['month_of_year_options'] = TTDate::getMonthOfYearArray();
        $data['day_of_month_options'] = TTDate::getDayOfMonthArray();
        $smarty->assign_by_ref('data', $data);
        break;
}
$smarty->assign_by_ref('rhf', $rhf);
$smarty->display('policy/EditRecurringHoliday.tpl');