From d8c6c48a92c7c8f34359e70a948a2f76c399d234 Mon Sep 17 00:00:00 2001 From: Alexander Smirnov Date: Mon, 2 Sep 2024 16:37:50 +0300 Subject: [PATCH] =?utf8?q?[ERP-140]=20syntax=20error=20=D0=BF=D0=BE=D1=87?= =?utf8?q?=D0=B8=D0=BD=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- erp24/services/MotivationService.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index c31df16e..06e3263f 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -1506,9 +1506,15 @@ class MotivationService self::CODE_RECRUITMENT_SERVICES, // 30 ]; + $motivationValueGroup = MotivationValueGroup::find()->where(['alias' => 'month'])->one(); + + if (!$motivationValueGroup) { + throw new \Exception("Не найдена колонка month"); + } + foreach ($motivations as $motivation) { foreach ($valueIdIndices as $index) { - $value = self::getMotivationValue($motivation->id, "month", $index) + $value = self::getMotivationValue($motivation->id, $motivationValueGroup->id, $index); self::saveOrUpdateMotivationValue($motivation->id, "fact", $index, "float", $value); } } -- 2.39.5