* [bug#68197,done,0.2h] fix bug.

This commit is contained in:
sunguangming
2025-12-19 01:32:29 +00:00
parent 271c781585
commit 5d23c70cc8
+2 -1
View File
@@ -785,7 +785,8 @@ class programplanTao extends programplanModel
$taskPri = "<span class='pri-%s align-middle' title='%s'>%s</span> ";
$pri = zget($this->lang->task->priList, $task->pri);
$priIcon = sprintf($taskPri, $task->pri, $pri, $pri);
$progress = $task->consumed ? round($task->consumed / ($task->left + $task->consumed), 3) : 0;
$total = $task->left + $task->consumed;
$progress = $total > 0 ? round($task->consumed / $total, 3) : 0;
$data = new stdclass();
$data->id = $task->id;