|
|
|
@ -163,9 +163,9 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
if ($company_info['collection'] == 1) {
|
|
|
|
|
$pay_company_id = 0;
|
|
|
|
|
$this->assign('first_channel_id',$id);
|
|
|
|
|
$this->assign('second_company_id',$company_info['second_company_id']);
|
|
|
|
|
$this->assign('second_company_id',$id);
|
|
|
|
|
} else if ($company_info['collection'] == 2) {
|
|
|
|
|
$this->assign('first_channel_id',$company_info['first_company_id']);
|
|
|
|
|
$this->assign('first_channel_id',$id);
|
|
|
|
|
$this->assign('second_company_id',$id);
|
|
|
|
|
$pay_company_id = 1;
|
|
|
|
|
}
|
|
|
|
@ -230,11 +230,15 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
public function getCompanyList()
|
|
|
|
|
{
|
|
|
|
|
$id = $_REQUEST['id'];
|
|
|
|
|
$cpCompany = M("aggregate_statement","tab_")->field("id,second_party_info")->where("id={$id}")->find();
|
|
|
|
|
$cpCompany = M("aggregate_statement","tab_")->field("id,first_party_info,second_party_info")->where("id={$id}")->find();
|
|
|
|
|
|
|
|
|
|
$data = array();
|
|
|
|
|
$data['ptCompany']= M("CompanyInfo","tab_")->field('id,partner')->select();
|
|
|
|
|
$data['cpCompany']= [[
|
|
|
|
|
// $data['ptCompany']= M("CompanyInfo","tab_")->field('id,partner')->select();
|
|
|
|
|
$data['ptCompany']=[[
|
|
|
|
|
"id"=> $cpCompany['id'],
|
|
|
|
|
"partner"=>json_decode($cpCompany['first_party_info'],true)['partner']
|
|
|
|
|
]];
|
|
|
|
|
$data['cpCompany']= [[
|
|
|
|
|
"id"=> $cpCompany['id'],
|
|
|
|
|
"partner"=>json_decode($cpCompany['second_party_info'],true)['partner']
|
|
|
|
|
]];
|
|
|
|
@ -245,7 +249,10 @@ class AggregateFinanceStatementController extends ThinkController
|
|
|
|
|
$CompanyId = $_REQUEST['company_id'];
|
|
|
|
|
$company_type = $_REQUEST['company_type'];
|
|
|
|
|
if($company_type == 'pt'){
|
|
|
|
|
$info = M("CompanyInfo","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank")->where("id = '{$CompanyId}'")->find();
|
|
|
|
|
// $info = M("CompanyInfo","tab_")->field("id,partner,link_man,link_phone,address,company_tax_no,payee_name,bank_account,opening_bank")->where("id = '{$CompanyId}'")->find();
|
|
|
|
|
|
|
|
|
|
$cpCompany = M("aggregate_statement","tab_")->field("channel_id id,first_party_info,channel_id")->where("id={$CompanyId}")->find();
|
|
|
|
|
$info = json_decode($cpCompany['first_party_info'],true);
|
|
|
|
|
}else{
|
|
|
|
|
$cpCompany = M("aggregate_statement","tab_")->field("channel_id id,second_party_info,channel_id")->where("id={$CompanyId}")->find();
|
|
|
|
|
|
|
|
|
|