|
|
|
@ -177,6 +177,8 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
$data[$key]['level'] = '高级';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$sum_amount = $value['performance_revenue'] + $value['appraisal_bonuses'];
|
|
|
|
|
|
|
|
|
|
$market_percentage = json_decode($value['market_percentage'],true);
|
|
|
|
|
// $data[$key]['performance_revenue'] = number_format($market_percentage['performance_revenue'], 2, '.', '');
|
|
|
|
|
// $data[$key]['appraisal_bonuses'] = number_format($market_percentage['appraisal_bonuses'], 2, '.', '');
|
|
|
|
@ -184,10 +186,13 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
$data[$key]['performance_commission'] =
|
|
|
|
|
number_format($value['company_profit']*($market_percentage['develop_commission_ratio']/100) +
|
|
|
|
|
$value['company_profit']*($market_percentage['maintain_commission_ratio']/100), 2, '.', '');
|
|
|
|
|
|
|
|
|
|
$sum_amount <$market_percentage['performance_revenue'] ? ($data[$key]['performance_commission'] = 0):"";
|
|
|
|
|
//绩效考核奖金
|
|
|
|
|
$data[$key]['achievement_bonus'] =
|
|
|
|
|
number_format($value['company_profit']*($market_percentage['appraisal_bonuses_ratio']/100) +
|
|
|
|
|
$value['company_profit']*($market_percentage['maintain_appraisal_bonuses_ratio']/100), 2, '.', '');
|
|
|
|
|
$sum_amount <$market_percentage['appraisal_bonuses'] ? ($data[$key]['achievement_bonus'] = 0):"";
|
|
|
|
|
//总提成
|
|
|
|
|
$data[$key]['commission'] = number_format($data[$key]['performance_commission']+$data[$key]['achievement_bonus'], 2, '.', '');
|
|
|
|
|
//应发金额
|
|
|
|
@ -223,14 +228,14 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$map = [];
|
|
|
|
|
|
|
|
|
|
$map['group_id'] = ['in','11,12,21'];
|
|
|
|
|
// $map['group_id'] = ['in','11,12,21'];
|
|
|
|
|
|
|
|
|
|
$_REQUEST['pay_time']?($map['pay_time'] = $_REQUEST['pay_time']):'';
|
|
|
|
|
$_REQUEST['admin_id']?($map['admin_id'] = $_REQUEST['admin_id']):'';
|
|
|
|
|
$_REQUEST['group_id']?($map['group_id'] = $_REQUEST['group_id']):'';
|
|
|
|
|
|
|
|
|
|
$admin_id = $_SESSION['onethink_admin']['user_auth']['uid'];
|
|
|
|
|
$map['admin_id'] = $admin_id;
|
|
|
|
|
// $map['admin_id'] = $admin_id;
|
|
|
|
|
|
|
|
|
|
$data = M("settleup_marketorder","tab_")
|
|
|
|
|
->field("tab_settleup_marketorder.id,pay_time,promote_account,company_belong,member.real_name,develop_type,game_name,
|
|
|
|
@ -290,20 +295,25 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
} else if ($value['group_id'] == 12) {
|
|
|
|
|
$data[$key]['level'] = '高级';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$sum_amount = $value['performance_revenue'] + $value['appraisal_bonuses'];
|
|
|
|
|
|
|
|
|
|
$data[$key]['is_send'] = is_sendBonus($value['pay_time'],$value['admin_id']);
|
|
|
|
|
|
|
|
|
|
$market_percentage = json_decode($value['market_percentage'],true);
|
|
|
|
|
$data[$key]['performance_revenue'] = number_format($market_percentage['performance_revenue'], 2, '.', '');
|
|
|
|
|
$data[$key]['appraisal_bonuses'] = number_format($market_percentage['appraisal_bonuses'], 2, '.', '');
|
|
|
|
|
// $data[$key]['performance_revenue'] = number_format($market_percentage['performance_revenue'], 2, '.', '');
|
|
|
|
|
// $data[$key]['appraisal_bonuses'] = number_format($market_percentage['appraisal_bonuses'], 2, '.', '');
|
|
|
|
|
//业绩提成
|
|
|
|
|
$data[$key]['performance_commission'] =
|
|
|
|
|
number_format($value['company_profit']*($market_percentage['develop_commission_ratio']/100) +
|
|
|
|
|
$value['company_profit']*($market_percentage['maintain_commission_ratio']/100), 2, '.', '');
|
|
|
|
|
$sum_amount <$market_percentage['performance_revenue'] ? ($data[$key]['performance_commission'] = 0):"";
|
|
|
|
|
$sum['performance_commission'] += $data[$key]['performance_commission'];
|
|
|
|
|
//绩效考核奖金
|
|
|
|
|
$data[$key]['achievement_bonus'] =
|
|
|
|
|
number_format($value['company_profit']*($market_percentage['appraisal_bonuses_ratio']/100) +
|
|
|
|
|
$value['company_profit']*($market_percentage['maintain_appraisal_bonuses_ratio']/100), 2, '.', '');
|
|
|
|
|
$sum_amount <$market_percentage['appraisal_bonuses'] ? ($data[$key]['achievement_bonus'] = 0):"";
|
|
|
|
|
$sum['achievement_bonus'] += $data[$key]['achievement_bonus'];
|
|
|
|
|
//总提成
|
|
|
|
|
$data[$key]['commission'] = number_format($data[$key]['performance_commission']+$data[$key]['achievement_bonus'], 2, '.', '');
|
|
|
|
|