From: Alexander Smirnov Date: Mon, 12 Aug 2024 10:28:51 +0000 (+0300) Subject: [ERP-137] Дебаг 8 X-Git-Tag: 1.4~36^2~6 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=505652f6c52ac5a9d3bca10f3416d1109a46d174;p=erp24_rep%2Fyii-erp24%2F.git [ERP-137] Дебаг 8 --- diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index d46c6b14..6c906001 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -542,23 +542,17 @@ 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;