Office Details live fixes : ps
This commit is contained in:
parent
9eb9198a2a
commit
0430a2a51b
@ -952,8 +952,10 @@ class Sales_PD_Controller extends REST_Controller {
|
||||
}
|
||||
|
||||
//make inactive previous records
|
||||
$check=$this->Sales_PD_Model->selectCustomRecords(array('*'),array('sales_pd_id' =>$sales_pd_id,'section_id' => $section_id,'isactive' => 1 ),SALESPD_SECTION_DATA);
|
||||
if(count($check)>0){
|
||||
$this->Sales_PD_Model->updateRecords(array('isactive' => 0),SALESPD_SECTION_DATA,array('sales_pd_id' =>$sales_pd_id,'section_id' => $section_id ));
|
||||
|
||||
}
|
||||
//insert new record
|
||||
$fields = array('sales_pd_id' => $sales_pd_id, 'section_id' => $section_id, 'status' =>$status ,'section_data' => $section_data,'createdby' => $fk_createdby);
|
||||
$is_entry_created = $this->Sales_PD_Model->saveRecords($fields,SALESPD_SECTION_DATA);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user