$where['_string'] .= " (first_company_id='{$params['company_id']}' AND first_company_type='{$params['company_type']}') OR (second_company_id='{$params['company_id']}' AND second_company_type='{$params['company_type']}')";
if(isset($params['company_name'])){
$where['_string'] .= " AND (first_company_name LIKE '%{$params['company_name']}%' OR second_company_name LIKE '%{$params['company_name']}%')";
}
if(isset($params['settlement_type'])){
@ -150,13 +146,8 @@ class CompanyRelationController extends AdminController
if(isset($params['company_type'])){
$where['_string'] .= " AND (first_company_type='{$params['company_type']}' OR second_company_type='{$params['company_type']}')";
}
if(isset($params['company_id'])){
$where['_string'] .= " AND (first_company_id='{$params['company_id']}' OR second_company_id='{$params['company_id']}')";
$where['_string'] .= " (first_company_id='{$params['company_id']}' AND first_company_type='{$params['company_type']}') OR (second_company_id='{$params['company_id']}' AND second_company_type='{$params['company_type']}')";
if(isset($params['company_name'])){
$where['_string'] .= " AND (first_company_name LIKE '%{$params['company_name']}%' OR second_company_name LIKE '%{$params['company_name']}%')";