Nation sales role : ps
This commit is contained in:
parent
cbfc81102e
commit
aedb19da24
@ -313,7 +313,10 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
// print_r ($where_condition_array);
|
||||
|
||||
// ----END OF FILTERING THE LAST 10 DAYS RECORDS---
|
||||
|
||||
$MWISELender = (ENVIRONMENT == 'production' ? 7 : 35);
|
||||
if($role && is_numeric($role) && $role == 11 && $MWISELender == $lender_id){
|
||||
// $where_condition_array['SALES_PD_DATA.product_id'] = (ENVIRONMENT == 'production' ? 23 : 22);
|
||||
}else{
|
||||
if($role && is_numeric($role) && $role == 15) //if role area sales head the pull all meq cases
|
||||
{
|
||||
$where_condition_array['SALES_PD_DATA.product_id'] = (ENVIRONMENT == 'production' ? 23 : 22);
|
||||
@ -323,7 +326,7 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
{
|
||||
$where_condition_array['SALES_PD_DATA.createdby'] = $user_id;
|
||||
}
|
||||
|
||||
}
|
||||
$order_by = 'SALES_PD_DATA.sales_pd_id';
|
||||
$sales_pd_data = $this->Sales_PD_Model->getJoinRecords($columns,$table,$joins,$where_condition_array,$order_by,'DESC','',$or_where);
|
||||
|
||||
@ -334,6 +337,7 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = $sales_pd_data;
|
||||
$data['c'] =count($sales_pd_data);
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user