]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
Ссылка и правки
authorVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 10 Sep 2025 10:37:11 +0000 (13:37 +0300)
committerVladimir Fomichev <vladimir.fomichev@erp-flowers.ru>
Wed, 10 Sep 2025 10:37:11 +0000 (13:37 +0300)
erp24/views/matrix-bouquet-actuality/index.php

index 935dc7a90d71eaa65ff7bb8b34b3c64429fe594f..a177dad46963796d5b9b81a1ae129da0210467cd 100644 (file)
@@ -207,15 +207,19 @@ foreach ($subgroups as $sg) {
                 'contentOptions' => ['style'=>'min-width:150px;'],
                 'value' => function ($row, $key, $index) {
                     $product = $row['product'];
-                    $name = Html::encode($product->name . ' (' . $product->id . ')');
-
-                    return '<div class="d-flex justify-content-between">' . $name . '</div>';
+                    $name = Html::encode($product->name . ' (' . $product->guid . ')');
+                    $anchor = Html::a($name, ['bouquet/view', 'id' => $product->id], ['target' => '_blank']);
+                    return '<div class="d-flex justify-content-between">' . $anchor . '</div>';
                 }
             ],
             [
                 'attribute' => 'price',
                 'label' => 'Цена',
-                'value' => function($row) { return $row['price']->price; },
+                'value' => function($row) {
+                        if ($row['price']) {
+                            return  $row['price']->price;
+                        }
+                 },
                 'format' => ['decimal', 2],
             ],
             [
@@ -330,7 +334,7 @@ $js = <<<JS
     });
   });
 
-  // Мьютекс для чекбоксов "Только активные/неактивные" (необязательно, но удобно)
+
   const onlyActive    = document.getElementById('onlyActiveCheckbox');
   const onlyInactive  = document.getElementById('onlyInactiveCheckbox');
   if (onlyActive && onlyInactive) {
@@ -340,7 +344,7 @@ $js = <<<JS
 
   group.addEventListener('change', filterSubgroups);
 
-  // Первый проход (на случай когда значения уже выбраны в GET)
+
   filterSubgroups();
 })();
 JS;