经纪人协议模板 - 房屋租赁合同生成系统
/**
-
经纪人协议模型 */ class Contract_model extends CI_Model { public function __construct() { parent::__construct(); $this->db_city = $this->load->database('city', TRUE); $this->dbback_city = $this->load->database('city_bak', TRUE); }
/**
- 获取经纪人协议模板信息
- @param string $tpl_name 模板名称
- @return array 模板信息 */ public function get_contract_tpl($tpl_name) { $tpl_content = array( 'name' => $agency_name, 'address' => $agency_address, 'shop_name' => $shop_name, 'shop_address' => $shop_address, 'broker_name' => $broker_name, 'broker_tel' => $broker_tel, 'broker_idcard' => $broker_idcard, 'owner_name' => $owner_name, 'owner_tel' => $owner_tel, 'owner_idcard' => $owner_idcard, 'owner_address' => $owner_address, 'rent_price' => $rent_price, 'payment_type' => $payment_type, 'rent_start_time' => $rent_start_time, 'rent_end_time' => $rent_end_time, 'agency_commission_ratio' => $agency_commission_ratio, 'agency_commission' => $agency_commission, 'contract_start_time' => $contract_start_time, 'contract_end_time' => $contract_end_time ); $contract_info = array('tpl_name' => $tpl_name, 'tpl_content' => $tpl_content); //print_r($contract_info);exit; return $contract_info; }
/**
- 更新出租合同模板
- @param int $c_id 合同编号
- @param array $data_info 合同模板内容
- @return int 成功后返回受影响的行数 */ public function update_contract_tpl($c_id, $data_info) { $this->dbback_city->where('id', $c_id); $result = $this->dbback_city->update('contract_tpl', $data_info); return $result; }
/**
- 添加出租合同模板
- @param array $data_info 合同模板内容
- @return int 成功后返回模板编号 */ public function add_contract_tpl($data_info) { $this->db_city->insert('contract_tpl', $data_info); $tpl_id = $this->db_city->insert_id(); return $tpl_id; } }
/* End of file contract_model.php / / Location: ./applications/mls/models/contract_model.php */
原文地址: https://www.cveoy.top/t/topic/lmCm 著作权归作者所有。请勿转载和采集!