Commit f2c052e1 authored by hujun's avatar hujun

去除多次应分佣金

parent 0ba04a83
...@@ -256,6 +256,15 @@ class OPartialCommission extends BaseModel ...@@ -256,6 +256,15 @@ class OPartialCommission extends BaseModel
//税费 //税费
$data[$k]['fee'] = $m_tax->where('operation_date', 'between time', [$operation_start_data, $operation_end_data]) $data[$k]['fee'] = $m_tax->where('operation_date', 'between time', [$operation_start_data, $operation_end_data])
->where('agent_id', $v['agent_id'])->sum('fee'); ->where('agent_id', $v['agent_id'])->sum('fee');
//去除多次应分佣金
$should_commission = $this->where('confirm_date', 'between time', [$operation_start_data, $operation_end_data])
->where('agent_id', $v['agent_id'])->group('bargain_id')->column('should_commission');
$data[$k]['should_commission'] = 0;
foreach ($should_commission as $kk => $vv) {
$data[$k]['should_commission'] += $vv;
}
} }
} }
......
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