diff --git a/Application/Admin/Controller/AggregateFinanceStatementController.class.php b/Application/Admin/Controller/AggregateFinanceStatementController.class.php index 1d1d73bfd..6b4e1d496 100644 --- a/Application/Admin/Controller/AggregateFinanceStatementController.class.php +++ b/Application/Admin/Controller/AggregateFinanceStatementController.class.php @@ -655,13 +655,13 @@ class AggregateFinanceStatementController extends ThinkController $company_info = json_decode($relation['second_company_info'],true); } - if ($company_info['company_type']=='个人') { + if ($company_info['invoice_type']) { $company_type = 1; - } elseif($company_info['company_type']=='公司') { + } else { $company_type = 2; } - if ($company_type == 1) { + if ($company_type == 2) { $this->excelDownStreamPersonTemplate($data,$big_pay_money); } else { $this->excelDownStreamTemplate($data,$big_pay_money); diff --git a/Application/Admin/Controller/AggregateRelationController.class.php b/Application/Admin/Controller/AggregateRelationController.class.php index 590c0641d..bedec1f2e 100644 --- a/Application/Admin/Controller/AggregateRelationController.class.php +++ b/Application/Admin/Controller/AggregateRelationController.class.php @@ -496,7 +496,7 @@ class AggregateRelationController extends AdminController //查询 $y = $this->DBModel->where("id='{$p['id']}'")->find(); - if($y['settlement_type'] != $p['settlement_type'] || $y['invoice_type'] != $p['invoice_type'] || $y['invoice_content'] != $p['invoice_content'] || $y['is_payment'] != $p['is_payment'] || $y['collection'] != $p['collection']){ +// if($y['settlement_type'] != $p['settlement_type'] || $y['invoice_type'] != $p['invoice_type'] || $y['invoice_content'] != $p['invoice_content'] || $y['is_payment'] != $p['is_payment'] || $y['collection'] != $p['collection']){ //修改了进行审核 $p['status'] = 0; $verify_log = [ @@ -517,9 +517,13 @@ class AggregateRelationController extends AdminController $p['second_company_id'] = $y['second_company_id']; $p['second_company_name'] = $y['second_company_name']; $p['second_company_type'] = $y['second_company_type']; - } else { - $this->error('未做任何修改'); - } +// } else { +// $verify_log = [ +// "create_user"=>$this->admininfo["username"], +// "create_time"=>date("Y-m-d H:i:s") +// ]; +// $p['verify_log'] = json_encode($verify_log); +// } if($p['first_company_type'] > 0){ $where = " (first_company_type ='{$p['first_company_type']}' and first_company_id = '{$p['first_company_id']}') @@ -549,9 +553,11 @@ class AggregateRelationController extends AdminController $company_info['invoice_item'] = $p['invoice_content']; if ($p['invoice_type'] == 1) { - $company_info['invoice_type'] = "专票"; + $company_info['invoice_type'] = "增值税专用发票"; } elseif($p['invoice_type'] == 2) { - $company_info['invoice_type'] = "普票"; + $company_info['invoice_type'] = "增值税普通发票"; + } else { + $company_info['invoice_type'] = ""; } $p['first_company_info'] = json_encode($company_info); @@ -561,9 +567,11 @@ class AggregateRelationController extends AdminController $company_info = json_decode($p['second_company_info'],true); $company_info['invoice_item'] = $p['invoice_content']; if ($p['invoice_type'] == 1) { - $company_info['invoice_type'] = "专票"; + $company_info['invoice_type'] = "增值税专用发票"; } elseif($p['invoice_type'] == 2) { - $company_info['invoice_type'] = "普票"; + $company_info['invoice_type'] = "增值税普通发票"; + } else { + $company_info['invoice_type'] = ""; } $p['second_company_info'] = json_encode($company_info); @@ -591,12 +599,12 @@ class AggregateRelationController extends AdminController $dbres = $this->DBModel->where($map)->find(); $first_company_info = $this->getCompanyInfo($dbres['first_company_type'],$dbres['first_company_id']); - $first_company_info['invoice_type'] = $first_company_info['invoice_type'] == "专票" ? 1 : ($first_company_info['invoice_type'] == "普票"?2:''); + $first_company_info['invoice_type'] = strstr($first_company_info['invoice_type'],'专') ? 1 : (strstr($first_company_info['invoice_type'],'普')?2:''); $this->assign('first_company_info',$first_company_info); $second_company_info = $this->getCompanyInfo($dbres['second_company_type'],$dbres['second_company_id']); - $second_company_info['invoice_type'] = $second_company_info['invoice_type'] == "专票" ? 1 : ($second_company_info['invoice_type'] == "普票"?2:''); + $second_company_info['invoice_type'] = strstr($second_company_info['invoice_type'],'专') ? 1 : (strstr($second_company_info['invoice_type'],'普')?2:''); $this->assign('second_company_info',$second_company_info); $dbres['first_company_type'] =$this->CompanyType[$dbres['first_company_type']]; @@ -704,9 +712,9 @@ class AggregateRelationController extends AdminController //己方公司 $companyInfo = M("CompanyInfo","tab_")->field("id,partner company_name,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank,invoice_item,invoice_type,register_phone,register_address")->where("status='1' AND id='{$id}'")->find(); if (strstr($companyInfo['invoice_type'],'专')) { - $companyInfo['invoice_type'] = "专票"; + $companyInfo['invoice_type'] = "增值税专用发票"; } else if (strstr($companyInfo['invoice_type'],'普')) { - $companyInfo['invoice_type'] = "普票"; + $companyInfo['invoice_type'] = "增值税普通发票"; } } if($type == 1){ @@ -723,9 +731,9 @@ class AggregateRelationController extends AdminController $companyInfo = $this->aggregateCompanyInfo; if($companyInfo['invoice_type'] == 1) { - $companyInfo['invoice_type'] = '专票'; + $companyInfo['invoice_type'] = '增值税专用发票'; } else if($companyInfo['invoice_type'] == 2) { - $companyInfo['invoice_type'] = '普票'; + $companyInfo['invoice_type'] = '增值税普通发票'; } } if(isset($companyInfo['company_belong'])){ diff --git a/Application/Admin/View/CpJuheCompany/index.html b/Application/Admin/View/CpJuheCompany/index.html index 3243d7751..33e975183 100644 --- a/Application/Admin/View/CpJuheCompany/index.html +++ b/Application/Admin/View/CpJuheCompany/index.html @@ -157,7 +157,7 @@