Merge branch 'feature/fee_form' of wmtx/platform into release

财务管理金额保留两位小数
master
廖金灵 5 years ago committed by Gogs
commit a8d478b526

@ -954,6 +954,9 @@ class FinanceController extends ThinkController
foreach($data as $key => $value) {
$data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['cost'] = number_format($value['cost'],2,'.','');
$data[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
}
$count = D("spend")->getSpendData($map,$field,$group,$order);

@ -120,7 +120,9 @@ class FinancePromoteController extends AdminController
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
$v['promote_account'] = get_promote_name($v['p_id']);
$v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'];
$v['inside_cash_count'] = number_format($v['inside_cash_count'],2,'.','');
$v['allcount'] = number_format($v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'],2,'.','');
$count['cash_count'] += $v['cash_count'];
$count['balance_coin_count'] += $v['balance_coin_count'];
$count['bind_coin_count'] += $v['bind_coin_count'];
@ -164,6 +166,13 @@ class FinancePromoteController extends AdminController
}
$count['cash_count'] = number_format($count['cash_count'],2,'.','');
$count['balance_coin_count'] = number_format($count['balance_coin_count'],2,'.','');
$count['bind_coin_count'] = number_format($count['bind_coin_count'],2,'.','');
$count['inside_cash_count'] = number_format($count['inside_cash_count'],2,'.','');
$count['all_count'] = number_format($count['all_count'],2,'.','');
//外团占比
$this->assign('outBelong',number_format($outBelong/$count['all_count']*100,2,'.',''));
//内团占比
@ -318,7 +327,8 @@ class FinancePromoteController extends AdminController
if(!array_key_exists('balance_coin_count',$v)) $v['balance_coin_count']=0;
if(!array_key_exists('bind_coin_count',$v)) $v['bind_coin_count']=0;
if(!array_key_exists('inside_cash_count',$v)) $v['inside_cash_count']=0;
$v['allcount'] = $v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'];
$v['allcount'] = number_format($v['cash_count']-0+$v['balance_coin_count']+$v['bind_coin_count'],2,'.','');
$v['inside_cash_count'] = number_format($v['inside_cash_count'],2,'.','');
$allcount['cash_count'] += $v['cash_count'];
$allcount['balance_coin_count'] += $v['balance_coin_count'];
$allcount['bind_coin_count'] += $v['bind_coin_count'];
@ -327,6 +337,12 @@ class FinancePromoteController extends AdminController
$data[] = $v;
}
$allcount['cash_count'] = number_format($allcount['cash_count'],2,'.','');
$allcount['balance_coin_count'] = number_format($allcount['balance_coin_count'],2,'.','');
$allcount['bind_coin_count'] = number_format($allcount['bind_coin_count'],2,'.','');
$allcount['inside_cash_count'] = number_format($allcount['inside_cash_count'],2,'.','');
$allcount['all_count'] = number_format($allcount['all_count'],2,'.','');
$data = my_sort($data, $data_order_type, (int)$data_order);
if(isset($_REQUEST['export'])){
@ -438,7 +454,7 @@ class FinancePromoteController extends AdminController
$value['cash_count']?:0;
$value['balance_coin_count']?:0;
$value['inside_cash_count']?:0;
$value['all_cash_count'] = $value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'];
$value['all_cash_count'] = number_format($value['cash_count'] + $value['balance_coin_count'] + $value['inside_cash_count'],2,'.','');
$value['company_belong'] =getCompanyBlong($value['company_belong']);
if(!$value['game_name']) $value['game_name'] = "无";
}
@ -473,7 +489,7 @@ class FinancePromoteController extends AdminController
$sumCash = $totalData['cash_count'];
$sumBalance = $totalData['balance_coin_count'];
$sumInside = $totalData['inside_cash_count'];
$sumAll = $sumCash + $sumBalance + $sumInside;
$sumAll = number_format($sumCash + $sumBalance + $sumInside,2,'.','');
$this->assign('sumCash', $sumCash);
$this->assign('sumBalance', $sumBalance);
@ -717,6 +733,10 @@ class FinancePromoteController extends AdminController
foreach($data as $key => $value) {
$data[$key]['pay_way'] = getPayType($value['pay_way']);
$data[$key]['cost'] = number_format($value['cost'],2,'.','');
$data[$key]['pay_amount'] = number_format($value['pay_amount'],2,'.','');
}
if (isset($_REQUEST['export'])) {

@ -45,22 +45,22 @@ class FinancialSummaryController extends AdminController
{
$senddata = array(
"income"=>[
"count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
"count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']
],
"promote"=>[
"count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
"count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']
],
"channel"=>[
"count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
"count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']
],
"payway"=>[
"count"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]
"count"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']
]
);
$data = [];
//初始化数据
foreach ($this->keyname as $k => $v) {
$data[$k] = array("name"=>$v,"money"=>[0,0,0,0,0,0,0,0,0,0,0,0,0]);
$data[$k] = array("name"=>$v,"money"=>['0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00','0.00']);
}
$map = array(
"count_year"=>$_REQUEST['year'],

@ -261,10 +261,10 @@ class PayChannelController extends ThinkController
foreach ($data as $key => $value) {
$data[$key]['pay_amount'] = $value['pay_amount'] - $value['test_coin'];
$data[$key]['platform_coin'] = $value['platform_coin'] - $value['test_platform_coin'];
$data[$key]['test_coin'] = $value['test_coin'] + $value['test_platform_coin'];
$data[$key]['sum'] = $value['pay_amount'] + $value['platform_coin'];
$data[$key]['pay_amount'] = number_format($value['pay_amount'] - $value['test_coin'],2,'.','');
$data[$key]['platform_coin'] = number_format($value['platform_coin'] - $value['test_platform_coin'],2,'.','');
$data[$key]['test_coin'] = number_format($value['test_coin'] + $value['test_platform_coin'],2,'.','');
$data[$key]['sum'] = number_format($value['pay_amount'] + $value['platform_coin'],2,'.','');
if($_REQUEST['export'] == 1) {
unset($data[$key]['game_id'] );
@ -339,6 +339,12 @@ class PayChannelController extends ThinkController
array_merge($data,[0=>$superSignData]),[0=>$offcialData])),[0=>$spreadData],[0=>$sumData])),[0=>$payTypeDataExport]),[0=>$channelDataExport]),'支付渠道统计导出',$title);
}
$sumData['pay_amount'] = number_format($sumData['pay_amount'],2,'.','');
$sumData['platform_coin'] = number_format($sumData['platform_coin'],2,'.','');
$sumData['test_coin'] = number_format($sumData['test_coin'],2,'.','');
$sumData['test_platform_coin'] = number_format($sumData['test_platform_coin'],2,'.','');
$this->meta_title = "支付渠道统计";
$size = $row;//每页显示的记录数
$data = array_slice($data, ($arraypage - 1) * $size, $size);
@ -676,8 +682,11 @@ class PayChannelController extends ThinkController
}
}
$sumAllData['pay_amount'] = number_format($sumAllData['pay_amount'],2,'.','');;
$sumAllData['platform_amount'] = number_format($sumAllData['platform_amount'],2,'.','');;
$this->meta_title = "游戏订单查看";
$sumAllData['sum'] = $sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount'];
$sumAllData['sum'] = number_format($sumAllData['bind_amount']+$sumAllData['platform_amount']+$sumAllData['pay_amount'],2,'.','');
// var_dump($sumAllData);die();
$this->assign('sumAllData',$sumAllData);
$this->assign('data',$data);
@ -1152,6 +1161,10 @@ class PayChannelController extends ThinkController
$sumAllData['cost'] += $coinDataSum['cost'];
}
$sumAllData['pay_amount'] = number_format($sumAllData['pay_amount'],2,'.','');
$sumAllData['cost'] = number_format($sumAllData['cost'],2,'.','');
$this->assign('sumAllData',$sumAllData);
@ -1178,6 +1191,11 @@ class PayChannelController extends ThinkController
}
$payTypeData['支付宝支付金额'] = number_format($payTypeData['支付宝支付金额'],2,'.','');
$payTypeData['微信支付金额'] = number_format($payTypeData['微信支付金额'],2,'.','');
$payTypeData['快捷支付金额'] = number_format($payTypeData['快捷支付金额'],2,'.','');
$payTypeData['其他支付金额'] = number_format($payTypeData['其他支付金额'],2,'.','');
$this->assign('payTypeData',$payTypeData);
foreach($sumData as $key=>$value) {

@ -109,8 +109,8 @@
</volist>
<tr>
<td colspan="6" ><span>总计</span></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0</if></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0.00</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0.00</if></td>
<td colspan="2"> </td>
</tr>
</tbody>

@ -138,8 +138,8 @@
</volist>
<tr>
<td colspan="6" ><span>总计</span></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0</if></td>
<td ><span><if condition="$total_cost neq ''">{$total_cost}<else/>0.00</if></span></td>
<td><if condition="$total_pay_amount neq ''">{$total_pay_amount}<else/>0.00</if></td>
<td colspan="2"> </td>
</tr>
</tbody>

@ -224,11 +224,11 @@
<tr class="data_summary">
<td colspan="2" style="text-align: center;">汇总:</td>
<td style="text-align: center;">---</td>
<td>{$all_count['cash_count']}</td>
<td>{$all_count['balance_coin_count']}</td>
<td>{$all_count['bind_coin_count']}</td>
<td>{$all_count['inside_cash_count']}</td>
<td>{$all_count['all_count']}</td>
<td style="text-align: center;">{$all_count['cash_count']}</td>
<td style="text-align: center;">{$all_count['balance_coin_count']}</td>
<td style="text-align: center;">{$all_count['bind_coin_count']}</td>
<td style="text-align: center;">{$all_count['inside_cash_count']}</td>
<td style="text-align: center;">{$all_count['all_count']}</td>
<td style="text-align: center;">
<!-- <a href="{:U('FinancePromote/gameStatistics',array_merge(['promote_id'=>$data['p_id'],'company_id'=>$data['company_id'],'promote_type'=>2],I('get.')))}" >游戏查看</a> -->
</td>

@ -136,14 +136,14 @@
<td>{$incomekey}</td>
<td>{$income.name}</td>
<volist name="income.money" id="incomemoney" >
<td>{$incomemoney}</td>
<td><if condition="$incomemoney neq 0">{$incomemoney}<else/>0.00</if></td>
</volist>
</tr>
</volist>
<tr class="data_summary">
<td colspan="2" style="text-align: center;">合计:</td>
<volist name="data.income.count" id="incomecount" >
<td>{$incomecount}</td>
<td><if condition="$incomecount neq 0">{$incomecount}<else/>0.00</if></td>
</volist>
</tr>
</tbody>
@ -161,14 +161,14 @@
<td>{$promotekey}</td>
<td>{$promote.name}</td>
<volist name="promote.money" id="promotemoney" >
<td>{$promotemoney}</td>
<td><if condition="$promotemoney neq 0">{$promotemoney}<else/>0.00</if></td>
</volist>
</tr>
</volist>
<tr class="data_summary">
<td colspan="2" style="text-align: center;">合计:</td>
<volist name="data.promote.count" id="promotecount" >
<td>{$promotecount}</td>
<td><if condition="$promotecount neq 0">{$promotecount}<else/>0.00</if></td>
</volist>
</tr>
</tbody>
@ -186,14 +186,14 @@
<td>{$channelkey}</td>
<td>{$channel.name}</td>
<volist name="channel.money" id="channelmoney" >
<td>{$channelmoney}</td>
<td><if condition="$channelmoney neq 0">{$channelmoney}<else/>0.00</if></td>
</volist>
</tr>
</volist>
<tr class="data_summary">
<td colspan="2" style="text-align: center;">合计:</td>
<volist name="data.channel.count" id="channelcount" >
<td>{$channelcount}</td>
<td><if condition="$channelcount neq 0">{$channelcount}<else/>0.00</if></td>
</volist>
</tr>
</tbody>
@ -211,14 +211,14 @@
<td>{$paywaykey}</td>
<td>{$payway.name}</td>
<volist name="payway.money" id="paywaymoney" >
<td>{$paywaymoney}</td>
<td><if condition="$paywaymoney neq 0">{$paywaymoney}<else/>0.00</if></td>
</volist>
</tr>
</volist>
<tr class="data_summary">
<td colspan="2" style="text-align: center;">合计:</td>
<volist name="data.payway.count" id="paywaycount" >
<td>{$paywaycount}</td>
<td><if condition="$paywaycount neq 0">{$paywaycount}<else/>0.00</if></td>
</volist>
</tr>
</tbody>

@ -179,30 +179,30 @@
<if condition="$_GET['game_id'] eq ''">
<tr>
<td><span>超级签</span></td>
<td ><span><if condition="$superSignData.pay_amount neq ''">{$superSignData['pay_amount']}<else/>0</if></span></td>
<td>0</td>
<td><span><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$superSignData.test_coin neq ''">{$superSignData.test_coin}<else/>0</if></a></span></td>
<td><if condition="$superSignData.pay_amount neq ''">{$superSignData['sum']}<else/>0</if></td>
<td ><span><if condition="$superSignData.pay_amount neq ''">{$superSignData['pay_amount']}<else/>0.00</if></span></td>
<td>0.00</td>
<td><span><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$superSignData.test_coin neq ''">{$superSignData.test_coin}<else/>0.00</if></a></span></td>
<td><if condition="$superSignData.pay_amount neq ''">{$superSignData['sum']}<else/>0.00</if></td>
<td>
<a href="{:U('SuperStatistical/index',array_merge(array('model'=>'game_supersign','game_name'=>'超级签'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
<tr>
<td><span>官网</span></td>
<td >0</td>
<td >0.00</td>
<td>{$offcialData['pay_amount']}</td>
<td><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$offcialData.test_coin neq ''">{$offcialData.test_coin}<else/>0</if></a></td>
<td><if condition="$offcialData.pay_amount neq ''">{$offcialData['sum']}<else/>0</if></td>
<td><a href="{:U('PayChannel/testDetail',array_merge(array('model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" style="display:block;"><if condition="$offcialData.test_coin neq ''">{$offcialData.test_coin}<else/>0.00</if></a></td>
<td><if condition="$offcialData.pay_amount neq ''">{$offcialData['sum']}<else/>0.00</if></td>
<td>
<a href="{:U('PayChannel/gameDetail',array_merge(array('id'=>21,'model'=>'deposit','game_name'=>'官网'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
</tr>
<tr>
<td><span>推广后台</span></td>
<td ><span>0</span></td>
<td ><span>0.00</span></td>
<td>{$spreadData['pay_amount']}</td>
<td>0</td>
<td><if condition="$spreadData['pay_amount'] neq ''">{$spreadData['sum']}<else/>0</if></td>
<td>0.00</td>
<td><if condition="$spreadData['pay_amount'] neq ''">{$spreadData['sum']}<else/>0.00</if></td>
<td>
<a href="{:U('PayChannel/gameDetail',array_merge(array('id'=>21,'model'=>'coin_pay_order','game_name'=>'推广后台'),I('get.'),['p'=>1]))}" >订单查看</a>
</td>
@ -210,20 +210,20 @@
</if>
<tr>
<td><span>汇总</span></td>
<td ><span><if condition="$sumData.pay_amount neq ''">{$sumData['pay_amount']}<else/>0</if></span></td>
<td><span><if condition="$sumData.platform_coin neq ''">{$sumData['platform_coin']}<else/>0</if></span></td>
<td ><span><if condition="$sumData.pay_amount neq ''">{$sumData['pay_amount']}<else/>0.00</if></span></td>
<td><span><if condition="$sumData.platform_coin neq ''">{$sumData['platform_coin']}<else/>0.00</if></span></td>
<td>{$sumData['test_coin']}</td>
<td><if condition="$sumData['sum'] neq ''">{$sumData['sum']}<else/>0</if></td>
<td><if condition="$sumData['sum'] neq ''">{$sumData['sum']}<else/>0.00</if></td>
<td>
<a href="#" >------</a>
</td>
</tr>
<tr>
<td><span>测试环境内外网平台</span></td>
<td ><span><if condition="$sum_pay_amount.sum_order_amount neq ''">{$sum_pay_amount['sum_order_amount']}<else/>0</if></span></td>
<td><span>0</span></td>
<td>0</td>
<td><if condition="$sum_pay_amount['sum_order_amount'] neq ''">{$sum_pay_amount['sum_order_amount']}<else/>0</if></td>
<td ><span><if condition="$sum_pay_amount.sum_order_amount neq ''">{$sum_pay_amount['sum_order_amount']}<else/>0.00</if></span></td>
<td><span>0.00</span></td>
<td>0.00</td>
<td><if condition="$sum_pay_amount['sum_order_amount'] neq ''">{$sum_pay_amount['sum_order_amount']}<else/>0.00</if></td>
<td>
<a href="{:U('TestOrder/lists')}" >订单查看</a>
</td>
@ -237,7 +237,7 @@
{$key}{$payTypeData} &nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp
</if>
</volist>
平台币直充总金额<span style="color: red">(2019.12.18号以前的无法对应游戏记录不显示在列表中,此项也不计入充值方式统计)</span><if condition="$coinSum neq ''">{$coinSum}<else/>0</if>
平台币直充总金额<span style="color: red">(2019.12.18号以前的无法对应游戏记录不显示在列表中,此项也不计入充值方式统计)</span><if condition="$coinSum neq ''">{$coinSum}<else/>0.00</if>
</td>
</tr>
<tr>

Loading…
Cancel
Save