From: marina Date: Mon, 26 May 2025 07:38:43 +0000 (+0300) Subject: ERP-417 X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=b205a3127cc9df1ec3c2c8f2289083ecde2f8a9a;p=erp24_rep%2Fyii-erp24%2F.git ERP-417 --- diff --git a/erp24/views/write_offs_erp/_form.php b/erp24/views/write_offs_erp/_form.php index ccc521ed..049b24bf 100644 --- a/erp24/views/write_offs_erp/_form.php +++ b/erp24/views/write_offs_erp/_form.php @@ -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' => [