]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
переименование date_shift TimetableFactModel.php в date
authormarina <m.zozirova@gmail.com>
Thu, 19 Sep 2024 06:52:53 +0000 (09:52 +0300)
committermarina <m.zozirova@gmail.com>
Thu, 19 Sep 2024 06:52:53 +0000 (09:52 +0300)
erp24/records/TimetableFactModel.php

index 33af9f50dea488373859f3a53eab7bab19718d7c..f81580682c449afa6d709ce7d0a1c8aa82faf628 100644 (file)
@@ -246,11 +246,12 @@ class TimetableFactModel extends ActiveRecord
 
     public function getCheckInCount()
     {
-        return $this->hasMany(AdminCheckin::class, ['admin_id' => 'admin_id'])
-            ->andWhere(['BETWEEN', 'time',
-                date('Y-m-d H:i:s', strtotime($this->date_start . ' ' . $this->time_start)),
-                date('Y-m-d H:i:s', strtotime($this->date_end . ' ' . $this->time_end))])
-            ->count();
+        return $this->is_close ? 0 : 1;
+//        return $this->hasMany(AdminCheckin::class, ['admin_id' => 'admin_id'])
+//            ->andWhere(['BETWEEN', 'time',
+//                date('Y-m-d H:i:s', strtotime($this->date_start . ' ' . $this->time_start)),
+//                date('Y-m-d H:i:s', strtotime($this->date_end . ' ' . $this->time_end))])
+//            ->count();
     }
 
     public function getAdmin()