Commit ed4835c0 authored by hujun's avatar hujun

实收统计

# Conflicts: # application/index/controller/Finance.php
parent b306294c
......@@ -1582,19 +1582,17 @@ class Finance extends Basic
$m_partial = new OPartialCommission();
$m_store = new AStore();
$m_agent = new AAgents();
$where['c.is_del'] = 0;
if (empty($this->params['excel']) && $this->params['excel'] != 1) {
$m_tax = new OTaxes();
$taxes_where['a.father_id'] = ['>', 0];
$taxes_where['a.is_del'] = 0;
// $taxes_where['b.status'] = ['IN', '10,11,13'];
$taxes_where['a.operation_date'] = ['between', [$operation_start_data, $operation_end_data]];
$data['data']['total_taxes'] = $m_tax->sumBargainFee('a.fee', $taxes_where);;
if (!empty($this->params['confirm_date'])) {
$where['a.confirm_date'] = ['<=', $this->params['confirm_date'].' 23:59:59'];
$where['a.confirm_status'] = 1;
}
$list = $m_partial->getCommissionTotalList($pageNo, $pageSize, $fields, $where, $operation_start_data, $operation_end_data, $is_bargain);
......@@ -1618,6 +1616,7 @@ class Finance extends Basic
$where[1] =['EXP', "e.create_time BETWEEN '{$this->params['bargain_start_date']} 00:00:00' AND '{$this->params['bargain_end_date']} 23:59:59'"];
}
$where['e.status'] = ['IN', '10,11,13'];
unset($where['c.is_del']);
$data['data']['total_money'] = $m_partial->getCommissionTotalInfo('a.practical_fee', $where);
} else {
//导出Excel
......
......@@ -259,7 +259,7 @@ class OPartialCommission extends BaseModel
}
$taxes_where['a.operation_date'] = ['between', [$operation_start_data, $operation_end_data]];
$taxes_where['a.agent_id'] = $v['agent_id'];
$taxes_where['b.agent_id'] = $v['agent_id'];
$result[$k]['fee'] = $m_tax->sumBargainFee('a.fee', $taxes_where);
$result[$k]['agent_id'] = $v['agent_id'];
$result[$k]['name'] = $v['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