From f66ec6d1ff27eb73bf90175a2481c037b0ebae1d Mon Sep 17 00:00:00 2001 From: chenzhi Date: Sat, 11 Jul 2020 17:28:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=87=BD=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Admin/Model/CompanyRelationModel.class.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/Application/Admin/Model/CompanyRelationModel.class.php b/Application/Admin/Model/CompanyRelationModel.class.php index c5988fa8a..a1eff980d 100644 --- a/Application/Admin/Model/CompanyRelationModel.class.php +++ b/Application/Admin/Model/CompanyRelationModel.class.php @@ -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; }