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;
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;
],
'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;
+}
?>
<style>
<?= $form->field($model, 'store_id')->dropDownList($listCityStoreNames) ?>
- <?= $form->field($model, 'write_offs_type')->dropDownList([
- WriteOffsErp::WRITE_OFFS_TYPE_BRAK => WriteOffsErp::WRITE_OFFS_TYPE_BRAK,
- WriteOffsErp::WRITE_OFFS_TYPE_RETURN_KALUGA => WriteOffsErp::WRITE_OFFS_TYPE_RETURN_KALUGA,
- ]) ?>
+ <?= $form->field($model, 'write_offs_type')->dropDownList($processedAnalytics) ?>
<?= $form->field($model, 'comment')->textInput() ?>