|
@@ -416,22 +416,25 @@ class Project extends Base_Controller {
|
|
|
if ($role != SYSTEM_ADMIN) {
|
|
|
if ($role == 2) {
|
|
|
// $filter .= ' AND L.manu = '.$company;
|
|
|
- $where['L.manu = '] = $company;
|
|
|
+ $where['P.company = '] = $company;
|
|
|
$sectionWhere['L.manu'] = $company;
|
|
|
// $countWhere[] = 'manu = '.$company;
|
|
|
}elseif ($role == 3) {
|
|
|
// $filter .= ' AND L.supplier = '.$company;
|
|
|
// $countWhere[] = 'supplier = '.$company;
|
|
|
- $where['L.supplier = '] = $company;
|
|
|
+ // $where[''] = $company;
|
|
|
+ $where = '(L.supplier = '.$company.' or P.company = '.$company.')';
|
|
|
$sectionWhere['L.supplier'] = $company;
|
|
|
}elseif ($role == 4) {
|
|
|
// $filter .= ' AND L.po = '.$company;
|
|
|
// $countWhere[] = 'po = '.$company;
|
|
|
- $where['L.po = '] = $company;
|
|
|
+ // $where['L.po = '] = $company;
|
|
|
+ $where = '(L.po = '.$company.' or P.company = '.$company.')';
|
|
|
$sectionWhere['L.po'] = $company;
|
|
|
}else {
|
|
|
// $filter .= ' AND P.cityid = '.$company;
|
|
|
- $where['P.cityid = '] = $company;
|
|
|
+ // $where['P.cityid = '] = $company;
|
|
|
+ $where = '(P.cityid = '.$company.' or P.company = '.$company.')';
|
|
|
$sectionWhere['P.cityid'] = $company;
|
|
|
}
|
|
|
}
|