diff --git a/module/task/lang/de.php b/module/task/lang/de.php index 059a800bb7..458357db59 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -289,7 +289,6 @@ $lang->task->error->alreadyStarted = 'You cannot start this task, because it $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; $lang->task->error->finishedDateEmpty = '"Finished Date" should not be empty.'; $lang->task->error->finishedDateSmall = '"Finished Date" should be > "Real Started"'; -$lang->task->error->alreadyConsumed = 'The currently selected parent task has been consumed.'; $lang->task->error->date = 'The date should be <= today.'; $lang->task->error->leftEmptyAB = 'When the task status is %s, "Hours Left" cannot be 0'; $lang->task->error->leftEmpty = 'Task#%sWhen the task status is %s, "Left" cannot be 0'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index b09b136114..e3320f9956 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -289,7 +289,6 @@ $lang->task->error->alreadyStarted = 'You cannot start this task, because it $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; $lang->task->error->finishedDateEmpty = '"Finished Date" should not be empty.'; $lang->task->error->finishedDateSmall = '"Finished Date" should be > "Real Started"'; -$lang->task->error->alreadyConsumed = 'The currently selected parent task has been consumed.'; $lang->task->error->date = 'The date should be <= today.'; $lang->task->error->leftEmptyAB = 'When the task status is %s, "Hours Left" cannot be 0'; $lang->task->error->leftEmpty = 'Task#%sWhen the task status is %s, "Left" cannot be 0'; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index 7b65cbd865..00add894a9 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -289,7 +289,6 @@ $lang->task->error->alreadyStarted = 'You cannot start this task, because it $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; $lang->task->error->finishedDateEmpty = '"Finished Date" should not be empty.'; $lang->task->error->finishedDateSmall = '"Finished Date" should be > "Real Started"'; -$lang->task->error->alreadyConsumed = 'The currently selected parent task has been consumed.'; $lang->task->error->date = 'The date should be <= today.'; $lang->task->error->leftEmptyAB = 'When the task status is %s, "Hours Left" cannot be 0'; $lang->task->error->leftEmpty = 'Task#%sWhen the task status is %s, "Left" cannot be 0'; diff --git a/module/task/lang/vi.php b/module/task/lang/vi.php index 4519193445..ebdf8856db 100644 --- a/module/task/lang/vi.php +++ b/module/task/lang/vi.php @@ -230,7 +230,6 @@ $lang->task->error->alreadyStarted = 'You cannot start this task, because it $lang->task->error->realStartedEmpty = '"Real Started" should not be empty.'; $lang->task->error->finishedDateEmpty = '"Finished Date" should not be empty.'; $lang->task->error->finishedDateSmall = '"Finished Date" should be > "Real Started"'; -$lang->task->error->alreadyConsumed = 'The currently selected parent task has been consumed.'; $lang->task->error->date = 'The date should be <= today.'; /* Report. */ diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 1d3b4dfc35..31408527f8 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -289,7 +289,6 @@ $lang->task->error->alreadyStarted = '此任务已被启动,不能重复启 $lang->task->error->realStartedEmpty = '实际开始不能为空'; $lang->task->error->finishedDateEmpty = '实际完成不能为空'; $lang->task->error->finishedDateSmall = '实际完成不能小于实际开始'; -$lang->task->error->alreadyConsumed = '当前选中的父任务已有消耗。'; $lang->task->error->date = '日期不能大于今天'; $lang->task->error->leftEmptyAB = '任务状态为%s时,预计剩余不能为0'; $lang->task->error->leftEmpty = 'Task#%s任务状态为%s时,剩余不能为0'; diff --git a/module/task/model.php b/module/task/model.php index 4bda9d4ca4..35a028e2b8 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -718,17 +718,6 @@ class taskModel extends model $oldTask = $this->getByID($taskID); - /* When the selected parent task is a common task and has consumption, select other parent tasks. */ - if($task->parent > 0) - { - $taskConsumed = $this->dao->select('consumed')->from(TABLE_TASK)->where('id')->eq($task->parent)->andWhere('parent')->eq(0)->fetch('consumed'); - if($taskConsumed > 0) - { - dao::$errors[] = $this->lang->task->error->alreadyConsumed; - return false; - } - } - if($task->consumed < $oldTask->consumed) { dao::$errors[] = $this->lang->task->error->consumedSmall; @@ -1944,6 +1933,7 @@ class taskModel extends model ->where('deleted')->eq(0) ->andWhere('parent')->le(0) ->andWhere('status')->notin('cancel,closed') + ->andWhere('consumed')->eq('0') ->andWhere('execution')->eq($executionID) ->beginIF($append)->orWhere('id')->in($append)->fi() ->fetchPairs();