From b27b2c08faff32c022a112e2d24848e069b22bcc Mon Sep 17 00:00:00 2001 From: wangyidong Date: Fri, 26 Aug 2022 09:14:49 +0800 Subject: [PATCH] * adjust for change estimate. --- module/task/model.php | 4 +++- module/task/view/recordestimate.html.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/task/model.php b/module/task/model.php index 14ce0d6977..d63fc74b41 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -2714,14 +2714,16 @@ class taskModel extends model * * @param int $taskID * @param string $account + * @param string $append * @access public * @return array */ - public function getTaskEstimate($taskID, $account = '') + public function getTaskEstimate($taskID, $account = '', $append = '') { return $this->dao->select('*')->from(TABLE_TASKESTIMATE) ->where('task')->eq($taskID) ->beginIF($account)->andWhere('account')->eq($account)->fi() + ->beginIF($append)->orWhere('append')->eq($append)->fi() ->orderBy('date,id') ->fetchAll(); } diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index 6b8130815e..dfdb0c91e1 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -61,7 +61,7 @@ task->canOperateEffort($task, $estimate); common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'pencil', '', 'showinonlybody', true, $canOperateEffort ? '' : 'disabled'); - common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'close', 'hiddenwin', 'showinonlybody', false, ($canOperateEffort and $estimate->left > 0) ? '' : 'disabled'); + common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'close', 'hiddenwin', 'showinonlybody', false, ($canOperateEffort and ($task->mode == 'multi' or ($task->mode == 'linear' and $estimate->left > 0))) ? '' : 'disabled'); ?>