|
|
|
@ -64,10 +64,10 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
$map['create_time'] = ['ELT', strtotime($_REQUEST['time_end2']) + 86399];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($_REQUEST['verify_status']) {
|
|
|
|
|
if (isset($_REQUEST['verify_status'])) {
|
|
|
|
|
$map['verify_status'] = $_REQUEST['verify_status'];
|
|
|
|
|
}
|
|
|
|
|
if ($_REQUEST['channel_id']) {
|
|
|
|
|
if (isset($_REQUEST['channel_id'])){
|
|
|
|
|
$map['channel_id'] = $_REQUEST['channel_id'];
|
|
|
|
|
}
|
|
|
|
|
$typeflag = false;
|
|
|
|
@ -515,8 +515,13 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
$data['statement_info'] = json_decode($data['statement_info'], 1);//结算记录
|
|
|
|
|
//收款方
|
|
|
|
|
$big_pay_money = convertAmountToCn($data['ratio_money']);//大写
|
|
|
|
|
$data['receive_company'] = $data['pay_type'] ? $data['first_party_info'] : $data['second_party_info'];
|
|
|
|
|
$data['pay_company'] = $data['pay_type'] ? $data['second_party_info'] : $data['first_party_info'];
|
|
|
|
|
|
|
|
|
|
if($data['pay_type'] == 0){
|
|
|
|
|
//甲-乙
|
|
|
|
|
$data['pay_company'] = $data['second_party_info'];
|
|
|
|
|
}else{
|
|
|
|
|
$data['pay_company'] = $data['first_party_info'];
|
|
|
|
|
}
|
|
|
|
|
$this->doAddOperationLog($id,"导出");
|
|
|
|
|
$this->excelDownStreamTemplate($data,$big_pay_money);
|
|
|
|
|
}
|
|
|
|
@ -529,7 +534,7 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
|
|
|
|
|
define('EOL',(PHP_SAPI == 'cli') ? PHP_EOL : '<br />');
|
|
|
|
|
|
|
|
|
|
date_default_timezone_set('Europe/London');
|
|
|
|
|
date_default_timezone_set('Asia/Shanghai');
|
|
|
|
|
Vendor("PHPExcel.PHPExcel");
|
|
|
|
|
$objPHPExcel = new \PHPExcel();
|
|
|
|
|
$objReader = \PHPExcel_IOFactory::createReader('Excel5');
|
|
|
|
@ -537,9 +542,9 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
$objPHPExcel = $objReader->load("Public/Admin/excel/aggregate_stream.xls");
|
|
|
|
|
$statement_begin_time = date('Y.m.d', $data['begintime']);//对账开始时间
|
|
|
|
|
$statement_end_time = date('Y.m.d',$data['endtime']);//对账截止时间
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('A1', "《 {$data['channel_name']} 》结算单
|
|
|
|
|
({$statement_begin_time}-{$statement_end_time})");
|
|
|
|
|
|
|
|
|
|
$objPHPExcel->getActiveSheet()->getStyle('A1')->getAlignment()->setWrapText(true);
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('A1', "《 {$data['channel_name']} 》结算单\n({$statement_begin_time}-{$statement_end_time})");
|
|
|
|
|
if ($data['withdraw_type'] == '2') {
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('D2','补点比例');
|
|
|
|
|
}
|
|
|
|
@ -577,9 +582,10 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+4), $data['second_party_info']['link_man']);//联系人
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+5), $data['second_party_info']['link_phone']);//联系电话
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+6), $data['second_party_info']['address']);//邮寄地址
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+8), $data['second_party_info']['payee_name']);//户名
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['second_party_info']['bank_account']);//银行账号
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['second_party_info']['opening_bank']);//开户行
|
|
|
|
|
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+8), $data['pay_company']['payee_name']);//户名
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+9), $data['pay_company']['bank_account']);//银行账号
|
|
|
|
|
$objPHPExcel->getActiveSheet()->setCellValue('E'.($line+10), $data['pay_company']['opening_bank']);//开户行
|
|
|
|
|
if($data['withdraw_type'] == 1){
|
|
|
|
|
$m = date('Y.m', $data['begintime']);
|
|
|
|
|
$fileName = "{$data['second_party_info']['partner']}&{$data['first_party_info']['partner']}-对账单{$m}";
|
|
|
|
|