diff --git a/module/productplan/control.php b/module/productplan/control.php index cb09c8ac81..72de3120ed 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -224,7 +224,7 @@ class productplan extends control $this->session->set('productPlanList', $this->app->getURI(true), 'product'); $this->commonAction($productID, $branch); - $product = $this->loadModel('product')->getById($productID); + $product = $this->product->getById($productID); $productName = empty($product) ? '' : $product->name; $this->view->title = $productName . $this->lang->colon . $this->lang->productplan->browse; diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 3847f1ca85..c91b87623b 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -139,7 +139,7 @@ if($product->type != 'normal') { $branchStatus = $this->branch->getByID($plan->branch, 0, 'status'); - $disabled = $branchStatus == 'closed' ? 'disabled' : ''; + if($branchStatus == 'closed') $disabled = 'disabled'; } if($config->systemMode == 'new')