From: marina Date: Thu, 19 Sep 2024 06:52:53 +0000 (+0300) Subject: переименование date_shift TimetableFactModel.php в date X-Git-Tag: 1.5~15^2~4 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=3a34fae68db622d705c9bc3776ccff24d099f2ae;p=erp24_rep%2Fyii-erp24%2F.git переименование date_shift TimetableFactModel.php в date --- diff --git a/erp24/records/TimetableFactModel.php b/erp24/records/TimetableFactModel.php index 33af9f50..f8158068 100644 --- a/erp24/records/TimetableFactModel.php +++ b/erp24/records/TimetableFactModel.php @@ -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()