MOON
Server: Apache
System: Linux nserver.cafsindia.com 4.18.0-553.104.1.lve.el8.x86_64 #1 SMP Tue Feb 10 20:07:30 UTC 2026 x86_64
User: cafsindia (1002)
PHP: 8.2.30
Disabled: NONE
Upload Files
File: /home/cafsindia/crm_cafsindia_com/application/models/RM_Fund.php
<?php
class fund extends CI_Model
{
	public function GetInfo($FundId)	
	{
		$this->db->from('fund_name');
		$this->db->where('fund_id',$FundId);
		$a=$this->db->get();
		if($a->num_rows() === 1)
		{
			return $a->row();
		
		}
		else
		{
			foreach ($this->db->list_fields('fund_name') as $field)
			{
				$PersonObj->field= '';
			}
			return $PersonObj;
		}
	}

	public function SaveCode($fundData,$fundIds= FALSE){
		if($fundIds === -1){
			$this->db->insert('fund_name',$fundData);
			$fundData['fund_id']=$this->db->insert_id();
			return true;
		}else{
			$this->db->where('fund_id',$fundIds);
			return $this->db->update('fund_name',array('fund_name'=>$fundData['fund_name'],'updated_by'=>$this->session->userdata('emp_id'),'updated_date'=>date('Y-m-d h:i:s')));
		}
	}

	public function search($search,$rows = 0,$limit_from= 0,$sort='fund_id',$order='asc'){
		$this->db->from('fund_name');
		$this->db->where('status',0);
		$this->db->group_start();
		$this->db->like('fund_id',$search);
		$this->db->or_like('fund_name',$search);
		$this->db->group_end();
		$this->db->order_by('fund_id',$order);
		if($rows>0)
		{
			$this->db->limit($rows, $limit_from);
		}
		return $this->db->get();
	}
	
	public function GetFoundRows($search){
		$this->db->from('fund_name');
		$this->db->where('status',0);
		return $this->db->get()->num_rows();
	}

	public function delete_list($fund_id){
		$this->db->where_in('fund_id',$fund_id);
		return $this->db->update('fund_name',array('status'=>1,'deleted_by'=>$this->session->userdata('emp_id'),'deleted_date'=>date('Y-m-d h:i:s')));
	}

	public function GetMultipleInfo($fund_ids){
		$this->db->from('fund_name');
		$this->db->where_in('fund_id', $fund_ids);
		return $this->db->get()->result_array();
	}
}
?>