@ -757,12 +757,18 @@ class MarketPercentageController extends ThinkController
continue;
}
}
// if ($value['admin_id'] == 27) {
// dump($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']));
// }
// dump($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']));
//离职结算判断
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['achievement_bonus']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_achievement_commission']='0.00'):'';
if ($this->unSettlementList[$value['admin_id']]& & date("Y-m",$this->unSettlementList[$value['admin_id']])< =$value['pay_time']) {
$data[$key]['leave_time'] = date("Y-m-d",$this->unSettlementList[$value['admin_id']]);
}
@ -834,6 +840,9 @@ class MarketPercentageController extends ThinkController
$data[$key]['extend_commission'] = number_format($data[$key]['extend_commission'], 2, '.', '');
$data[$key]['should_month_bonus_ratio'] = $data[$key]['extend_commission'] - $data[$key]['should_performance_commission'];
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['should_performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['should_month_bonus_ratio']='0.00'):'';
// dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['performance_commission']);
// dump($this->returnMarketPercentageArray[$value['admin_id'].$value['pay_time']]['achievement_bonus']);
@ -842,11 +851,19 @@ class MarketPercentageController extends ThinkController
$data[$key]['wait_commission'] = number_format($data[$key]['wait_commission'], 2, '.', '');
$data[$key]['wait_achievement_commission'] = $data[$key]['wait_commission'] - $data[$key]['wait_performance_commission'];
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_achievement_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_performance_commission']='0.00'):'';
$data[$key]['achievement_bonus'] = $achievement_bonus;
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['commission']-=$data[$key]['wait_commission']):'';
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_performance_commission']='0.00'):'';
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_achievement_commission']='0.00'):'';
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_commission']='0.00'):'';
$sum['performance_revenue'] += $data[$key]['performance_revenue'];
$sum['appraisal_bonuses'] += $data[$key]['appraisal_bonuses'];
$sum['performance_commission'] += $data[$key]['performance_commission'];
@ -862,7 +879,7 @@ class MarketPercentageController extends ThinkController
// $sum['wait_achievement_commission'] += $data[$key]['wait_achievement_commission'];
}
// die();
$sum['wait_commission'] = '-------';
$sum['pay_time'] = '总计';
@ -929,34 +946,6 @@ class MarketPercentageController extends ThinkController
$data[$key]['achievement_bonus'] .= ',2)';
}
// if ($value['achievement_profit'] != "0.00") {
// if ($data[$key]['performance_commission'] == "=ROUND(") {
// $data[$key]['performance_commission'] .= "K{$line}*(G{$line}/100),2)";
// } else {
// $data[$key]['performance_commission'] .= "+K{$line}*(G{$line}/100),2)";
// }
//
// if ($data[$key]['achievement_bonus'] == "=ROUND(") {
// $data[$key]['achievement_bonus'] .= "K{$line}*(I{$line}/100),2)";
// } else {
// $data[$key]['achievement_bonus'] .= "+K{$line}*(I{$line}/100),2)";
// }
// } else {
// $data[$key]['performance_commission'] .= ",2)";
// $data[$key]['achievement_bonus'] .= ",2)";
// }
//
// if ($data[$key]['performance_commission'] == '=ROUND(,2)') {
// $data[$key]['performance_commission'] = "0.00";
// }
//
// if ($data[$key]['achievement_bonus'] == '=ROUND(,2)') {
// $data[$key]['achievement_bonus'] = "0.00";
// }
// $data[$key]['performance_commission'] = "=ROUND(J{$line}*(F{$line}/100)+J{$line}*(G{$line}/100),2)";
// $data[$key]['achievement_bonus'] = "=ROUND(J{$line}*(H{$line}/100)+J{$line}*(I{$line}/100),2)";
$data[$key]['commission'] = "=ROUND(L{$line}+M{$line}*N{$line},2)";
}
@ -1130,6 +1119,7 @@ class MarketPercentageController extends ThinkController
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['achievement_bonus']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_performance_commission']='0.00'):'';
!($this->leavePercentage->isSettlement($value['pay_time'],$value['admin_id']))?($value['wait_achievement_commission']='0.00'):'';
@ -1146,6 +1136,15 @@ class MarketPercentageController extends ThinkController
$data[$key]['commission'] = number_format($data[$key]['performance_commission'] + $data[$key]['achievement_bonus'], 2, '.', '');;
$data[$key]['extend_commission'] = $data[$key]['commission'] - $data[$key]['wait_commission'];
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['commission']-=$data[$key]['wait_commission']):'';
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_performance_commission']='0.00'):'';
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_achievement_commission']='0.00'):'';
!($this->leavePercentage->isTimeoutSettlement($value['pay_time'],$value['admin_id']))?($data[$key]['wait_commission']='0.00'):'';
$sum['performance_revenue'] += $value['performance_revenue'];
$sum['appraisal_bonuses'] += $value['appraisal_bonuses'];