Merge branch 'lyk_27556' into 'master'

* Fix bug #27556.

See merge request easycorp/zentaopms!5615
This commit is contained in:
孙广明
2022-09-29 06:43:24 +00:00
+4 -1
View File
@@ -2902,8 +2902,11 @@ class taskModel extends model
public function updateEstimate($estimateID)
{
$oldEstimate = $this->getEstimateById($estimateID);
$estimate = fixer::input('post')->cleanINT('consumed,left')->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;