//Select box options;
 $status_options_filter = array(50);
 if (isset($pay_stub_amendment) and $pay_stub_amendment->getStatus() == 55) {
     $status_options_filter = array(55);
 } elseif (isset($pay_stub_amendment) and $pay_stub_amendment->getStatus() == 52) {
     $status_options_filter = array(52);
 }
 if (!isset($pay_stub_amendment_data['filter_user_id'])) {
     $pay_stub_amendment_data['filter_user_id'] = array();
 }
 $ulf = new UserListFactory();
 $ulf->getSearchByCompanyIdAndArrayCriteria($current_company->getId(), NULL);
 $src_user_options = UserListFactory::getArrayByListFactory($ulf, FALSE, FALSE);
 $user_options = Misc::arrayDiffByKey((array) $pay_stub_amendment_data['filter_user_id'], $src_user_options);
 $filter_user_options = Misc::arrayIntersectByKey((array) $pay_stub_amendment_data['filter_user_id'], $src_user_options);
 $status_options = Option::getByArray($status_options_filter, $psaf->getOptions('status'));
 $pay_stub_amendment_data['status_options'] = $status_options;
 $pseallf = new PayStubEntryAccountLinkListFactory();
 $pseallf->getByCompanyId($current_company->getId());
 if ($pseallf->getRecordCount() > 0) {
     $net_pay_psea_id = $pseallf->getCurrent()->getTotalNetPay();
 }
 $psealf = new PayStubEntryAccountListFactory();
 $pay_stub_amendment_data['pay_stub_entry_name_options'] = $psealf->getByCompanyIdAndStatusIdAndTypeIdArray($current_company->getId(), 10, array(10, 20, 30, 50, 60, 65));
 $pay_stub_amendment_data['percent_amount_entry_name_options'] = $psealf->getByCompanyIdAndStatusIdAndTypeIdArray($current_company->getId(), 10, array(10, 20, 30, 40, 50, 60, 65));
 if (isset($net_pay_psea_id)) {
     unset($pay_stub_amendment_data['percent_amount_entry_name_options'][$net_pay_psea_id]);
 }
 //$pay_stub_amendment_data['pay_stub_entry_name_options'] = $psenlf->getByTypeIdArray( array(10,20,30,35) );
 //$user_options = UserListFactory::getByCompanyIdArray( $current_company->getId(), TRUE );
 $pay_stub_amendment_data['user_options'] = $user_options;