From 50c19785eabb5d0eff9a8c539cf2d6d654b5e207 Mon Sep 17 00:00:00 2001 From: marina Date: Tue, 27 May 2025 11:37:59 +0300 Subject: [PATCH] ERP-417 --- erp24/views/write_offs_erp/_form.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/erp24/views/write_offs_erp/_form.php b/erp24/views/write_offs_erp/_form.php index 1c919883..36c65ad0 100644 --- a/erp24/views/write_offs_erp/_form.php +++ b/erp24/views/write_offs_erp/_form.php @@ -258,19 +258,19 @@ JS 'name' => 'videoFiles', 'title' => 'Видео: mp4, mov, avi', 'type' => FileInput::className(), - 'options' => function ($data) use ($model) { + 'options' => function ($data) { $videoUrl = null; - if (!empty($model['id'])) { + if (!empty($data['id'])) { $videoUrl = Files::find() ->select('url') ->where([ 'entity' => WriteOffsProductsErp::WRITE_OFFS_VIDEO, - 'entity_id' => $model['id'] + 'entity_id' => $data['id'] ]) ->scalar(); } -var_dump($model['id']);die(); +var_dump($data['id'], $videoUrl);die(); return [ 'options' => [ 'multiple' => false, -- 2.39.5