diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index c313a01ef..af16750ad 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -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); } @@ -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}";