Commit b6a59484 authored by hujun's avatar hujun

收款 is_open

parent 28a12063
......@@ -3001,9 +3001,9 @@ class Finance extends Basic
//案场费和中介费是否开业
if (isset($this->params['is_open'])) {
if ($this->params['is_open'] == 1) {
$where['f.is_open'] = 1;
$where['a.is_open'] = 1;
} else {
$where['f.is_open'] = 0;
$where['a.is_open'] = 0;
}
if (!isset($where['a.type'])) {
......@@ -3203,9 +3203,9 @@ class Finance extends Basic
//案场费和中介费是否开业
if (isset($this->params['is_open'])) {
if ($this->params['is_open'] == 1) {
$where['f.is_open'] = 1;
$where['a.is_open'] = 1;
} else {
$where['f.is_open'] = 0;
$where['a.is_open'] = 0;
}
$where['a.type'] = ['in', '91,92'];
}
......@@ -3584,7 +3584,7 @@ class Finance extends Basic
try {
$m_pay = new OPayLogModel();
$pay_fields = 'id,order_id,agent_name,create_time,income_time,house_number,type,real_money,income_time,transfer_name,bargain_id,agent_id,';
$pay_fields .= 'transaction_fee,is_dividend,receipt_number,source,pay_type,last_transfer_time,money,industry_type,received_money,type_ext';
$pay_fields .= 'transaction_fee,is_dividend,receipt_number,source,pay_type,last_transfer_time,money,industry_type,received_money,type_ext,is_open';
$pay_data = $m_pay->selectReceiptImgList($pay_fields, ['id'=>$this->params['pay_id']]);
$pay_data = $pay_data[0];
//成交报告id
......@@ -3594,12 +3594,10 @@ class Finance extends Basic
$pay_data['is_open'] = 0;
$pay_data['price'] = 0;
} else {
$bargain_where[] = ['EXP', 'id='.$pay_data['bargain_id'].' or father_id='.$pay_data['bargain_id']];
$bargain_where['father_id'] = 0;
$bargain_data = $this->m_bargain->getDetail('id,father_id,price,is_open', $bargain_where);
$pay_data['bargain_id'] = empty($bargain_data['id'])? '':$bargain_data['id'];
$pay_data['is_open'] = empty($bargain_data['is_open']) ? 0 :$bargain_data['is_open'];
$pay_data['price'] = empty($bargain_data['price'])? 0:$bargain_data['price'];
$bargain_where['id'] = $pay_data['bargain_id'];
$price = $this->m_bargain->getFieldValue('price', $bargain_where);
$pay_data['price'] = empty($price)? 0:$price;
$m_order = new OrderModel();
$house_data = $m_order->selectOrderByOrderId('b.id,b.internal_address,a.f_id', ['order_id'=>$pay_data['order_id']]);
......@@ -3646,8 +3644,11 @@ class Finance extends Basic
$pay_data['site_id'] = '';
if ($pay_data['agent_id']) {
$m_agent = new AAgents();
$pay_data['site_id'] = $m_agent->getPhoneById($pay_data['agent_id'], 'site_id');
// $m_agent = new AAgents();
// $pay_data['site_id'] = $m_agent->getPhoneById($pay_data['agent_id'], 'site_id');
$redis_service = new RedisCacheService();
$agent_data = $redis_service->getRedisCache(2, $pay_data['agent_id']);
$pay_data['site_id'] = $agent_data['site_id'];
}
} catch (\Exception $e) {
$msg = '内部错误:'.$e->getMessage();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment