From: Alexander Smirnov Date: Mon, 2 Sep 2024 13:37:50 +0000 (+0300) Subject: [ERP-140] syntax error починка X-Git-Tag: 1.4~5^2~15 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=d8c6c48a92c7c8f34359e70a948a2f76c399d234;p=erp24_rep%2Fyii-erp24%2F.git [ERP-140] syntax error починка --- 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); } }