- = Html::submitButton(Yii::t( 'app', 'Прочитать' ), ['class' => 'btn btn-primary']) ?>
+ = Html::submitButton(Yii::t( 'app', 'Выполнить' ), ['class' => 'btn btn-primary']) ?>
title = $name;
+$this->title = 'Ошибка';
?>
= Html::encode($this->title) ?>
- = nl2br(Html::encode($message)) ?>
+ ";
+ echo "
";
+ echo Html::a('Вернуться', $action_name, ['class' => 'btn btn-info', 'name' => 'Return',]);
+ }
+ ?>
diff --git a/backend/views/rg-grup/index.php b/backend/views/rg-grup/index.php
index 9e4f6b1..3d396b7 100755
--- a/backend/views/rg-grup/index.php
+++ b/backend/views/rg-grup/index.php
@@ -4,7 +4,7 @@ use yii\helpers\Html;
use backend\models\Importers;
use yii\helpers\ArrayHelper;
-$button_label = 'Прочитать';
+$button_label = 'Выполнить';
?>
@@ -21,6 +21,8 @@ $button_label = 'Прочитать';
= $form->field($model, 'file')->fileInput()->label(false) ?>
= Html::submitButton(Yii::t( 'app', $button_label ), ['class' => 'btn btn-primary']) ?>
+ = Html::tag( 'p', 'допустимый формат xlsx') ?>
+
params['breadcrumbs'][] = $this->title;
- = Html::a('Вернуться', ['rg-grup/index'], ['class' => 'btn btn-primary', 'name' => 'Return',]) ?>
+ = Html::a('Отмена', ['rg-grup/index'], ['class' => 'btn btn-primary', 'name' => 'Return',]) ?>
\ No newline at end of file
diff --git a/common/components/exceptions/CrossParsingException.php b/common/components/exceptions/CrossParsingException.php
new file mode 100644
index 0000000..2d309f9
--- /dev/null
+++ b/common/components/exceptions/CrossParsingException.php
@@ -0,0 +1,16 @@
+ 'default'],
- ['group', 'required', 'on' => ['default','form_upload_validation']],
+ [['group','importer_id', 'margin_id', 'koef'], 'required', 'on' => 'default'],
+ [['margin_id'], 'required', 'on' => 'form_upload_validation', 'message' => 'Должен быть указан хотя бы один тип цен.'],
+ [['group'], 'required', 'on' => 'form_upload_validation', 'message' => 'Группа RG - обязательное поле.'],
[['importer_id', 'margin_id'], 'integer' , 'on' => 'default'],
[['koef'], 'number' , 'on' => 'default'],
[['timestamp'], 'safe' , 'on' => 'default'],
@@ -83,7 +84,6 @@ class MarginsGroups extends \yii\db\ActiveRecord
//@todo - вынести все ручные инсерты в отдельный класс
public static function ManualInsertWithUpdate($data, $keys)
{
- // \common\components\CustomVarDamp::dumpAndDie($data);
$table_name = self::tableName();
$keys_arr = array_keys($data[0]);
// найдем те поля которые не являются ключами. Их нужно будет при дубляже апдейтить
@@ -107,9 +107,9 @@ class MarginsGroups extends \yii\db\ActiveRecord
// добавим фрагмент с апдейтом при дубляже
$query = "{$query_insert} {$query_update}";
- // \common\components\CustomVarDamp::dumpAndDie($query);
Yii::$app->db->createCommand($query)->execute();
}
+ return true;
}
}
--
libgit2 0.21.4