|
@@ -28,7 +28,7 @@ class Project extends Base_Controller {
|
|
|
$project_id = intval($this->input->post('project_id', true));
|
|
|
$type = intval($this->input->post('type', true));
|
|
|
$section = $this->input->post('section', true);
|
|
|
- $company = $this->input->post('company', true);
|
|
|
+ $company = intval($this->input->post('company', true));
|
|
|
$version = $this->session->userdata('version');
|
|
|
|
|
|
$data = array();
|
|
@@ -50,14 +50,14 @@ class Project extends Base_Controller {
|
|
|
$where['section'] = $section;
|
|
|
$where2['L.section'] = $section;
|
|
|
}
|
|
|
- if ($company !== '' && $company !== NUll) {
|
|
|
- if ($type == 1) {
|
|
|
+ if (!empty($company) && !empty($type)) {
|
|
|
+ if ($type == 2) {
|
|
|
$where['manu'] = $company;
|
|
|
$where2['L.manu'] = $company;
|
|
|
- }elseif ($type == 2) {
|
|
|
+ }elseif ($type == 3) {
|
|
|
$where['supplier'] = $company;
|
|
|
$where2['L.supplier'] = $company;
|
|
|
- }elseif ($type == 3) {
|
|
|
+ }elseif ($type == 4) {
|
|
|
$where['po'] = $company;
|
|
|
$where2['L.po'] = $company;
|
|
|
}else {
|