]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
[ERP-137] Дебаг 7
authorAlexander Smirnov <fredeom@mail.ru>
Mon, 12 Aug 2024 10:26:59 +0000 (13:26 +0300)
committerAlexander Smirnov <fredeom@mail.ru>
Mon, 12 Aug 2024 10:26:59 +0000 (13:26 +0300)
erp24/services/MotivationService.php

index 6c90600104bbf4952cdfe26528d00513100a0d9b..d46c6b14849a57ad2e7e9b4c78efa0ded2675c7f 100644 (file)
@@ -542,17 +542,23 @@ class MotivationService
                     'motivation_group_id' => $motivationValueGroupForecast->id, 'value_id' => $code])->one();
                 $sum = 0;
                 $sum_type = MotivationCostsItem::DATA_TYPE_INT;
+                $z = 0;
                 foreach (range(1, 5) as $ind) {
                     $mv = MotivationValue::find()->where(['motivation_id' => $motivation->id,
                         'motivation_group_id' => $motivationValueGroups[$ind-1]->id, 'value_id' => $code])->one();
                     /** @var $mv MotivationValue */
                     if ($mv) {
+                        $z += $mv->value_float;
                         switch ($mv->value_type) {
                             case MotivationCostsItem::DATA_TYPE_INT: { $sum += $mv->value_int; break; }
                             default: { $sum += $mv->value_float; $sum_type = MotivationCostsItem::DATA_TYPE_FLOAT; break; }
                         };
                     }
                 }
+                if ($code == 6) {
+                    var_dump($z);
+                    die;
+                }
                 if (!$motivationValue) {
                     $motivationValue = new MotivationValue;
                     $motivationValue->motivation_id = $motivation->id;