This commit is contained in:
liuyongkai
2022-09-29 06:39:47 +00:00
parent 2b815f88c1
commit 11448f3cee
+4 -1
View File
@@ -2896,8 +2896,11 @@ class taskModel extends model
public function updateEstimate($estimateID)
{
$oldEstimate = $this->getEstimateById($estimateID);
$estimate = fixer::input('post')->get();
$today = helper::today();
$estimate = fixer::input('post')
->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed)
->setIF(is_numeric($this->post->left), 'left', (float)$this->post->left)
->get();
if(helper::isZeroDate($estimate->date)) return dao::$errors[] = $this->lang->task->error->dateEmpty;
if($estimate->date > $today) return dao::$errors[] = $this->lang->task->error->date;