]> gitweb.erp-flowers.ru Git - erp24_rep/yii-erp24/.git/commitdiff
ERP-417
authormarina <m.zozirova@gmail.com>
Mon, 26 May 2025 07:38:43 +0000 (10:38 +0300)
committermarina <m.zozirova@gmail.com>
Mon, 26 May 2025 07:38:43 +0000 (10:38 +0300)
erp24/views/write_offs_erp/_form.php

index ccc521eda6eeb101d01be3019c91e6331d4a6295..049b24bf5d646eb74a18223e0275b3ee4fdf7005 100644 (file)
@@ -288,10 +288,14 @@ JS
                     'title' => 'Видео: mp4, mov, avi',
                     'type' => FileInput::className(),
                     'value' => function ($data) {
+                        if ($data === null || !isset($data['id'])) {
+                            return null;
+                        }
+
                         $file = Files::findOne([
-                                'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
-                                'entity_id' => $data['id']
-        ]);
+                            'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO,
+                            'entity_id' => $data['id']
+                        ]);
                         return $file ? basename($file->url) : null;
                     },
                     'options' => [