]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Дебаг 005
authorAlexander Smirnov <fredeom@mail.ru>
Thu, 20 Jun 2024 12:34:16 +0000 (15:34 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Thu, 20 Jun 2024 12:34:16 +0000 (15:34 +0300)
erp24/actions/timetable/JoinMissingShiftsWithCheckinsAction.php

index 2712796ec300a248b4db6285bf5ddef92584b4f0..0b8c9ad36fad5ffcafa3939a865a0747fcc77835 100644 (file)
@@ -10,7 +10,7 @@ class JoinMissingShiftsWithCheckinsAction extends Action
 {
     public function run($days = 30) {
         $checkins = AdminCheckin::find()->where(['>=', 'date', date('Y-m-d', strtotime('-' . $days . ' day', time()))])
-            ->andWhere(['plan_id' => null, 'store_id' => 1, 'admin_id' => 393])->all();
+            ->andWhere(['plan_id' => null, 'store_id' => 4/*, 'admin_id' => 393*/])->all();
         foreach ($checkins as $checkin) {
             /** @var $checkin AdminCheckin */
             $planSlots = TimetablePlan::find()
@@ -33,7 +33,7 @@ class JoinMissingShiftsWithCheckinsAction extends Action
                 ->one();
             /** @var $planSlots TimetablePlan */
             if ($planSlots) {
-//                var_dump([$checkin->id, $planSlots->id]);
+                var_dump([$checkin->store_id, $checkin->admin_id, $planSlots->id]);
                 $checkin->plan_id = $planSlots->id;
                 $checkin->save();
                 if ($checkin->getErrors()) {