From: marina Date: Tue, 15 Oct 2024 07:49:47 +0000 (+0300) Subject: ERP-224 Доработать Факт в таблице мотивации X-Git-Tag: 1.6~33^2 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=e5e06e6842e0291a443bde98f876ff8abaf048d5;p=erp24_rep%2Fyii-erp24%2F.git ERP-224 Доработать Факт в таблице мотивации --- diff --git a/erp24/services/MotivationService.php b/erp24/services/MotivationService.php index 3ab5b416..0f98f9fe 100644 --- a/erp24/services/MotivationService.php +++ b/erp24/services/MotivationService.php @@ -217,6 +217,7 @@ class MotivationService 'forecast' => null, 'fact' => null, 'deviation' => null, + 'is_combined' => $costsItem->is_combined ]; } @@ -234,8 +235,12 @@ class MotivationService } $result[$costsItem->order][$groupAlias] = $actualValue; - } + if ($result[$costsItem->order]['is_combined'] == true + && (empty($result[$costsItem->order]['fact']) || $result[$costsItem->order]['fact'] == 0)) { + $result[$costsItem->order]['fact'] = $result[$costsItem->order]['plan']; + } + } // Подстановка значений расходных материалов //190 - порядок для расходных материалов