$rsc_obj->Save();
             }
         }
     }
     Redirect::Page(URLBuilder::getURL(NULL, 'RecurringScheduleControlList.php'));
     break;
 case 'search_form_delete':
 case 'search_form_update':
 case 'search_form_save':
 case 'search_form_clear':
 case 'search_form_search':
     Debug::Text('Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10);
     $saved_search_id = UserGenericDataFactory::searchFormDataHandler($action, $filter_data, URLBuilder::getURL(NULL, 'RecurringScheduleControlList.php'));
 default:
     BreadCrumb::setCrumb($title);
     extract(UserGenericDataFactory::getSearchFormData($saved_search_id, $sort_column));
     Debug::Text('Sort Column: ' . $sort_column, __FILE__, __LINE__, __METHOD__, 10);
     Debug::Text('Saved Search ID: ' . $saved_search_id, __FILE__, __LINE__, __METHOD__, 10);
     if (isset($filter_template_id) and $filter_template_id != '') {
         $filter_data['template_id'] = array($filter_template_id);
     }
     $sort_array = NULL;
     if ($sort_column != '') {
         $sort_array = array(Misc::trimSortPrefix($sort_column) => $sort_order);
     }
     URLBuilder::setURL($_SERVER['SCRIPT_NAME'], array('sort_column' => Misc::trimSortPrefix($sort_column), 'sort_order' => $sort_order, 'saved_search_id' => $saved_search_id, 'page' => $page));
     $rsclf = new RecurringScheduleControlListFactory();
     $ulf = new UserListFactory();
     if ($permission->Check('recurring_schedule', 'view') == FALSE) {
         if ($permission->Check('recurring_schedule', 'view_child')) {
             $filter_data['permission_children_ids'] = $permission_children_ids;
     if (is_object($user_obj)) {
         $is_owner = $permission->isOwner($user_obj->getCreatedBy(), $user_obj->getID());
         $is_child = $permission->isChild($user_obj->getId(), $permission_children_ids);
         if ($permission->Check('user_tax_deduction', 'view') or $permission->Check('user_tax_deduction', 'view_own') and $is_owner === TRUE or $permission->Check('user_tax_deduction', 'view_child') and $is_child === TRUE) {
             foreach ($udlf as $ud_obj) {
                 $cd_obj = $ud_obj->getCompanyDeductionObject();
                 $rows[] = array('id' => $ud_obj->getId(), 'status_id' => $cd_obj->getStatus(), 'user_id' => $ud_obj->getUser(), 'name' => $cd_obj->getName(), 'type_id' => $cd_obj->getType(), 'type' => Option::getByKey($cd_obj->getType(), $cd_obj->getOptions('type')), 'calculation' => Option::getByKey($cd_obj->getCalculation(), $cd_obj->getOptions('calculation')), 'is_owner' => $is_owner, 'is_child' => $is_child, 'deleted' => $ud_obj->getDeleted());
             }
         }
     }
 }
 $smarty->assign_by_ref('rows', $rows);
 $smarty->assign_by_ref('user_id', $user_id);
 $ulf = new UserListFactory();
 $filter_data = NULL;
 extract(UserGenericDataFactory::getSearchFormData($saved_search_id, NULL));
 if ($permission->Check('user_tax_deduction', 'view') == FALSE) {
     if ($permission->Check('user_tax_deduction', 'view_child')) {
         $filter_data['permission_children_ids'] = $permission_children_ids;
     }
     if ($permission->Check('user_tax_deduction', 'view_own')) {
         $filter_data['permission_children_ids'][] = $current_user->getId();
     }
 }
 $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), $filter_data);
 $user_options = UserListFactory::getArrayByListFactory($ulf, FALSE, TRUE);
 $smarty->assign_by_ref('user_options', $user_options);
 $smarty->assign_by_ref('sort_column', $sort_column);
 $smarty->assign_by_ref('sort_order', $sort_order);
 $smarty->assign_by_ref('saved_search_id', $saved_search_id);
 $smarty->assign_by_ref('paging_data', $pager->getPageVariables());