diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 4a620de8..7f9ff617 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -756,7 +756,13 @@ class Sales_PD_Controller extends REST_Controller { $records = $this->post('records'); $section_data = array(); - + + if($records['section_id'] == 'all'){ + // die(); + $fields=array('id','sales_pd_id','section_id','status','createdby','createdon'); + $section_data=$this->Sales_PD_Model->selectCustomRecords($fields,array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1),SALESPD_SECTION_DATA); + } + else{ $section_data = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' => $records['sales_pd_id'],'isactive' => 1,'section_id' => $records['section_id']),SALESPD_SECTION_DATA); //print_r( json_decode($section_data[0]['section_data'],true));die(); if($records['section_id'] == 9 && count($section_data)) @@ -826,6 +832,7 @@ class Sales_PD_Controller extends REST_Controller { } } +} public function testAPISalesPD_post() {