From: Vladimir Fomichev Date: Wed, 8 Oct 2025 07:33:00 +0000 (+0300) Subject: Добавление guid операций X-Git-Url: https://gitweb.erp-flowers.ru/?a=commitdiff_plain;h=432806eb368eef06e1d5dc22916c32d3148fe1f7;p=erp24_rep%2Fyii-erp24%2F.git Добавление guid операций --- diff --git a/erp24/views/write_offs_erp/_form.php b/erp24/views/write_offs_erp/_form.php index 2199bc76..5bd872a9 100644 --- a/erp24/views/write_offs_erp/_form.php +++ b/erp24/views/write_offs_erp/_form.php @@ -5,6 +5,7 @@ use kartik\file\FileInput; use unclead\multipleinput\components\BaseColumn; use unclead\multipleinput\MultipleInput; use unclead\multipleinput\MultipleInputColumn; +use yii\helpers\ArrayHelper; use yii\helpers\Html; use yii\helpers\Url; use yii\web\JsExpression; @@ -14,6 +15,7 @@ use yii\widgets\ActiveForm; use dosamigos\datetimepicker\DateTimePicker; use wbraganca\dynamicform\DynamicFormWidget; use yii_app\helpers\PrintBlockHelper; +use yii_app\records\AnalystsBusinessOperations; use yii_app\records\Files; use yii_app\records\WriteOffsErp; use yii_app\records\WriteOffsProductsErp; @@ -47,7 +49,24 @@ $this->registerJsFile('/js/heic_to_jpg_replace.js', ['position' => \yii\web\View ], 'position' => \yii\web\View::POS_END, ]);*/ - +$analytics = AnalystsBusinessOperations::find() + ->where(['type_id' => 2]) + ->andWhere(['active' => 1]) + ->andWhere(['show' => 1]) + ->indexBy('name') + ->asArray() + ->all(); +$analyticsOps = ArrayHelper::map($analytics, 'name', 'name'); + +$processedAnalytics = []; + +foreach ($analyticsOps as $key => $value) { + if (strpos($value, '_') !== false) { + $parts = explode('_', $value, 2); + $value = $parts[1]; + } + $processedAnalytics[$value] = $value; +} ?>