function getJobItemObject()
 {
     if (is_object($this->job_item_obj)) {
         return $this->job_item_obj;
     } else {
         $jilf = new JobItemListFactory();
         $jilf->getById($this->getJobItem());
         if ($jilf->getRecordCount() > 0) {
             $this->job_item_obj = $jilf->getCurrent();
             return $this->job_item_obj;
         }
         return FALSE;
     }
 }
 function getJobItems($station_id)
 {
     Debug::Text('Getting Jobs for Station ID: ' . $station_id, __FILE__, __LINE__, __METHOD__, 10);
     if ($station_id == '') {
         return FALSE;
     }
     if (getTTProductEdition() != TT_PRODUCT_PROFESSIONAL) {
         return FALSE;
     }
     $slf = new StationListFactory();
     $slf->getByStationID($station_id);
     if ($slf->getRecordCount() > 0) {
         $s_obj = $slf->getCurrent();
         $company_id = $s_obj->getCompany();
         Debug::Text('Company ID: ' . $company_id, __FILE__, __LINE__, __METHOD__, 10);
         if ($company_id != FALSE) {
             //Gets all users allowed to punch in/out from this station
             $jilf = new JobItemListFactory();
             $jilf->getByCompanyId($company_id);
             if ($jilf->getRecordCount() > 0) {
                 $x = 0;
                 foreach ($jilf as $ji_obj) {
                     $job_item_list["'{$x}'"] = array('id' => (int) $ji_obj->getId(), 'manual_id' => (int) $ji_obj->getManualID(), 'name' => $ji_obj->getName());
                     $x++;
                 }
                 if (isset($job_item_list)) {
                     return $job_item_list;
                 }
             }
         }
     }
     Debug::Text('Returning FALSE!', __FILE__, __LINE__, __METHOD__, 10);
     return FALSE;
 }
 function getJobItemData($job_item_id)
 {
     global $current_company;
     if (!is_object($current_company)) {
         return FALSE;
     }
     Debug::text('Job Item ID: ' . $job_item_id . ' Company ID: ' . $current_company->getId(), __FILE__, __LINE__, __METHOD__, 10);
     if ($job_item_id == '') {
         return FALSE;
     }
     if ($current_company->getID() == '') {
         return FALSE;
     }
     $jilf = new JobItemListFactory();
     $jilf->getByIdAndCompanyId($job_item_id, $current_company->getId());
     if ($jilf->getRecordCount() > 0) {
         foreach ($jilf as $item_obj) {
             $retarr = array('id' => $item_obj->getId(), 'product_id' => $item_obj->getProduct(), 'group_id' => $item_obj->getGroup(), 'type_id' => $item_obj->getType(), 'other_id1' => $item_obj->getOtherID1(), 'other_id2' => $item_obj->getOtherID2(), 'other_id3' => $item_obj->getOtherID3(), 'other_id4' => $item_obj->getOtherID4(), 'other_id5' => $item_obj->getOtherID5(), 'manual_id' => $item_obj->getManualID(), 'name' => $item_obj->getName(), 'description' => $item_obj->getDescription(), 'estimate_time' => $item_obj->getEstimateTime(), 'estimate_time_display' => TTDate::getTimeUnit($item_obj->getEstimateTime()), 'estimate_quantity' => $item_obj->getEstimateQuantity(), 'estimate_bad_quantity' => $item_obj->getEstimateBadQuantity(), 'bad_quantity_rate' => $item_obj->getBadQuantityRate(), 'billable_rate' => $item_obj->getBillableRate(), 'minimum_time' => $item_obj->getMinimumTime(), 'minimum_time_display' => TTDate::getTimeUnit($item_obj->getMinimumTime()), 'created_date' => $item_obj->getCreatedDate(), 'created_by' => $item_obj->getCreatedBy(), 'updated_date' => $item_obj->getUpdatedDate(), 'updated_by' => $item_obj->getUpdatedBy(), 'deleted_date' => $item_obj->getDeletedDate(), 'deleted_by' => $item_obj->getDeletedBy());
             Debug::text('Returning Data...', __FILE__, __LINE__, __METHOD__, 10);
             return $retarr;
         }
     }
     Debug::text('Returning False...', __FILE__, __LINE__, __METHOD__, 10);
     return FALSE;
 }