]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
померял correction на ajustment origin/feature_fomichev_erp_164_chage_numbers_format_motivation
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Mon, 2 Sep 2024 08:29:50 +0000 (11:29 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Mon, 2 Sep 2024 08:29:50 +0000 (11:29 +0300)
1  2 
erp24/views/motivation/index.php

index 0e27d1e56a86f04e1631fc06ed46f2abcaeb50fa,82dbbf5545c295bf95c9cf56e1b6086665b32e42..eb3219a320ad75977cf51668ad54efe9c297fb6a
@@@ -5,8 -5,10 +5,11 @@@ use kartik\select2\Select2
  use yii\widgets\ActiveForm;
  use yii\base\DynamicModel;
  use kartik\grid\GridView;
 +use yii_app\helpers\FormatHelper;
+ use yii_app\records\Admin;
+ use yii_app\records\Motivation;
  use yii_app\records\MotivationCostsItem;
  /** @var $model DynamicModel */
  /** @var $stores array */
  /** @var $years array */
@@@ -139,13 -144,10 +150,16 @@@ $this->registerJsFile('/js/motivation/i
                              'header' => 'План',
                          ],
                          [
-                             'attribute' => 'correction',
+                             'attribute' => 'adjustment',
                              'value' => function ($model) {
 -                                return $model['adjustment'] ?? '';
 +
-                                 return $model["correction"] !== null ? FormatHelper::asDecimalMotivation($model["correction"]) : " ";
 +
-                             },
++                                return $model["adjustment"] !== null ? FormatHelper::asDecimalMotivation($model["correction"]) : " ";
 +
++
++
++
+                             },
                              'header' => 'Корректировка',
                          ],
                          [
  
                              'header' => 'Отклонение, %',
                              'value' => function ($model) {
 -                                if ($model["deviation"] !== null) {
 -                                    return Yii::$app->formatter->asDecimal($model["deviation"] * 100, 2) . "%";
 -                                } else {
 -                                    return " ";
 -                                }
++
 +                                return $model["deviation"] !== null ? FormatHelper::asDecimalMotivation($model["deviation"]) : " ";
 +
++
++                              
                              },
  
                          ]
                              default:
                                  // Проверка для остальных строк, которые должны иметь жирный шрифт
                                  $boldRows = [
-                                     'Стоимость товара', 'Услуги агентов (Расходы на закупку, хранение, доставку товара)',
+                                     'Себестоимость товара', 'Услуги агентов (Расходы на закупку, хранение, доставку товара)',
                                      'Брак, пересорт', 'Расходные материалы (обеспечение продаж)', 'Оплата труда', 'Содержание помещения',
 -                                    'РаÑ\81Ñ\85одÑ\8b Ð¿Ð¾ Ð´Ð¾Ñ\81Ñ\82авке', 'УÑ\81лÑ\83ги Ð¼Ð°Ñ\80кеÑ\82плейÑ\81ов', 'СодеÑ\80жание Ð¸ Ð¾Ð±Ñ\81лÑ\83живание Ð\9eС Ð¸ Ð\9dÐ\9cÐ\90',
 +                                    'Расходы по доставке', 'Содержание и обслуживание ОС и НМА',
                                      'Услуги связи', 'Прочие операционные расходы', 'Бухгалтерия и финансы',
                                      'Юридическое сопровождение', 'HR- услуги', 'IT услуги',
                                      'Продвижение и продажа товара через сайт', 'Минимальный порог Чистой прибыли, руб.',