Commit e6080a29 authored by zhuwei's avatar zhuwei

1

parent f4efa5b7
...@@ -83,7 +83,7 @@ class CostParameter extends Basic ...@@ -83,7 +83,7 @@ class CostParameter extends Basic
$store_data_res = $this->m_store->getStoreCostParameter($field,$f_params); $store_data_res = $this->m_store->getStoreCostParameter($field,$f_params);
if(!$store_data_res){ if(!$store_data_res){
$transfer_charge = $this->getTransferCharge($v['id']); $transfer_charge = $this->getTransferCharge($v['id'],$params['setting_date']);
$list[$k]['transfer_charge'] = $transfer_charge;//手续费 $list[$k]['transfer_charge'] = $transfer_charge;//手续费
$social_security_fee = $this->getLastSocialSecurityFee($v['id'],$params['setting_date']); $social_security_fee = $this->getLastSocialSecurityFee($v['id'],$params['setting_date']);
$list[$k]['social_security_fee'] = $social_security_fee;//当月社保报销 $list[$k]['social_security_fee'] = $social_security_fee;//当月社保报销
...@@ -139,19 +139,18 @@ class CostParameter extends Basic ...@@ -139,19 +139,18 @@ class CostParameter extends Basic
/** /**
* 获取手续费 * 获取手续费
* @param $store_id * @param $store_id
* @param $setting_date
* @return int * @return int
*/ */
public function getTransferCharge($store_id) public function getTransferCharge($store_id,$setting_date)
{ {
$agent_ids = $this->getUserIDList($store_id); $agent_ids = $this->getUserIDList($store_id);
// big_log("======{$store_id}======");
// big_log($agent_ids);
$transfer_charge = 0; $transfer_charge = 0;
foreach ($agent_ids as $k => $v) { foreach ($agent_ids as $k => $v) {
$m_partial = new OPartialCommission(); $m_partial = new OPartialCommission();
$start_date = date('Y-m-01', strtotime('-1 month')); $start_date = date('Ym01 23:59:59',strtotime('-1 month', strtotime($setting_date)));;
$end_date = date('Y-m-t', strtotime('-1 month')); $end_date = date('Ymd 00:00:00',strtotime('-1 month', strtotime($setting_date)));;
$fields = 'sum( a.service_charge ) as service_charge'; $fields = 'sum( a.service_charge ) as service_charge';
$where['b.status']=array('in','10,11,13'); $where['b.status']=array('in','10,11,13');
$where['a.is_del']=0; $where['a.is_del']=0;
......
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