From df488d1f289691b946136d89208b65c6b8c81678 Mon Sep 17 00:00:00 2001 From: VE10-Sanjeev Date: Tue, 29 Nov 2022 17:08:40 +0530 Subject: [PATCH] images check 1 : ps --- api/application/controllers/Sales_PD_Controller.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index 35679c4a..de228e3e 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -428,7 +428,7 @@ class Sales_PD_Controller extends REST_Controller { } $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); - +// print_r($sales_pd_data); // print_r($this->db->last_query());die(); if(count($sales_pd_data)) @@ -616,7 +616,11 @@ class Sales_PD_Controller extends REST_Controller { } } - + if(!empty($records['img_id']) && $records['img_name'] != 'selfie_with_person_met'){ + $update_fields2 = array('isactive' => 0); + $this->Flyhi_Model->updateRecords($update_fields2,SALEPD_DOCS,array('doc_id'=>$records['img_id'])); + } + unset($records['img_id']); $id = $this->Sales_PD_Model->saveRecords($records,SALEPD_DOCS); if($id) {