Commit 9012699b by Jansa Jose

dc

parent b214d064
...@@ -467,7 +467,7 @@ class Webservice_model extends CI_Model { ...@@ -467,7 +467,7 @@ class Webservice_model extends CI_Model {
FROM mechanic_rating FROM mechanic_rating
WHERE mechanic_id='".$value['mechanic_id']."'"); WHERE mechanic_id='".$value['mechanic_id']."'");
if(!empty($rating) && !empty($rating = $rating->row_array())){ if(!empty($rating) && !empty($rating = $rating->row_array())){
$mechData[$key]['total_review'] =(empty($rating['count']))?'0':$rating['count']; $mechData[$key]['total_review'] = (empty($rating['count']))?'0':$rating['count'];
$mechData[$key]['avg_rate'] = (empty($rating['rating']))?'0':$rating['rating']; $mechData[$key]['avg_rate'] = (empty($rating['rating']))?'0':$rating['rating'];
} }
} }
...@@ -498,10 +498,10 @@ class Webservice_model extends CI_Model { ...@@ -498,10 +498,10 @@ class Webservice_model extends CI_Model {
$scheduleTiming[] = date('h:i A',$schTime); $scheduleTiming[] = date('h:i A',$schTime);
} }
} }
$rating = $this->db->query("SELECT round(avg(rate),2) AS rating // $rating = $this->db->query("SELECT round(avg(rate),2) AS rating
FROM mechanic_rating // FROM mechanic_rating
WHERE mechanic_id='".$data['mechanic_id']."'"); // WHERE mechanic_id='".$data['mechanic_id']."'");
$rating = (!empty($rating) && !empty($rating = $rating->row_array()))?$rating['rating']:'0'; // $rating = (!empty($rating) && !empty($rating = $rating->row_array()))?$rating['rating']:'0';
$mechanic_id = $data['mechanic_id']; $mechanic_id = $data['mechanic_id'];
$sql = "SELECT ISS.*, IC.*, MI.mechanic_id, MI.custom_description, MI.custom_service_fee $sql = "SELECT ISS.*, IC.*, MI.mechanic_id, MI.custom_description, MI.custom_service_fee
FROM issues_category AS IC FROM issues_category AS IC
...@@ -524,7 +524,7 @@ class Webservice_model extends CI_Model { ...@@ -524,7 +524,7 @@ class Webservice_model extends CI_Model {
$sIssueData[$sIndex]['service_fee'] = $sIssue['default_service_fee']; $sIssueData[$sIndex]['service_fee'] = $sIssue['default_service_fee'];
} }
} }
$mechData[$index]['rating'] = $rating; //$mechData[$index]['rating'] = $rating;
$mechData[$index]['estimate'] = $estimate; $mechData[$index]['estimate'] = $estimate;
$mechData[$index]['sub_issues'] = $sIssueData; $mechData[$index]['sub_issues'] = $sIssueData;
$mechData[$index]['scheduleTiming'] = $scheduleTiming; $mechData[$index]['scheduleTiming'] = $scheduleTiming;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment