市场结算管理优化

master
zhengyongxing 4 years ago
parent f9503182da
commit 7aa031bbb4

@ -495,11 +495,31 @@ class MarketPercentageController extends ThinkController
$line = $key+2;
// $develop_commission_ratio = $value['develop_commission_ratio']/100;
$data[$key]['pay_time'] = '`'.$data[$key]['pay_time'];
if ($value['']) {
$data[$key]['performance_commission'] = "=ROUND(";
$data[$key]['achievement_bonus'] = "=ROUND(";
if ($value['performance_revenue'] != "0.00") {
$data[$key]['performance_commission'] .= "J{$line}*(F{$line}/100)";
$data[$key]['achievement_bonus'] .= "J{$line}*(H{$line}/100)";
}
$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)";
if ($value['appraisal_bonuses'] != "0.00") {
if ($data[$key]['performance_commission'] == "=ROUND(") {
$data[$key]['performance_commission'] .= "J{$line}*(G{$line}/100),2)";
} else {
$data[$key]['performance_commission'] .= "+J{$line}*(G{$line}/100),2)";
}
if ($data[$key]['achievement_bonus'] == "=ROUND(") {
$data[$key]['achievement_bonus'] .= "J{$line}*(I{$line}/100),2)";
} else {
$data[$key]['achievement_bonus'] .= "+J{$line}*(I{$line}/100),2)";
}
} else {
$data[$key]['performance_commission'] .= ",2)";
$data[$key]['achievement_bonus'] .= ",2)";
}
// $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(K{$line}+L{$line},2)";
}

@ -1010,6 +1010,18 @@ class TimingController extends AdminController {
$sum_amount = $value['performance_revenue'] + $value['appraisal_bonuses'];
$market_percentage = json_decode($value['market_percentage'],true);//业绩提成
if ($value['performance_revenue']=='0.00') {
$market_percentage['develop_commission_ratio'] = 0;
$market_percentage['appraisal_bonuses_ratio'] = 0;
}
if ($value['appraisal_bonuses']=='0.00') {
$market_percentage['maintain_commission_ratio'] = 0;
$market_percentage['maintain_appraisal_bonuses_ratio'] = 0;
}
// echo "{$value['nickname']}:{$value['pay_time']}\n";
// dump($market_percentage);
$all_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, '.', '');

@ -385,7 +385,7 @@
<td>{$statemnt_info[0]['fine']|default="0"}</td>
<td>{$statemnt_info[0]['sum_money']|default="0"}</td>
<td>
<a href="javascript:;" class="apply" data-id="{$s.id}">查看详情</a>
<a href="javascript:;" class="apply" data-company="{$data['company_id']}" data-id="{$statemnt_info[0]['relation_game_id']}" data-start="{$data['statement_begin_time']}" data-end="{$data['statement_end_time']}">查看详情</a>
</td>
</tr>
@ -403,7 +403,7 @@
<td>{$s['fine']|default="0"}</td>
<td>{$s['sum_money']|default="0"}</td>
<td>
<a href="javascript:;" class="apply" data-id="{$s.id}">查看详情</a>
<a href="javascript:;" class="apply" data-company="{$data['company_id']}" data-id="{$s['relation_game_id']}" data-start="{$s['statement_begin_time']}" data-end="{$s['statement_end_time']}">查看详情</a>
</td>
</tr>
</if>

Loading…
Cancel
Save