diff --git a/module/productplan/model.php b/module/productplan/model.php index 3f492c6dd2..2e0ebb32f3 100644 --- a/module/productplan/model.php +++ b/module/productplan/model.php @@ -83,7 +83,7 @@ class productplanModel extends model $date = date('Y-m-d'); $plans = $this->dao->select('*')->from(TABLE_PRODUCTPLAN)->where('product')->eq($product) ->andWhere('deleted')->eq(0) - ->beginIF(!empty($branch))->andWhere('branch')->eq($branch)->fi() + ->beginIF(!empty($branch) and $branch != 'all')->andWhere('branch')->eq($branch)->fi() ->beginIF($browseType != 'all')->andWhere('status')->eq($browseType)->fi() ->beginIF(strpos($param, 'skipparent') !== false)->andWhere('parent')->ne(-1)->fi() ->orderBy($orderBy)