Ejemplo n.º 1
0
         $ulf = new UserListFactory();
         $ulf->getByIdAndCompanyId($user_id, $current_company->getId());
         if ($ulf->getRecordCount() > 0) {
             $user_obj = $ulf->getCurrent();
             $pc_data = array('user_id' => $user_obj->getId(), 'user_full_name' => $user_obj->getFullName(), 'date_stamp' => $date_stamp, 'time_stamp' => $time_stamp, 'status_id' => $status_id, 'branch_id' => $user_obj->getDefaultBranch(), 'department_id' => $user_obj->getDefaultDepartment(), 'quantity' => 0, 'bad_quantity' => 0);
         }
         unset($time_stamp, $plf);
     }
 }
 $blf = new BranchListFactory();
 $branch_options = $blf->getByCompanyIdArray($current_company->getId());
 $dlf = new DepartmentListFactory();
 $department_options = $dlf->getByCompanyIdArray($current_company->getId());
 if ($current_company->getProductEdition() == 20) {
     $jlf = new JobListFactory();
     $jlf->getByCompanyIdAndUserIdAndStatus($current_company->getId(), $pc_data['user_id'], array(10, 20, 30, 40));
     $pc_data['job_options'] = $jlf->getArrayByListFactory($jlf, TRUE, TRUE);
     $pc_data['job_manual_id_options'] = $jlf->getManualIDArrayByListFactory($jlf, TRUE);
     $jilf = new JobItemListFactory();
     $jilf->getByCompanyId($current_company->getId());
     $pc_data['job_item_options'] = $jilf->getArrayByListFactory($jilf, TRUE, TRUE);
     $pc_data['job_item_manual_id_options'] = $jilf->getManualIdArrayByListFactory($jilf, TRUE);
 }
 //Select box options;
 $pc_data['status_options'] = $pf->getOptions('status');
 $pc_data['type_options'] = $pf->getOptions('type');
 $pc_data['branch_options'] = $branch_options;
 $pc_data['department_options'] = $department_options;
 //Get other field names
 $oflf = new OtherFieldListFactory();
 $pc_data['other_field_names'] = $oflf->getByCompanyIdAndTypeIdArray($current_company->getId(), 15);
Ejemplo n.º 2
0
     $data['user_id'] = $current_user->getId();
     $data['user_full_name'] = $current_user->getFullName();
     $data['time_stamp'] = $epoch;
     $data['date_stamp'] = $epoch;
 }
 $blf = new BranchListFactory();
 $blf->getByCompanyId($current_company->getId());
 $branch_options = $blf->getArrayByListFactory($blf, TRUE, FALSE);
 //$branch_options = $blf->getByCompanyIdArray( $current_company->getId() );
 $dlf = new DepartmentListFactory();
 $dlf->getByCompanyId($current_company->getId());
 $department_options = $dlf->getArrayByListFactory($dlf, TRUE, FALSE);
 //$department_options = $dlf->getByCompanyIdArray( $current_company->getId() );
 if ($current_company->getProductEdition() == 20) {
     $jlf = new JobListFactory();
     $jlf->getByCompanyIdAndUserIdAndStatus($current_company->getId(), $current_user->getId(), array(10));
     $data['job_options'] = $jlf->getArrayByListFactory($jlf, TRUE, TRUE);
     $data['job_manual_id_options'] = $jlf->getManualIDArrayByListFactory($jlf, TRUE);
     $jilf = new JobItemListFactory();
     $jilf->getByCompanyIdAndStatus($current_company->getId(), 10);
     $data['job_item_options'] = $jilf->getArrayByListFactory($jilf, TRUE, FALSE);
     $data['job_item_manual_id_options'] = $jilf->getManualIdArrayByListFactory($jilf, FALSE);
 }
 //Select box options;
 $data['status_options'] = $pf->getOptions('status');
 $data['type_options'] = $pf->getOptions('type');
 $data['branch_options'] = $branch_options;
 $data['department_options'] = $department_options;
 //Get other field names
 $oflf = new OtherFieldListFactory();
 $data['other_field_names'] = $oflf->getByCompanyIdAndTypeIdArray($current_company->getId(), 15);