db->createCommand()->batchInsert($table_name, $keys_arr, $data)->sql;
+//$query = "{$query_insert} on duplicate key update `PRICE` = values (`PRICE`),`DESCR` = values(`DESCR`),`BOX` = values(`BOX`)";
+//$res = Yii::$app->db->createCommand($query)->execute();
+
+
+
+// Yii::$app->db->createCommand()->batchInsert($table_name, $keys_arr, $data)->sql execute();
\ No newline at end of file
diff --git a/backend/models/Importer.php b/backend/models/Importer.php
new file mode 100644
index 0000000..8c06694
--- /dev/null
+++ b/backend/models/Importer.php
@@ -0,0 +1,96 @@
+ 254],
+ [['PARSER_FIELD_SIGN'], 'string', 'max' => 1],
+ // [['price_date_update'], 'string', 'max' => 15],
+ [['code'], 'unique'],
+ [['name'], 'unique']
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => Yii::t('app', 'ID'),
+ 'code' => Yii::t('app', 'Code'),
+ 'name' => Yii::t('app', 'Name'),
+ 'name_price' => Yii::t('app', 'Name Price'),
+ 'currency_id' => Yii::t('app', 'Currency ID'),
+ 'delivery' => Yii::t('app', 'Delivery'),
+ 'email' => Yii::t('app', 'Email'),
+ 'info' => Yii::t('app', 'Info'),
+ 'active' => Yii::t('app', 'Active'),
+ 'PARSER_IS_ACTIVE' => Yii::t('app', 'Parser Is Active'),
+ 'PARSER_COLUMN_COUNT' => Yii::t('app', 'Parser Column Count'),
+ 'PARSER_FIELD_BRAND' => Yii::t('app', 'Parser Field Brand'),
+ 'PARSER_FIELD_ARTICLE' => Yii::t('app', 'Parser Field Article'),
+ 'PARSER_FIELD_ARTICLE_PREFIX' => Yii::t('app', 'Parser Field Article Prefix'),
+ 'PARSER_FIELD_PRICE' => Yii::t('app', 'Parser Field Price'),
+ 'PARSER_FIELD_DESCR' => Yii::t('app', 'Parser Field Descr'),
+ 'PARSER_FIELD_BOX' => Yii::t('app', 'Parser Field Box'),
+ 'PARSER_FIELD_ADD_BOX' => Yii::t('app', 'Parser Field Add Box'),
+ 'PARSER_FIELD_GROUP_RG' => Yii::t('app', 'Parser Field Group Rg'),
+ 'PARSER_FIELD_SIGN' => Yii::t('app', 'Parser Field Sign'),
+ 'PARSER_FIELD_MULTIPLIER' => Yii::t('app', 'Parser Field Multiplier'),
+ 'price_date_update' => Yii::t('app', 'Price Date Update'),
+ ];
+ }
+
+
+
+}
diff --git a/backend/models/ImporterFiles.php b/backend/models/ImporterFiles.php
new file mode 100644
index 0000000..ab664ab
--- /dev/null
+++ b/backend/models/ImporterFiles.php
@@ -0,0 +1,57 @@
+hasOne(Importer::className(), ['id' => 'importer_id'])->one()->name;
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => Yii::t('app', 'ID'),
+ 'importer_id' => Yii::t('app', 'Importer ID'),
+ 'upload_time' => Yii::t('app', 'Upload Time'),
+ 'time_start' => Yii::t('app', 'Time Start'),
+ 'time_end' => Yii::t('app', 'Time End'),
+ ];
+ }
+}
diff --git a/backend/views/currency/_form.php b/backend/views/currency/_form.php
new file mode 100644
index 0000000..c134e54
--- /dev/null
+++ b/backend/views/currency/_form.php
@@ -0,0 +1,29 @@
+
+
+
diff --git a/backend/views/currency/_search.php b/backend/views/currency/_search.php
new file mode 100644
index 0000000..41ac8b3
--- /dev/null
+++ b/backend/views/currency/_search.php
@@ -0,0 +1,35 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'name') ?>
+
+ = $form->field($model, 'rate') ?>
+
+ = $form->field($model, 'is_default') ?>
+
+ = $form->field($model, 'timestamp') ?>
+
+
+ = Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/currency/create.php b/backend/views/currency/create.php
new file mode 100644
index 0000000..1f35158
--- /dev/null
+++ b/backend/views/currency/create.php
@@ -0,0 +1,21 @@
+title = 'Create Currency';
+$this->params['breadcrumbs'][] = ['label' => 'Currencies', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/currency/index.php b/backend/views/currency/index.php
new file mode 100644
index 0000000..431315d
--- /dev/null
+++ b/backend/views/currency/index.php
@@ -0,0 +1,38 @@
+title = 'Currencies';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = Html::a('Create Currency', ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'name',
+ 'rate',
+ 'is_default',
+ 'timestamp',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/currency/update.php b/backend/views/currency/update.php
new file mode 100644
index 0000000..004ef97
--- /dev/null
+++ b/backend/views/currency/update.php
@@ -0,0 +1,21 @@
+title = 'Update Currency: ' . ' ' . $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Currencies', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/currency/view.php b/backend/views/currency/view.php
new file mode 100644
index 0000000..76191be
--- /dev/null
+++ b/backend/views/currency/view.php
@@ -0,0 +1,39 @@
+title = $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Currencies', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
+ = Html::a('Delete', ['delete', 'id' => $model->id], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => 'Are you sure you want to delete this item?',
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'name',
+ 'rate',
+ 'is_default',
+ 'timestamp',
+ ],
+ ]) ?>
+
+
diff --git a/backend/views/layouts/column.php b/backend/views/layouts/column.php
index 4ab7533..25cc31b 100644
--- a/backend/views/layouts/column.php
+++ b/backend/views/layouts/column.php
@@ -88,7 +88,7 @@ $this->beginContent('@app/views/layouts/main.php');
Reviewers
2 days
- Why not buy a new awesome theme?
+ Why not buy a new awesome theme?
@@ -297,13 +297,27 @@ $this->beginContent('@app/views/layouts/main.php');
],
],
['label' => 'Ценообразование', 'url' => ['#'], 'items' => [
- ['label' => 'Курс', 'url' => ['accounts/index']],
- ['label' => 'Типы цен', 'url' => ['importers/index']],
- ['label' => 'Коэфициенты на поставщиков', 'url' => ['user/index']],
- ['label' => 'Коэфициенты на импорт поставщиков', 'url' => ['user/index']],
- ['label' => 'Коэфициенты на группы RG', 'url' => ['user/index']],
+ ['label' => 'Курс', 'url' => ['currency/index']],
+ ['label' => 'Типы цен', 'url' => ['margins/index']],
+ ['label' => 'Коэфициенты на поставщиков', 'url' => ['margins-importers/index']],
+ ['label' => 'Коэфициенты на импорт поставщиков', 'url' => ['margins-importers-import/index']],
+ ['label' => 'Коэфициенты на группы RG', 'url' => ['margins-groups/index']],
],
],
+// Справочник
+//Замены брендов
+//Карточки товаров
+//Товары поставщиков
+//Кроссы
+//Бренды
+//Марки авто
+//Статусы заказов
+//Типы доставок
+//Категории товаров
+//Vin коды
+//Запросы по номеру
+//Офисы
+
],
'submenuTemplate' => "\n\n",
]);
diff --git a/backend/views/margins-groups/_form.php b/backend/views/margins-groups/_form.php
new file mode 100644
index 0000000..3ac8cfc
--- /dev/null
+++ b/backend/views/margins-groups/_form.php
@@ -0,0 +1,31 @@
+
+
+
diff --git a/backend/views/margins-groups/_search.php b/backend/views/margins-groups/_search.php
new file mode 100644
index 0000000..3915ae8
--- /dev/null
+++ b/backend/views/margins-groups/_search.php
@@ -0,0 +1,37 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'importer_id') ?>
+
+ = $form->field($model, 'margin_id') ?>
+
+ = $form->field($model, 'group') ?>
+
+ = $form->field($model, 'koef') ?>
+
+ field($model, 'timestamp') ?>
+
+
+ = Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/margins-groups/create.php b/backend/views/margins-groups/create.php
new file mode 100644
index 0000000..05112d5
--- /dev/null
+++ b/backend/views/margins-groups/create.php
@@ -0,0 +1,21 @@
+title = 'Create Margins Groups';
+$this->params['breadcrumbs'][] = ['label' => 'Margins Groups', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins-groups/index.php b/backend/views/margins-groups/index.php
new file mode 100644
index 0000000..f032914
--- /dev/null
+++ b/backend/views/margins-groups/index.php
@@ -0,0 +1,39 @@
+title = 'Margins Groups';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = Html::a('Create Margins Groups', ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'importer_id',
+ 'margin_id',
+ 'group',
+ 'koef',
+ // 'timestamp',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/margins-groups/update.php b/backend/views/margins-groups/update.php
new file mode 100644
index 0000000..da52b39
--- /dev/null
+++ b/backend/views/margins-groups/update.php
@@ -0,0 +1,21 @@
+title = 'Update Margins Groups: ' . ' ' . $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Margins Groups', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins-groups/view.php b/backend/views/margins-groups/view.php
new file mode 100644
index 0000000..7da1589
--- /dev/null
+++ b/backend/views/margins-groups/view.php
@@ -0,0 +1,40 @@
+title = $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Margins Groups', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
+ = Html::a('Delete', ['delete', 'id' => $model->id], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => 'Are you sure you want to delete this item?',
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'importer_id',
+ 'margin_id',
+ 'group',
+ 'koef',
+ 'timestamp',
+ ],
+ ]) ?>
+
+
diff --git a/backend/views/margins-importers-import/_form.php b/backend/views/margins-importers-import/_form.php
new file mode 100644
index 0000000..2205356
--- /dev/null
+++ b/backend/views/margins-importers-import/_form.php
@@ -0,0 +1,29 @@
+
+
+
diff --git a/backend/views/margins-importers-import/_search.php b/backend/views/margins-importers-import/_search.php
new file mode 100644
index 0000000..48544f6
--- /dev/null
+++ b/backend/views/margins-importers-import/_search.php
@@ -0,0 +1,35 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'importer_id') ?>
+
+ = $form->field($model, 'margin_id') ?>
+
+ = $form->field($model, 'koef') ?>
+
+ = $form->field($model, 'finish') ?>
+
+
+ = Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/margins-importers-import/create.php b/backend/views/margins-importers-import/create.php
new file mode 100644
index 0000000..e436a73
--- /dev/null
+++ b/backend/views/margins-importers-import/create.php
@@ -0,0 +1,21 @@
+title = 'Create Margins Importers Import';
+$this->params['breadcrumbs'][] = ['label' => 'Margins Importers Imports', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins-importers-import/index.php b/backend/views/margins-importers-import/index.php
new file mode 100644
index 0000000..dca455a
--- /dev/null
+++ b/backend/views/margins-importers-import/index.php
@@ -0,0 +1,38 @@
+title = 'Margins Importers Imports';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = Html::a('Create Margins Importers Import', ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'importer_id',
+ 'margin_id',
+ 'koef',
+ 'finish',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/margins-importers-import/update.php b/backend/views/margins-importers-import/update.php
new file mode 100644
index 0000000..bc85715
--- /dev/null
+++ b/backend/views/margins-importers-import/update.php
@@ -0,0 +1,21 @@
+title = 'Update Margins Importers Import: ' . ' ' . $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Margins Importers Imports', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins-importers-import/view.php b/backend/views/margins-importers-import/view.php
new file mode 100644
index 0000000..6cf4f9b
--- /dev/null
+++ b/backend/views/margins-importers-import/view.php
@@ -0,0 +1,39 @@
+title = $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Margins Importers Imports', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
+ = Html::a('Delete', ['delete', 'id' => $model->id], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => 'Are you sure you want to delete this item?',
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'importer_id',
+ 'margin_id',
+ 'koef',
+ 'finish',
+ ],
+ ]) ?>
+
+
diff --git a/backend/views/margins-importers/_form.php b/backend/views/margins-importers/_form.php
new file mode 100644
index 0000000..019b3bf
--- /dev/null
+++ b/backend/views/margins-importers/_form.php
@@ -0,0 +1,27 @@
+
+
+
diff --git a/backend/views/margins-importers/_search.php b/backend/views/margins-importers/_search.php
new file mode 100644
index 0000000..afdcdfd
--- /dev/null
+++ b/backend/views/margins-importers/_search.php
@@ -0,0 +1,33 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'importer_id') ?>
+
+ = $form->field($model, 'margin_id') ?>
+
+ = $form->field($model, 'koef') ?>
+
+
+ = Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/margins-importers/create.php b/backend/views/margins-importers/create.php
new file mode 100644
index 0000000..9c75832
--- /dev/null
+++ b/backend/views/margins-importers/create.php
@@ -0,0 +1,21 @@
+title = 'Create Margins Importers';
+$this->params['breadcrumbs'][] = ['label' => 'Margins Importers', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins-importers/index.php b/backend/views/margins-importers/index.php
new file mode 100644
index 0000000..8545d5b
--- /dev/null
+++ b/backend/views/margins-importers/index.php
@@ -0,0 +1,37 @@
+title = 'Margins Importers';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = Html::a('Create Margins Importers', ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'importer_id',
+ 'margin_id',
+ 'koef',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/margins-importers/update.php b/backend/views/margins-importers/update.php
new file mode 100644
index 0000000..ed64d20
--- /dev/null
+++ b/backend/views/margins-importers/update.php
@@ -0,0 +1,21 @@
+title = 'Update Margins Importers: ' . ' ' . $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Margins Importers', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->id, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins-importers/view.php b/backend/views/margins-importers/view.php
new file mode 100644
index 0000000..d53a4d3
--- /dev/null
+++ b/backend/views/margins-importers/view.php
@@ -0,0 +1,38 @@
+title = $model->id;
+$this->params['breadcrumbs'][] = ['label' => 'Margins Importers', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
+ = Html::a('Delete', ['delete', 'id' => $model->id], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => 'Are you sure you want to delete this item?',
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'importer_id',
+ 'margin_id',
+ 'koef',
+ ],
+ ]) ?>
+
+
diff --git a/backend/views/margins/_form.php b/backend/views/margins/_form.php
new file mode 100644
index 0000000..790617c
--- /dev/null
+++ b/backend/views/margins/_form.php
@@ -0,0 +1,25 @@
+
+
+
diff --git a/backend/views/margins/_search.php b/backend/views/margins/_search.php
new file mode 100644
index 0000000..a8010fc
--- /dev/null
+++ b/backend/views/margins/_search.php
@@ -0,0 +1,31 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'name') ?>
+
+ = $form->field($model, 'koef') ?>
+
+
+ = Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/margins/create.php b/backend/views/margins/create.php
new file mode 100644
index 0000000..17286cd
--- /dev/null
+++ b/backend/views/margins/create.php
@@ -0,0 +1,21 @@
+title = 'Create Margins';
+$this->params['breadcrumbs'][] = ['label' => 'Margins', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins/index.php b/backend/views/margins/index.php
new file mode 100644
index 0000000..4119b5e
--- /dev/null
+++ b/backend/views/margins/index.php
@@ -0,0 +1,36 @@
+title = 'Margins';
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = Html::a('Create Margins', ['create'], ['class' => 'btn btn-success']) ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'name',
+ 'koef',
+
+ ['class' => 'yii\grid\ActionColumn'],
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/margins/update.php b/backend/views/margins/update.php
new file mode 100644
index 0000000..9f15648
--- /dev/null
+++ b/backend/views/margins/update.php
@@ -0,0 +1,21 @@
+title = 'Update Margins: ' . ' ' . $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Margins', 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id]];
+$this->params['breadcrumbs'][] = 'Update';
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/margins/view.php b/backend/views/margins/view.php
new file mode 100644
index 0000000..eb8b3cc
--- /dev/null
+++ b/backend/views/margins/view.php
@@ -0,0 +1,37 @@
+title = $model->name;
+$this->params['breadcrumbs'][] = ['label' => 'Margins', 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a('Update', ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
+ = Html::a('Delete', ['delete', 'id' => $model->id], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => 'Are you sure you want to delete this item?',
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'name',
+ 'koef',
+ ],
+ ]) ?>
+
+
diff --git a/common/models/Currency.php b/common/models/Currency.php
new file mode 100644
index 0000000..5352e89
--- /dev/null
+++ b/common/models/Currency.php
@@ -0,0 +1,55 @@
+ 50],
+ [['name'], 'unique'],
+ [['is_default'], 'unique']
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'ID',
+ 'name' => 'Name',
+ 'rate' => 'Rate',
+ 'is_default' => 'Is Default',
+ 'timestamp' => 'Timestamp',
+ ];
+ }
+}
diff --git a/common/models/CurrencySearch.php b/common/models/CurrencySearch.php
new file mode 100644
index 0000000..45347a5
--- /dev/null
+++ b/common/models/CurrencySearch.php
@@ -0,0 +1,70 @@
+ $query,
+ ]);
+
+ $this->load($params);
+
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ $query->andFilterWhere([
+ 'id' => $this->id,
+ 'rate' => $this->rate,
+ 'is_default' => $this->is_default,
+ 'timestamp' => $this->timestamp,
+ ]);
+
+ $query->andFilterWhere(['like', 'name', $this->name]);
+
+ return $dataProvider;
+ }
+}
diff --git a/common/models/Margins.php b/common/models/Margins.php
new file mode 100644
index 0000000..9b64694
--- /dev/null
+++ b/common/models/Margins.php
@@ -0,0 +1,48 @@
+ 100],
+ [['name'], 'unique']
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'ID',
+ 'name' => 'Name',
+ 'koef' => 'Koef',
+ ];
+ }
+}
diff --git a/common/models/MarginsGroups.php b/common/models/MarginsGroups.php
new file mode 100644
index 0000000..f6bcc9d
--- /dev/null
+++ b/common/models/MarginsGroups.php
@@ -0,0 +1,56 @@
+ 200],
+ [['importer_id', 'margin_id', 'group'], 'unique', 'targetAttribute' => ['importer_id', 'margin_id', 'group'], 'message' => 'The combination of Importer ID, Margin ID and Group has already been taken.']
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => 'ID',
+ 'importer_id' => 'Importer ID',
+ 'margin_id' => 'Margin ID',
+ 'group' => 'Group',
+ 'koef' => 'Koef',
+ 'timestamp' => 'Timestamp',
+ ];
+ }
+}
diff --git a/common/models/MarginsGroupsSearch.php b/common/models/MarginsGroupsSearch.php
new file mode 100644
index 0000000..f8b521d
--- /dev/null
+++ b/common/models/MarginsGroupsSearch.php
@@ -0,0 +1,71 @@
+ $query,
+ ]);
+
+ $this->load($params);
+
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ $query->andFilterWhere([
+ 'id' => $this->id,
+ 'importer_id' => $this->importer_id,
+ 'margin_id' => $this->margin_id,
+ 'koef' => $this->koef,
+ 'timestamp' => $this->timestamp,
+ ]);
+
+ $query->andFilterWhere(['like', 'group', $this->group]);
+
+ return $dataProvider;
+ }
+}
diff --git a/common/models/MarginsSearch.php b/common/models/MarginsSearch.php
new file mode 100644
index 0000000..6b272a7
--- /dev/null
+++ b/common/models/MarginsSearch.php
@@ -0,0 +1,68 @@
+ $query,
+ ]);
+
+ $this->load($params);
+
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ $query->andFilterWhere([
+ 'id' => $this->id,
+ 'koef' => $this->koef,
+ ]);
+
+ $query->andFilterWhere(['like', 'name', $this->name]);
+
+ return $dataProvider;
+ }
+}
diff --git a/composer.json b/composer.json
index 35aa241..051ae8b 100644
--- a/composer.json
+++ b/composer.json
@@ -18,7 +18,8 @@
"yiisoft/yii2": ">=2.0.6",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
- "yiisoft/yii2-imagine": "*"
+ "yiisoft/yii2-imagine": "*",
+ "2amigos/yii2-date-picker-widget": "~1.0"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
diff --git a/composer.lock b/composer.lock
index 108b305..13829cc 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,9 +4,70 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "54588d810c5a77b1e177db18875540d1",
+ "hash": "b50ff742692adc607b39491ed7ed3dd6",
"packages": [
{
+ "name": "2amigos/yii2-date-picker-widget",
+ "version": "1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/2amigos/yii2-date-picker-widget.git",
+ "reference": "89cd0d7f00785b608b4a9670016f2795f2e3984d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/2amigos/yii2-date-picker-widget/zipball/89cd0d7f00785b608b4a9670016f2795f2e3984d",
+ "reference": "89cd0d7f00785b608b4a9670016f2795f2e3984d",
+ "shasum": ""
+ },
+ "require": {
+ "bower-asset/bootstrap-datepicker": "1.4.0",
+ "yiisoft/yii2": "~2.0.0",
+ "yiisoft/yii2-bootstrap": "~2.0.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "4.*"
+ },
+ "type": "yii2-extension",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0-dev"
+ },
+ "asset-installer-paths": {
+ "bower-asset-library": "vendor/bower"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "dosamigos\\datepicker\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "2amigOS! Consulting Group",
+ "email": "hola@2amigos.us",
+ "homepage": "http://2amigos.us",
+ "role": "Developer"
+ }
+ ],
+ "description": "Bootstrap DatePicker widget for Yii2.",
+ "homepage": "http://yiiwheels.com/extension/bootstrap-datepicker",
+ "keywords": [
+ "2amigos",
+ "datepicker",
+ "extension",
+ "widget",
+ "yii",
+ "yii 2",
+ "yii2"
+ ],
+ "time": "2015-04-02 11:48:05"
+ },
+ {
"name": "bower-asset/bootstrap",
"version": "v3.3.5",
"source": {
@@ -56,6 +117,37 @@
]
},
{
+ "name": "bower-asset/bootstrap-datepicker",
+ "version": "v1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/eternicode/bootstrap-datepicker.git",
+ "reference": "e7ca6bb94dc483817f2ff10fc2b723b2b935e016"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/eternicode/bootstrap-datepicker/zipball/e7ca6bb94dc483817f2ff10fc2b723b2b935e016",
+ "reference": "e7ca6bb94dc483817f2ff10fc2b723b2b935e016",
+ "shasum": ""
+ },
+ "require": {
+ "bower-asset/bootstrap": ">=2.0.4,<4.0",
+ "bower-asset/jquery": ">=1.7.1"
+ },
+ "type": "bower-asset-library",
+ "extra": {
+ "bower-asset-main": [
+ "dist/css/bootstrap-datepicker.css",
+ "dist/css/bootstrap-datepicker3.css",
+ "js/bootstrap-datepicker.js"
+ ],
+ "bower-asset-ignore": []
+ },
+ "license": [
+ "Apache-2.0"
+ ]
+ },
+ {
"name": "bower-asset/jquery",
"version": "2.1.4",
"source": {
diff --git a/framework/css/GridField_print.css b/framework/css/GridField_print.css
new file mode 100644
index 0000000..5f28eac
--- /dev/null
+++ b/framework/css/GridField_print.css
@@ -0,0 +1,7 @@
+h3 { font-family: Arial, sans-serif; }
+
+table { border-collapse: collapse; font-family: Arial, sans-serif; color: #333; font-size: 12pt; }
+table th { border-bottom: 2px solid #333; padding: 5px 10px; font-weight: bold; text-align: left; }
+table th:first-child { padding-left: 0px; }
+table td { border-top: 1px solid #aaa; border-bottom: 1px solid #aaa; text-align: left; padding: 5px 10px; }
+table td:first-child { padding-left: 0px; }
diff --git a/frontend/assets/InternalAsset.php b/frontend/assets/InternalAsset.php
index 6b141a9..7fe9bb0 100644
--- a/frontend/assets/InternalAsset.php
+++ b/frontend/assets/InternalAsset.php
@@ -23,6 +23,7 @@ class InternalAsset extends AssetBundle
'css/style/selectize.css',
'css/perfect-scrollbar/css/perfect-scrollbar.css',
'js/TrackBar/trackbar.css',
+
];
public $js = [
'js/modal/watch.js',
@@ -33,6 +34,7 @@ class InternalAsset extends AssetBundle
'js/select.js',
'js/validation/dist/jquery.validate.js',
'js/TrackBar/trackbar.js',
+
];
public $depends = [
'yii\web\YiiAsset',
diff --git a/frontend/views/site/cabinet.php b/frontend/views/site/cabinet.php
index 6ad9fb5..5dd8473 100644
--- a/frontend/views/site/cabinet.php
+++ b/frontend/views/site/cabinet.php
@@ -3,6 +3,8 @@
$this->registerCssFile('/css/about_company.css');
$this->registerCssFile('/css/style/notepad.css');
$this->registerCssFile('/css/style/my_profile.css');
+$this->registerCssFile('//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css');
+$this->registerJsFile('//code.jquery.com/ui/1.11.4/jquery-ui.js');
$this->params['breadcrumbs'][] = $this->title;
?>
@@ -330,3 +332,59 @@ $this->params['breadcrumbs'][] = $this->title;
+
+
+
+
\ No newline at end of file
diff --git a/storage/1d1ddd6734c119028f12799e154b3086/200x200.png b/storage/1d1ddd6734c119028f12799e154b3086/200x200.png
new file mode 100644
index 0000000..eb1383e
Binary files /dev/null and b/storage/1d1ddd6734c119028f12799e154b3086/200x200.png differ
diff --git a/storage/1d1ddd6734c119028f12799e154b3086/original.png b/storage/1d1ddd6734c119028f12799e154b3086/original.png
new file mode 100644
index 0000000..0fc4a17
Binary files /dev/null and b/storage/1d1ddd6734c119028f12799e154b3086/original.png differ
diff --git a/storage/3182b2b494b1d15298baf57954c80fb0/200x200.jpg b/storage/3182b2b494b1d15298baf57954c80fb0/200x200.jpg
new file mode 100644
index 0000000..7750035
Binary files /dev/null and b/storage/3182b2b494b1d15298baf57954c80fb0/200x200.jpg differ
diff --git a/storage/4929fc8db8a21618cafbaf3cf97e0558/200x200.jpg b/storage/4929fc8db8a21618cafbaf3cf97e0558/200x200.jpg
new file mode 100644
index 0000000..f99874f
Binary files /dev/null and b/storage/4929fc8db8a21618cafbaf3cf97e0558/200x200.jpg differ
diff --git a/storage/4929fc8db8a21618cafbaf3cf97e0558/x.jpg b/storage/4929fc8db8a21618cafbaf3cf97e0558/x.jpg
new file mode 100644
index 0000000..bdb3a52
Binary files /dev/null and b/storage/4929fc8db8a21618cafbaf3cf97e0558/x.jpg differ
diff --git a/storage/75426b23fbcf471ae0f5059f9ab3d824/200x200.png b/storage/75426b23fbcf471ae0f5059f9ab3d824/200x200.png
new file mode 100644
index 0000000..f649048
Binary files /dev/null and b/storage/75426b23fbcf471ae0f5059f9ab3d824/200x200.png differ
diff --git a/storage/75426b23fbcf471ae0f5059f9ab3d824/original.png b/storage/75426b23fbcf471ae0f5059f9ab3d824/original.png
new file mode 100644
index 0000000..89ac54d
Binary files /dev/null and b/storage/75426b23fbcf471ae0f5059f9ab3d824/original.png differ
diff --git a/storage/a62948dc31d3269c447bd64fc853ae3a/200x200.jpg b/storage/a62948dc31d3269c447bd64fc853ae3a/200x200.jpg
new file mode 100644
index 0000000..a40b1dc
Binary files /dev/null and b/storage/a62948dc31d3269c447bd64fc853ae3a/200x200.jpg differ
diff --git a/storage/a62948dc31d3269c447bd64fc853ae3a/original.jpg b/storage/a62948dc31d3269c447bd64fc853ae3a/original.jpg
new file mode 100644
index 0000000..bc5bf60
Binary files /dev/null and b/storage/a62948dc31d3269c447bd64fc853ae3a/original.jpg differ
diff --git a/storage/a62948dc31d3269c447bd64fc853ae3a/x.jpg b/storage/a62948dc31d3269c447bd64fc853ae3a/x.jpg
new file mode 100644
index 0000000..bc5bf60
Binary files /dev/null and b/storage/a62948dc31d3269c447bd64fc853ae3a/x.jpg differ
diff --git a/storage/a99080da55681122aa044b141e5d8d96/200x200.png b/storage/a99080da55681122aa044b141e5d8d96/200x200.png
new file mode 100644
index 0000000..1577fb8
Binary files /dev/null and b/storage/a99080da55681122aa044b141e5d8d96/200x200.png differ
diff --git a/storage/a99080da55681122aa044b141e5d8d96/original.png b/storage/a99080da55681122aa044b141e5d8d96/original.png
new file mode 100644
index 0000000..22a6af9
Binary files /dev/null and b/storage/a99080da55681122aa044b141e5d8d96/original.png differ
diff --git a/storage/af5cc0955fcf2bd15a56efa582ece550/200x200.jpg b/storage/af5cc0955fcf2bd15a56efa582ece550/200x200.jpg
new file mode 100644
index 0000000..06b165d
Binary files /dev/null and b/storage/af5cc0955fcf2bd15a56efa582ece550/200x200.jpg differ
diff --git a/storage/af5cc0955fcf2bd15a56efa582ece550/original.jpg b/storage/af5cc0955fcf2bd15a56efa582ece550/original.jpg
new file mode 100644
index 0000000..e2ff0f0
Binary files /dev/null and b/storage/af5cc0955fcf2bd15a56efa582ece550/original.jpg differ
diff --git a/storage/b6456643a4e6e41ae8aee94327848b12/200x200.png b/storage/b6456643a4e6e41ae8aee94327848b12/200x200.png
new file mode 100644
index 0000000..cc28827
Binary files /dev/null and b/storage/b6456643a4e6e41ae8aee94327848b12/200x200.png differ
diff --git a/storage/b6456643a4e6e41ae8aee94327848b12/original.png b/storage/b6456643a4e6e41ae8aee94327848b12/original.png
new file mode 100644
index 0000000..72189ee
Binary files /dev/null and b/storage/b6456643a4e6e41ae8aee94327848b12/original.png differ
diff --git a/storage/bb909ae41e1a3b09c88ea402f74e2caa/200x200.png b/storage/bb909ae41e1a3b09c88ea402f74e2caa/200x200.png
new file mode 100644
index 0000000..28e06eb
Binary files /dev/null and b/storage/bb909ae41e1a3b09c88ea402f74e2caa/200x200.png differ
diff --git a/storage/bb909ae41e1a3b09c88ea402f74e2caa/original.png b/storage/bb909ae41e1a3b09c88ea402f74e2caa/original.png
new file mode 100644
index 0000000..e4aed5c
Binary files /dev/null and b/storage/bb909ae41e1a3b09c88ea402f74e2caa/original.png differ
diff --git a/storage/c24c6caa693896710ec7a0934a911214/200x200.png b/storage/c24c6caa693896710ec7a0934a911214/200x200.png
new file mode 100644
index 0000000..e55d368
Binary files /dev/null and b/storage/c24c6caa693896710ec7a0934a911214/200x200.png differ
diff --git a/storage/c24c6caa693896710ec7a0934a911214/x.png b/storage/c24c6caa693896710ec7a0934a911214/x.png
new file mode 100644
index 0000000..6056379
Binary files /dev/null and b/storage/c24c6caa693896710ec7a0934a911214/x.png differ
diff --git a/storage/d732764150f3c6f779d0aed7a35b551e/200x200.jpg b/storage/d732764150f3c6f779d0aed7a35b551e/200x200.jpg
new file mode 100644
index 0000000..1537589
Binary files /dev/null and b/storage/d732764150f3c6f779d0aed7a35b551e/200x200.jpg differ
diff --git a/storage/d732764150f3c6f779d0aed7a35b551e/original.jpg b/storage/d732764150f3c6f779d0aed7a35b551e/original.jpg
new file mode 100644
index 0000000..6b91ec5
Binary files /dev/null and b/storage/d732764150f3c6f779d0aed7a35b551e/original.jpg differ
diff --git a/storage/dbd5c1a08753ca919151c7ac628e7df3/200x200.png b/storage/dbd5c1a08753ca919151c7ac628e7df3/200x200.png
new file mode 100644
index 0000000..7029285
Binary files /dev/null and b/storage/dbd5c1a08753ca919151c7ac628e7df3/200x200.png differ
diff --git a/storage/dbd5c1a08753ca919151c7ac628e7df3/x.png b/storage/dbd5c1a08753ca919151c7ac628e7df3/x.png
new file mode 100644
index 0000000..7029285
Binary files /dev/null and b/storage/dbd5c1a08753ca919151c7ac628e7df3/x.png differ
diff --git a/storage/ef776ce280114fb3a5aeb80da2692813/200x200.png b/storage/ef776ce280114fb3a5aeb80da2692813/200x200.png
new file mode 100644
index 0000000..bf5dc82
Binary files /dev/null and b/storage/ef776ce280114fb3a5aeb80da2692813/200x200.png differ
diff --git a/storage/ef776ce280114fb3a5aeb80da2692813/original.png b/storage/ef776ce280114fb3a5aeb80da2692813/original.png
new file mode 100644
index 0000000..8c0be1e
Binary files /dev/null and b/storage/ef776ce280114fb3a5aeb80da2692813/original.png differ
--
libgit2 0.21.4