* [misc] Optimize codes.

This commit is contained in:
daitingting
2025-06-04 03:22:19 +00:00
parent 18d2394019
commit 957d463d88
+3 -1
View File
@@ -976,12 +976,14 @@ class execution extends control
}
$burn = $this->execution->getBurnByExecution($executionID, $execution->begin, 0);
$left = empty($burn) ? 0 : $burn->left);
$withLeft = $this->post->withLeft ? $this->post->withLeft : 0;
if($withLeft) $left = $this->post->estimate;
$burnData = form::data($this->config->execution->form->fixfirst)
->add('task', 0)
->add('execution', $executionID)
->add('date', $execution->begin)
->add('left', $withLeft ? $this->post->estimate : (empty($burn) ? 0 : $burn->left))
->add('left', $left)
->add('consumed', empty($burn) ? 0 : $burn->consumed)
->get();