Commit d95587d6 authored by zhuwei's avatar zhuwei

1

parent ec60ceb0
......@@ -137,6 +137,9 @@ class CostParameter extends Basic
public function getTransferCharge($store_id)
{
$agent_ids = $this->getUserIDList($store_id);
// big_log("======{$store_id}======");
// big_log($agent_ids);
$transfer_charge = 0;
foreach ($agent_ids as $k => $v) {
$m_partial = new OPartialCommission();
......@@ -146,7 +149,7 @@ class CostParameter extends Basic
$where['b.status']=array('in','10,11,13');
$where['a.is_del']=0;
$where['a.agent_id']=$v;
$where['a.create_time'] = ['between', [$start_date, $end_date]];
$where['c.income_time'] = ['between', [$start_date, $end_date]];
$list = $m_partial->getSumMoney($fields, $where);
if((isset($list['service_charge'])) && ($list['service_charge'] > 0))
......@@ -164,13 +167,10 @@ class CostParameter extends Basic
{
$params = [];
$params["store_id"] = $store_id;
$params["status"] = 0;
$params["status"] = array('in','0,1,2,3');
$agentModel = new AAgents();
$agentsArr = $agentModel->getAgentsByStoreId($params);
$agent_total = count($agentsArr);
$agentIds = [];
if ($agent_total > 0) {
foreach ($agentsArr as $key1 => $value1) {
......
......@@ -237,7 +237,7 @@ class OPartialCommission extends BaseModel
->join('o_real_income c', ' a.real_income_id = c.id', 'left')
->where($where)
->find();
big_log($this->getLastSql());
// big_log($this->getLastSql());
return $res;
}
......
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