diff --git a/module/productplan/control.php b/module/productplan/control.php index 4924845a24..e2169be671 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -161,10 +161,10 @@ class productplan extends control } $this->loadModel('score')->create('ajax', 'batchOther'); - die(js::locate(inlink('browse', "productID=$productID&branch=$branch"), 'parent')); + return print(js::locate($this->session->productPlanList, 'parent')); } - $planIDList = $this->post->planIDList ? $this->post->planIDList : die(js::locate($this->session->productPlanList, 'parent')); + $planIDList = $this->post->planIDList ? $this->post->planIDList : return print(js::locate($this->session->productPlanList, 'parent')); $this->commonAction($productID, $branch); diff --git a/module/productplan/model.php b/module/productplan/model.php index 1ef78b3e86..3556823e43 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -653,7 +653,7 @@ class productplanModel extends model foreach($data->id as $planID) { $isFuture = isset($data->future[$planID]) ? true : false; - if($data->status[$planID] != 'wait') $isFuture = false; + if(isset($data->status[$planID]) and $data->status[$planID] != 'wait') $isFuture = false; $plan = new stdclass(); $plan->branch = isset($data->branch[$planID]) ? $data->branch[$planID] : $oldPlans[$planID]->branch;