Commit 1f5cab10 authored by hujun's avatar hujun

独家

parent 655e3cee
......@@ -2563,7 +2563,7 @@ class Finance extends Basic
$m_pay_adjustment = new OPayLogAdjustment();
$m_report = new OReportModel();
$m_agent_house = new GHousesToAgents();
$m_house = new GHouses();
foreach ($list as $k=>$v) {
if ($v['source'] == 2) {
$source_id = $m_pay_adjustment->getFieldColumn('id', ['new_paylog_id'=> $v['id']]);
......@@ -2585,8 +2585,15 @@ class Finance extends Basic
$list[$k]['current_agent_name'] = $list[$k]['store_name'] = "";
if ($v['type'] == 92) {
$is_exclusive_type = $m_house->getHouseValue('is_exclusive_type', ['id'=>$v['house_id']]);
//案场费 对应业务员:盘方
$current_agent_name = $m_agent_house->getHousesAgents($v['house_id'], 'b.name,b.store_id', ['a.type'=>2]);
$current_where['a.is_del'] = 0;
if ($is_exclusive_type) {
$current_where['a.type'] = 3;
} else {
$current_where['a.type'] = 2;
}
$current_agent_name = $m_agent_house->getHousesAgents($v['house_id'], 'b.name,b.store_id', $current_where);
$list[$k]['current_agent_name'] = empty($current_agent_name[0]['name']) ? '':$current_agent_name[0]['name'];
$store_name = $m_store->getStoreKeyById('store_name', ['id'=>$current_agent_name[0]['store_id']]);
$list[$k]['store_name'] = empty($store_name)? '' : $store_name;
......
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