]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-140] syntax error починка
authorAlexander Smirnov <fredeom@mail.ru>
Mon, 2 Sep 2024 13:37:50 +0000 (16:37 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Mon, 2 Sep 2024 13:37:50 +0000 (16:37 +0300)
erp24/services/MotivationService.php

index c31df16e3e945fd516dd412d0d64c98e1eb3c0f0..06e3263fa663d69592c7b088995f07bf576dbad7 100644 (file)
@@ -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);
             }
         }