|
|
|
@ -591,6 +591,9 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data = M("market_altogether","tab_")
|
|
|
|
|
->field("tab_market_altogether.*,market_percentage")
|
|
|
|
|
->join("left join sys_auth_group_access access on tab_market_altogether.admin_id = access.uid")
|
|
|
|
|
->join("left join sys_auth_group auth on access.group_id=auth.id")
|
|
|
|
|
->where($map);
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['export']) {
|
|
|
|
@ -628,6 +631,8 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
$data[$key]['start_time'] = date("Y-m-1",strtotime($value['pay_time']));
|
|
|
|
|
$data[$key]['end_time'] = date("Y-m-t",strtotime($value['pay_time']));
|
|
|
|
|
|
|
|
|
|
$market_percentage = json_decode($value['market_percentage'],true);
|
|
|
|
|
|
|
|
|
|
if ($value['level'] == 21) {
|
|
|
|
|
$data[$key]['level'] = '初级';
|
|
|
|
|
} else if ($value['level'] == 11) {
|
|
|
|
@ -642,6 +647,13 @@ class MarketPercentageController extends ThinkController
|
|
|
|
|
$data[$key]['is_send'] = '未发放';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//两个起提流水都没达到时,不展示税后毛利
|
|
|
|
|
$sum_amount = $value['performance_revenue'] + $value['appraisal_bonuses'];
|
|
|
|
|
if ($sum_amount<$market_percentage['performance_revenue']&&$sum_amount<$market_percentage['appraisal_bonuses']) {
|
|
|
|
|
$data[$key]['company_profit'] = "0.00";
|
|
|
|
|
$value['company_profit'] = "0.00";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$data[$key]['wait_commission'] =
|
|
|
|
|
number_format($value['wait_performance_commission'] + $value['wait_achievement_commission'], 2, '.', '');
|
|
|
|
|
|
|
|
|
|