Merge branch 'hotfix/market_percentage' of wmtx/platform into release

master
郑永星 4 years ago committed by Gogs
commit fe4a029ce4

@ -351,6 +351,14 @@ class MarketPercentageController extends ThinkController
$data[$key]['wait_commission'] = substr(number_format($value['wait_performance_commission'] + $value['wait_achievement_commission'], 4, '.', ''),0,-2);
$data[$key]['extend_commission'] = $data[$key]['commission'] - $data[$key]['wait_commission'];
//两个起提流水都没达到时,不展示税后毛利
$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";
}
if ($market_percentage['time'] == 1) {
if ($month == '07') {
@ -487,8 +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'];
$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]['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)";
}
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,25 +385,27 @@
<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>
<volist name="statemnt_info" id="s" index="key">
<if condition="$key egt 1">
<td>{$s['game_name']}</td>
<td>{$s['game_type']}</td>
<td>{$s['statement_begin_time']|default="无"}-{$statemnt_info[0]['statement_end_time']|default="无"}</td>
<td>{$s['pay_amount']|default="0"}</td>
<td>{$s['ratio']|default="0"}</td>
<td>{$s['increment_ratio']|default="0"}</td>
<td>{$s['reward']|default="0"}</td>
<td>{$s['fine']|default="0"}</td>
<td>{$s['sum_money']|default="0"}</td>
<td>
<a href="javascript:;" class="apply" data-id="{$s.id}">查看详情</a>
</td>
<tr >
<td>{$s['game_name']}</td>
<td>{$s['game_type']}</td>
<td>{$s['statement_begin_time']|default="无"}-{$statemnt_info[0]['statement_end_time']|default="无"}</td>
<td>{$s['pay_amount']|default="0"}</td>
<td>{$s['ratio']|default="0"}</td>
<td>{$s['increment_ratio']|default="0"}</td>
<td>{$s['reward']|default="0"}</td>
<td>{$s['fine']|default="0"}</td>
<td>{$s['sum_money']|default="0"}</td>
<td>
<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>
</volist>

Loading…
Cancel
Save