Sales_PD_Controller.php edited online with Bitbucket

This commit is contained in:
gandhimathi 2022-05-06 11:42:16 +00:00
parent 3782f9fa17
commit b21e8a0e26

View File

@ -219,16 +219,16 @@ class Sales_PD_Controller extends REST_Controller {
$view_data['section9'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name !=' => 'satellite','isactive' => 1),SALEPD_DOCS);
if(count($view_data['section9'])>0){
for ($i = 0; $i < count($view_data['section9']); $i++){
$img_fields[$i]['img_name'] = $view_data['section9'][$i]['img_name'];
$img_fields[$i]['img'] = $view_data['section9'][$i]['img'];
$img_fields[0]['img_name'] = $view_data['section9'][$i]['img_name'];
$img_fields[0]['img'] = $view_data['section9'][$i]['img'];
salespd_cetapp::pushwithcetsalespdapi($common_fields,$img_fields,2);
}}
$view_data['satellite_image'] = $this->Sales_PD_Model->selectCustomRecords(array('*'),array('fk_sales_pd_id' => $sales_pd_id,'img_name' => 'satellite','isactive' => 1),SALEPD_DOCS);
if(!empty($view_data['satellite_image'])){
$count = count($view_data['section9'])+1;
$img_fields[$count]['img_name'] = $view_data['satellite_image'][0]['img_name'];
$img_fields[$count]['img'] = $view_data['satellite_image'][0]['img'];
$stt_fields[0]['img_name'] = $view_data['satellite_image'][0]['img_name'];
$stt_fields[0]['img'] = $view_data['satellite_image'][0]['img'];
salespd_cetapp::pushwithcetsalespdapi($common_fields,$stt_fields,2);
}
salespd_cetapp::pushwithcetsalespdapi($common_fields,$img_fields,2);
$view_data['product_id'] = $sales_pd_data[0]['product_id'];
$view_data['geo_location'] = $sales_pd_data[0]['geo_location'];
//print_r($this->db->last_query());die();