diff --git a/Application/Admin/Controller/FinanceController.class.php b/Application/Admin/Controller/FinanceController.class.php index 260744384..e539dc47e 100644 --- a/Application/Admin/Controller/FinanceController.class.php +++ b/Application/Admin/Controller/FinanceController.class.php @@ -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); diff --git a/Application/Admin/Controller/FinancePromoteController.class.php b/Application/Admin/Controller/FinancePromoteController.class.php index 93bbeb607..50173fd69 100644 --- a/Application/Admin/Controller/FinancePromoteController.class.php +++ b/Application/Admin/Controller/FinancePromoteController.class.php @@ -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'])) { diff --git a/Application/Admin/Controller/FinancialSummaryController.class.php b/Application/Admin/Controller/FinancialSummaryController.class.php index aee550b32..22b4c2386 100644 --- a/Application/Admin/Controller/FinancialSummaryController.class.php +++ b/Application/Admin/Controller/FinancialSummaryController.class.php @@ -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'], diff --git a/Application/Admin/Controller/PayChannelController.class.php b/Application/Admin/Controller/PayChannelController.class.php index 4489696c1..667021e46 100644 --- a/Application/Admin/Controller/PayChannelController.class.php +++ b/Application/Admin/Controller/PayChannelController.class.php @@ -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) { diff --git a/Application/Admin/View/Finance/coinDetail.html b/Application/Admin/View/Finance/coinDetail.html index 1f4c58998..d9ba26176 100644 --- a/Application/Admin/View/Finance/coinDetail.html +++ b/Application/Admin/View/Finance/coinDetail.html @@ -109,8 +109,8 @@