优化函数

master
chenzhi 4 years ago
parent 296b5a0d8f
commit f66ec6d1ff

@ -52,19 +52,24 @@ class CompanyRelationModel extends Model
"is_payment"=>$res['is_payment'],
"invoice_content"=>$res['invoice_content']
];
if($res["first_company_type"] == $company_type){
$s = ($res['collection'] == 1 ? "是" : "否");
}else{
$s = ($res['collection'] == 2 ? "是" : "否");
}
$senddata["collection"] = $s;
if($type){
if($res["first_company_type"] == $company_type){
$s = ($res['collection'] == 1 ? "是" : "否");
}else{
$s = ($res['collection'] == 2 ? "是" : "否");
}
$senddata["invoice_type"] = $this->InvoiceType[$res['invoice_type']];
$senddata["settlement_type"] = $this->SettlementType[$res['settlement_type']];
}else{
if($res["first_company_type"] == $company_type){
$s = ($res['collection'] == 1 ? 1 : 0);
}else{
$s = ($res['collection'] == 2 ? 1 : 0);
}
$senddata["invoice_type"] = $res['invoice_type'];
$senddata["settlement_type"]=$res['settlement_type'];
}
$senddata["collection"] = $s;
}
return $senddata;
}

Loading…
Cancel
Save