diff --git a/module/execution/model.php b/module/execution/model.php index 935e2f2758..0f09524fa6 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -1463,7 +1463,7 @@ class executionModel extends model $oldPercentTotal = $this->dao->select('SUM(t2.percent) as total')->from(TABLE_PROJECTPRODUCT)->alias('t1') ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.project=t2.id') ->where('t1.product')->eq($this->post->products[0]) - ->beginIF(!empty($_POST['branch']))->andWhere('t1.branch')->eq(current($this->post->branch[0]))->fi() + ->beginIF(!empty($_POST['branch'][0]))->andWhere('t1.branch')->eq(current($this->post->branch[0]))->fi() ->andWhere('t2.type')->eq('stage') ->andWhere('t2.grade')->eq(1) ->andWhere('t2.deleted')->eq(0)