diff --git a/backend/controllers/CartController.php b/backend/controllers/CartController.php
new file mode 100644
index 0000000..332883a
--- /dev/null
+++ b/backend/controllers/CartController.php
@@ -0,0 +1,62 @@
+search(Yii::$app->request->queryParams);
+
+ return $this->render('index', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ ]);
+ }
+
+ /**
+ * Displays a single CartBills model.
+ * @param string $id
+ * @return mixed
+ */
+ public function actionView($id)
+ {
+ return $this->render('view', [
+ 'model' => $this->findModel($id),
+ ]);
+ }
+
+
+ /**
+ * Finds the CartBills model based on its primary key value.
+ * If the model is not found, a 404 HTTP exception will be thrown.
+ * @param string $id
+ * @return CartBills the loaded model
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ protected function findModel($id)
+ {
+ if (($model = CartBillsView::findById($id)) !== null) {
+ return $model;
+ } else {
+ throw new NotFoundHttpException('The requested page does not exist.');
+ }
+ }
+}
diff --git a/backend/controllers/Check_priceController.php b/backend/controllers/Check_priceController.php
deleted file mode 100644
index 4ebd29b..0000000
--- a/backend/controllers/Check_priceController.php
+++ /dev/null
@@ -1,108 +0,0 @@
- [
- 'class' => AccessControl::className(),
- 'rules' => [
- [
- 'actions' => ['index', 'view'],
- 'allow' => true,
- 'roles' => ['@'],
- ],
- ],
- ],
-// 'verbs' => [
-// 'class' => VerbFilter::className(),
-// 'actions' => [
-// 'logout' => ['post'],
-// ],
-// ],
- ];
- }
-
- /**
- * @inheritdoc
- */
- public function actions()
- {
- return [
- 'error' => [
- 'class' => 'yii\web\ErrorAction',
- ],
- ];
- }
-
-
- public function actionIndex()
- {
-
- if(Yii::$app->request->isAjax){
- CustomVarDamp::dumpAndDie(1);
- }
-
- //$query = (new Query())->select('*')->from('{{%importer_files}}')->where(['not', ['time_end' => null]])->orderBy(['upload_time' => SORT_DESC]);
- $query = Importer::find()->where(['active' => true])->orderBy(['price_date_update' => SORT_DESC]);
-
- $provider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => [
- 'pageSize' => 10,
- ],
- ]);
- return $this->render('index',
- [
- 'dataProvider' => $provider,
- ]);
- }
-
-
- public function actionView ($id)
- {
-
-
-
-
- $query = Details::find()->where(['IMPORT_ID' => $id])->orderBy(['timestamp' => SORT_DESC]);
-
- $provider = new ActiveDataProvider([
- 'query' => $query,
- 'pagination' => [
- 'pageSize' => 16,
- ],
- ]);
- return $this->render('view',
- ['dataProvider' => $provider]);
- }
-}
diff --git a/backend/views/cart/_form.php b/backend/views/cart/_form.php
new file mode 100644
index 0000000..fee502d
--- /dev/null
+++ b/backend/views/cart/_form.php
@@ -0,0 +1,45 @@
+
+
+
diff --git a/backend/views/cart/_search.php b/backend/views/cart/_search.php
new file mode 100644
index 0000000..ba981eb
--- /dev/null
+++ b/backend/views/cart/_search.php
@@ -0,0 +1,51 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+ = $form->field($model, 'id') ?>
+
+ = $form->field($model, 'account_id') ?>
+
+ = $form->field($model, 'manager_id') ?>
+
+ = $form->field($model, 'office_id') ?>
+
+ = $form->field($model, 'status')->dropDownList(\yii\helpers\ArrayHelper::map( \common\models\DicStatuses::find()->where(['active' =>1])->all(), 'id','name' )) ?>
+
+ field($model, 'f1') ?>
+
+ field($model, 'f2') ?>
+
+ field($model, 'f3') ?>
+
+ field($model, 'message') ?>
+
+ field($model, 'safe_bill') ?>
+
+ field($model, 'delivery') ?>
+
+ field($model, 'delivery_price') ?>
+
+ field($model, 'timestamp') ?>
+
+
+ = Html::submitButton(Yii::t('app', 'Search'), ['class' => 'btn btn-primary']) ?>
+ = Html::resetButton(Yii::t('app', 'Reset'), ['class' => 'btn btn-default']) ?>
+
+
+
+
+
diff --git a/backend/views/cart/index.php b/backend/views/cart/index.php
new file mode 100644
index 0000000..a70caf8
--- /dev/null
+++ b/backend/views/cart/index.php
@@ -0,0 +1,54 @@
+title = Yii::t('app', 'Заказы');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'filterModel' => $searchModel,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+
+ 'id',
+ 'account_id',
+ 'sum',
+ [
+ 'label' =>'Статус',
+ 'attribute' => 'status',
+ 'filter' => \yii\helpers\ArrayHelper::map( \common\models\DicStatuses::find()->where(['active' =>1])->all(), 'id','name' ),
+ ],
+ 'manager_name',
+ [
+ 'label' =>'Дата',
+ 'attribute' => 'dt',
+ 'filter' => DatePicker::widget([
+ 'name' => 'data1',
+ // 'value' => '01-Feb-2015',
+ 'type' => DatePicker::TYPE_RANGE,
+ 'name2' => 'data2',
+ // 'value2' => '27-Feb-2015',
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'dd-M-yyyy'
+ ]
+ ]),
+ ],
+
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/cart/view.php b/backend/views/cart/view.php
new file mode 100644
index 0000000..dbefc32
--- /dev/null
+++ b/backend/views/cart/view.php
@@ -0,0 +1,47 @@
+title = $model->id;
+$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Cart Bills'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a(Yii::t('app', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?>
+ = Html::a(Yii::t('app', 'Delete'), ['delete', 'id' => $model->id], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => Yii::t('app', 'Are you sure you want to delete this item?'),
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id',
+ 'account_id',
+ 'manager_id',
+ 'office_id',
+ 'status',
+ 'f1',
+ 'f2',
+ 'f3',
+ 'message:ntext',
+ 'safe_bill',
+ 'delivery',
+ 'delivery_price',
+ 'timestamp',
+ ],
+ ]) ?>
+
+
diff --git a/backend/views/check_price/index.php b/backend/views/check_price/index.php
deleted file mode 100644
index e34f765..0000000
--- a/backend/views/check_price/index.php
+++ /dev/null
@@ -1,58 +0,0 @@
-title = 'Проверка прайсов';
-$this->params['breadcrumbs'][] = $this->title;
-?>
-
-
-
= Html::encode($this->title) ?>
-
-
- = GridView::widget( ['dataProvider' => $dataProvider,
- 'columns' => [['class' => SerialColumn::className()],
- [
- 'class' => ActionColumn::className(),
- 'template'=>'{view}',
- 'contentOptions' => function ($model, $key, $index, $column){
- return ['data' => ['id' => $model->id, 'date' => $model->price_date_update]];
- }
- ],
- [
- 'label' =>'Поставщик',
- 'value' => function ($data) {
- return '№ ' .$data->id . ' ' . $data->name;
- },
- ],
- ['label' =>'Дата обновления',
- 'attribute' => 'price_date_update' ],
- ['label' => 'Кол-во дней',
- 'value' => function ($data) {
- $date1 = new DateTime("now");
- $date2 = new DateTime( $data->price_date_update );
- $quo_days = $date2->diff($date1)->format('%R%a');
- // уберем первый символ - там знак "+"
- $quo_days = substr( $quo_days, 1, strlen($quo_days) );
- $quo_days = (int) $quo_days;
-
- if($quo_days > 15)
- $quo_days = '>15';
-
- return $quo_days;
- }
- ],
- ]] );?>
-
-
-
-
-
\ No newline at end of file
diff --git a/backend/views/check_price/view.php b/backend/views/check_price/view.php
deleted file mode 100644
index f6d9ff0..0000000
--- a/backend/views/check_price/view.php
+++ /dev/null
@@ -1,32 +0,0 @@
-title = 'Проверка прайсов';
-$this->params['breadcrumbs'][] = $this->title;
-
-?>
-
-
-
= Html::encode($this->title) ?>
-
- = GridView::widget( ['dataProvider' => $dataProvider,
-
- ] );
-
-
- ?>
-
-
-
-
-
\ No newline at end of file
diff --git a/backend/views/layouts/column.php b/backend/views/layouts/column.php
index 0911f48..8b76e63 100644
--- a/backend/views/layouts/column.php
+++ b/backend/views/layouts/column.php
@@ -282,6 +282,7 @@ $this->beginContent('@app/views/layouts/main.php');
echo Menu::widget([
'options' => ['class' => 'sidebar-menu'],
'items' => [
+ ['label' => 'Заказы', 'url' => ['cart/index']],
['label' => "Загрузка файлов", 'url' => ['#'], 'items' => [
['label' => 'Кросс файлы', 'url' => ['crossing-upload/index']],
['label' => 'Группы RG', 'url' => ['rg-grup/index']],
@@ -319,10 +320,7 @@ $this->beginContent('@app/views/layouts/main.php');
['label' => 'Vin коды', 'url' => ['currency/index']],
['label' => 'Запросы по номеру', 'url' => ['currency/index']],
['label' => 'Офисы', 'url' => ['offices/index']],
- ],
- ],
- ['label' => 'Справочник', 'url' => ['#'], 'items' => [
- ['label' => 'Замены брендов', 'url' => ['currency/index']],
+ ['label' => 'Валюты', 'url' => ['currency/index']],
],
],
diff --git a/common/components/debug/CustomVarDamp.php b/common/components/debug/CustomVarDamp.php
deleted file mode 100644
index 76d1a19..0000000
--- a/common/components/debug/CustomVarDamp.php
+++ /dev/null
@@ -1,20 +0,0 @@
-";
- echo static::dumpAsString($var, $depth, $highlight);
- echo "";
- die;
- }
-}
\ No newline at end of file
diff --git a/common/models/Cart.php b/common/models/Cart.php
new file mode 100644
index 0000000..7563991
--- /dev/null
+++ b/common/models/Cart.php
@@ -0,0 +1,66 @@
+ 100],
+ [['descr'], 'string', 'max' => 254]
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'bill_id' => Yii::t('app', 'Bill ID'),
+ 'account_id' => Yii::t('app', 'Account ID'),
+ 'count' => Yii::t('app', 'Count'),
+ 'price' => Yii::t('app', 'Price'),
+ 'price_purchase' => Yii::t('app', 'Price Purchase'),
+ 'status' => Yii::t('app', 'Status'),
+ 'article' => Yii::t('app', 'Article'),
+ 'brand' => Yii::t('app', 'Brand'),
+ 'descr' => Yii::t('app', 'Descr'),
+ 'import_id' => Yii::t('app', 'Import ID'),
+ 'timestamp' => Yii::t('app', 'Timestamp'),
+ ];
+ }
+}
diff --git a/common/models/CartBills.php b/common/models/CartBills.php
new file mode 100644
index 0000000..e84cb6d
--- /dev/null
+++ b/common/models/CartBills.php
@@ -0,0 +1,72 @@
+ 150],
+ [['f2'], 'string', 'max' => 50],
+ [['delivery'], 'string', 'max' => 100]
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => Yii::t('app', 'ID'),
+ 'account_id' => Yii::t('app', 'Account ID'),
+ 'manager_id' => Yii::t('app', 'Manager ID'),
+ 'office_id' => Yii::t('app', 'Office ID'),
+ 'status' => Yii::t('app', 'Status'),
+ 'f1' => Yii::t('app', 'F1'),
+ 'f2' => Yii::t('app', 'F2'),
+ 'f3' => Yii::t('app', 'F3'),
+ 'message' => Yii::t('app', 'Message'),
+ 'safe_bill' => Yii::t('app', 'Safe Bill'),
+ 'delivery' => Yii::t('app', 'Delivery'),
+ 'delivery_price' => Yii::t('app', 'Delivery Price'),
+ 'timestamp' => Yii::t('app', 'Timestamp'),
+ ];
+ }
+}
diff --git a/common/models/CartBillsSearch.php b/common/models/CartBillsSearch.php
new file mode 100644
index 0000000..94bf8c1
--- /dev/null
+++ b/common/models/CartBillsSearch.php
@@ -0,0 +1,76 @@
+ $query,
+ ]);
+
+ $this->load($params);
+ //$timestamp= mktime($hours,$minutes,$seconds,$month,$day,$year);
+ CustomVarDamp::dumpAndDie(date_timestamp_get($params['data1']));
+ 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,
+ 'account_id' => $this->account_id,
+ 'timestamp' => $this->dt,
+ 'status_id' => $this->status,
+ ]);
+
+// $query->andFilterWhere(['like', 'f1', $this->f1])
+// ->andFilterWhere(['like', 'f2', $this->f2])
+// ->andFilterWhere(['like', 'f3', $this->f3])
+// ->andFilterWhere(['like', 'message', $this->message])
+// ->andFilterWhere(['like', 'delivery', $this->delivery]);
+
+ return $dataProvider;
+ }
+}
diff --git a/common/models/CartBillsView.php b/common/models/CartBillsView.php
new file mode 100644
index 0000000..c77cd35
--- /dev/null
+++ b/common/models/CartBillsView.php
@@ -0,0 +1,78 @@
+ 255],
+ [['name', 'email'], 'string', 'max' => 150],
+ [['phone', 'status'], 'string', 'max' => 50],
+ [['delivery'], 'string', 'max' => 100]
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => Yii::t('app', '№ заказа'),
+ 'account_id' => Yii::t('app', '№ клиента'),
+ 'manager_name' => Yii::t('app', 'Менеджер'),
+ 'dt' => Yii::t('app', 'Дата'),
+ 'name' => Yii::t('app', 'Name'),
+ 'phone' => Yii::t('app', 'Phone'),
+ 'email' => Yii::t('app', 'Email'),
+ 'delivery' => Yii::t('app', 'Delivery'),
+ 'status_id' => Yii::t('app', 'Status ID'),
+ 'status' => Yii::t('app', 'Статус'),
+ 'message' => Yii::t('app', 'Message'),
+ 'safe_bill' => Yii::t('app', 'Safe Bill'),
+ 'sum' => Yii::t('app', 'Сумма'),
+ 'scode' => Yii::t('app', 'Scode'),
+ ];
+ }
+
+ public static function findById($id){
+
+ }
+}
diff --git a/common/models/CartView.php b/common/models/CartView.php
new file mode 100644
index 0000000..771c2e0
--- /dev/null
+++ b/common/models/CartView.php
@@ -0,0 +1,73 @@
+ 150],
+ [['status'], 'string', 'max' => 50],
+ [['article', 'brand'], 'string', 'max' => 100],
+ [['descr', 'importer'], 'string', 'max' => 254]
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function attributeLabels()
+ {
+ return [
+ 'id' => Yii::t('app', 'ID'),
+ 'account_id' => Yii::t('app', 'Account ID'),
+ 'dt' => Yii::t('app', 'Dt'),
+ 'user_name' => Yii::t('app', 'User Name'),
+ 'user_mail' => Yii::t('app', 'User Mail'),
+ 'status_id' => Yii::t('app', 'Status ID'),
+ 'status' => Yii::t('app', 'Status'),
+ 'article' => Yii::t('app', 'Article'),
+ 'brand' => Yii::t('app', 'Brand'),
+ 'descr' => Yii::t('app', 'Descr'),
+ 'importer' => Yii::t('app', 'Importer'),
+ 'count' => Yii::t('app', 'Count'),
+ 'price' => Yii::t('app', 'Price'),
+ 'import_id' => Yii::t('app', 'Import ID'),
+ ];
+ }
+}
diff --git a/composer.json b/composer.json
index 228a48b..61114b2 100644
--- a/composer.json
+++ b/composer.json
@@ -19,7 +19,10 @@
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"artweb/yii2-multiparser": "dev-master",
- "yiisoft/yii2-imagine": "*"
+ "yiisoft/yii2-imagine": "*",
+ "kartik-v/yii2-widget-datepicker": "^1.3",
+ "kartik-v/yii2-field-range": "^1.3",
+ "kartik-v/yii2-datecontrol": "dev-master"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
diff --git a/composer.lock b/composer.lock
index 74c912a..53ed4be 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "hash": "c82a0b48e9d917d19deff3e70988e9e1",
- "content-hash": "91acdf28733394f58a82e0550d685d7d",
+ "hash": "2d5c03f681f1c72d09f36e10af144465",
+ "content-hash": "4c8b69eb2733ca32596e438952d2f182",
"packages": [
{
"name": "artweb/yii2-multiparser",
@@ -415,6 +415,244 @@
"time": "2013-07-10 17:25:36"
},
{
+ "name": "kartik-v/php-date-formatter",
+ "version": "v1.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/php-date-formatter.git",
+ "reference": "7d3dc3495dd10bd1909c0dfdecd673967019cc21"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/php-date-formatter/zipball/7d3dc3495dd10bd1909c0dfdecd673967019cc21",
+ "reference": "7d3dc3495dd10bd1909c0dfdecd673967019cc21",
+ "shasum": ""
+ },
+ "type": "library",
+ "autoload": {
+ "psr-4": {
+ "kartik\\plugins\\dateformatter\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "A JQuery datetime formatting and manipulation library using PHP date-time formats in javascript.",
+ "homepage": "https://github.com/kartik-v/php-date-formatter",
+ "keywords": [
+ "date",
+ "datetime",
+ "formatter",
+ "javascript",
+ "jquery",
+ "php",
+ "php-date-formatter.js",
+ "time"
+ ],
+ "time": "2015-06-18 15:14:51"
+ },
+ {
+ "name": "kartik-v/yii2-datecontrol",
+ "version": "dev-master",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-datecontrol.git",
+ "reference": "4e858b5cd38130c37739b2f582b66a044f77c95c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-datecontrol/zipball/4e858b5cd38130c37739b2f582b66a044f77c95c",
+ "reference": "4e858b5cd38130c37739b2f582b66a044f77c95c",
+ "shasum": ""
+ },
+ "require": {
+ "kartik-v/php-date-formatter": ">1.3",
+ "kartik-v/yii2-krajee-base": "~1.7"
+ },
+ "type": "yii2-extension",
+ "autoload": {
+ "psr-4": {
+ "kartik\\datecontrol\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Date control module allowing separation of formats for View and Model for Yii Framework 2.0",
+ "homepage": "https://github.com/kartik-v/yii2-datecontrol",
+ "keywords": [
+ "control",
+ "date",
+ "extension",
+ "format",
+ "yii",
+ "yii2"
+ ],
+ "time": "2015-07-30 18:30:18"
+ },
+ {
+ "name": "kartik-v/yii2-field-range",
+ "version": "v1.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-field-range.git",
+ "reference": "095d260eecb86ff2e78a70775011cec00a75df98"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-field-range/zipball/095d260eecb86ff2e78a70775011cec00a75df98",
+ "reference": "095d260eecb86ff2e78a70775011cec00a75df98",
+ "shasum": ""
+ },
+ "require": {
+ "kartik-v/yii2-krajee-base": "*"
+ },
+ "type": "yii2-extension",
+ "autoload": {
+ "psr-4": {
+ "kartik\\field\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD 3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more",
+ "homepage": "https://github.com/kartik-v/yii2-field-range",
+ "keywords": [
+ "addon",
+ "bootstrap",
+ "bootstrap 3",
+ "date",
+ "extension",
+ "field-range",
+ "from",
+ "range",
+ "to",
+ "widget",
+ "yii2"
+ ],
+ "time": "2014-11-25 08:52:00"
+ },
+ {
+ "name": "kartik-v/yii2-krajee-base",
+ "version": "v1.7.7",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-krajee-base.git",
+ "reference": "c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19",
+ "reference": "c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19",
+ "shasum": ""
+ },
+ "require": {
+ "yiisoft/yii2-bootstrap": "@dev"
+ },
+ "type": "yii2-extension",
+ "autoload": {
+ "psr-4": {
+ "kartik\\base\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Base library and foundation components for all Yii2 Krajee extensions.",
+ "homepage": "https://github.com/kartik-v/yii2-krajee-base",
+ "keywords": [
+ "base",
+ "extension",
+ "foundation",
+ "krajee",
+ "widget",
+ "yii2"
+ ],
+ "time": "2015-06-16 05:19:57"
+ },
+ {
+ "name": "kartik-v/yii2-widget-datepicker",
+ "version": "v1.3.3",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-widget-datepicker.git",
+ "reference": "368b181ef658c05707fe41dd16eee4d9ffd9da38"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-widget-datepicker/zipball/368b181ef658c05707fe41dd16eee4d9ffd9da38",
+ "reference": "368b181ef658c05707fe41dd16eee4d9ffd9da38",
+ "shasum": ""
+ },
+ "require": {
+ "kartik-v/yii2-krajee-base": "~1.7"
+ },
+ "type": "yii2-extension",
+ "autoload": {
+ "psr-4": {
+ "kartik\\date\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).",
+ "homepage": "https://github.com/kartik-v/yii2-widget-datepicker",
+ "keywords": [
+ "date",
+ "extension",
+ "form",
+ "jquery",
+ "picker",
+ "plugin",
+ "select2",
+ "widget",
+ "yii2"
+ ],
+ "time": "2015-07-19 04:49:03"
+ },
+ {
"name": "swiftmailer/swiftmailer",
"version": "v5.4.1",
"source": {
@@ -1061,7 +1299,8 @@
"aliases": [],
"minimum-stability": "stable",
"stability-flags": {
- "artweb/yii2-multiparser": 20
+ "artweb/yii2-multiparser": 20,
+ "kartik-v/yii2-datecontrol": 20
},
"prefer-stable": false,
"prefer-lowest": false,
diff --git a/console/migrations/m150915_125129_addDetails.php b/console/migrations/m150915_125129_addDetails.php
deleted file mode 100644
index d8d5419..0000000
--- a/console/migrations/m150915_125129_addDetails.php
+++ /dev/null
@@ -1,40 +0,0 @@
-execute('CREATE TABLE `details` (
- `ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `IMPORT_ID` int(6) unsigned NOT NULL,
- `BRAND` varchar(100) NOT NULL,
- `ARTICLE` varchar(100) NOT NULL,
- `FULL_ARTICLE` varchar(150) NOT NULL,
- `PRICE` float(15,2) unsigned NOT NULL,
- `DESCR` varchar(200) NOT NULL,
- `BOX` int(6) unsigned NOT NULL,
- `ADD_BOX` int(6) unsigned NOT NULL DEFAULT 0,
- `GROUP` varchar(200) NOT NULL DEFAULT \'\',
- `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
- PRIMARY KEY (`ARTICLE`,`BRAND`,`IMPORT_ID`),
- UNIQUE KEY `ID_delete` (`ID`),
- KEY `timestamp` (`timestamp`),
- KEY `ARTICLE` (`ARTICLE`,`BRAND`,`BOX`),
- KEY `BRAND` (`BRAND`,`ARTICLE`),
- KEY `ARTICLE_2` (`ARTICLE`,`BRAND`,`ADD_BOX`),
- KEY `IMPORT_ID` (`IMPORT_ID`,`ARTICLE`),
- KEY `IMPORT_ID_2` (`IMPORT_ID`,`timestamp`)
- ) ENGINE=InnoDB DEFAULT CHARSET=utf8');
-
- }
-
- public function down()
- {
- $this->dropTable('{{%details}}');
-
- }
-
-}
diff --git a/console/migrations/m150922_094313_change_key_ImportFiles.php b/console/migrations/m150922_094313_change_key_ImportFiles.php
deleted file mode 100644
index 5606ec2..0000000
--- a/console/migrations/m150922_094313_change_key_ImportFiles.php
+++ /dev/null
@@ -1,22 +0,0 @@
-dropIndex('importer_id', '{{%importer_files}}');
- $this->createIndex('importer_id', '{{%importer_files}}', 'importer_id, upload_time', false);
- }
-
- public function down()
- {
- $this->dropIndex('importer_id', '{{%importer_files}}');
- $this->createIndex('importer_id', '{{%importer_files}}', 'importer_id, time_start', false);
- }
-
-
-}
diff --git a/console/migrations/m150922_144040_change_Importer_dataPrice.php b/console/migrations/m150922_144040_change_Importer_dataPrice.php
deleted file mode 100644
index f62873d..0000000
--- a/console/migrations/m150922_144040_change_Importer_dataPrice.php
+++ /dev/null
@@ -1,21 +0,0 @@
-alterColumn('{{%importer}}','price_date_update','TIMESTAMP' );
- $this->createIndex('price_date', '{{%importer}}', 'price_date_update', false);
- }
-
- public function down()
- {
- $this->alterColumn('{{%importer}}','price_date','varchar(15)' );
- $this->dropIndex('price_date', '{{%importer}}');
- }
-
-
-}
diff --git a/console/migrations/m151016_144435_addViewDetailsCurrency.php b/console/migrations/m151016_144435_addViewDetailsCurrency.php
index 5ae3886..bb32755 100644
--- a/console/migrations/m151016_144435_addViewDetailsCurrency.php
+++ b/console/migrations/m151016_144435_addViewDetailsCurrency.php
@@ -1,6 +1,5 @@
execute($sum_count);
+
+ }
+
+ public function safedown()
+ {
+
+ $sum_count = <<< MySQL
+ drop FUNCTION SumBill;
+MySQL;
+
+ $this->execute($sum_count);
+
+ }
+
+
+}
\ No newline at end of file
diff --git a/console/migrations/m151030_123511_addCartBillsView.php b/console/migrations/m151030_123511_addCartBillsView.php
new file mode 100644
index 0000000..bc5a728
--- /dev/null
+++ b/console/migrations/m151030_123511_addCartBillsView.php
@@ -0,0 +1,47 @@
+execute($view);
+
+ }
+
+ public function down()
+ {
+ // вернем все как было
+ $drop_view = 'drop view if exists w_cart_bills_view';
+
+ $this->execute($drop_view);
+
+ }
+}
+
+
+
diff --git a/console/migrations/m151030_133110_addCartView.php b/console/migrations/m151030_133110_addCartView.php
new file mode 100644
index 0000000..a35d149
--- /dev/null
+++ b/console/migrations/m151030_133110_addCartView.php
@@ -0,0 +1,41 @@
+execute($view);
+
+ }
+
+ public function down()
+ {
+ // вернем все как было
+ $drop_view = 'drop view if exists w_cart_view';
+
+ $this->execute($drop_view);
+
+ }
+}
diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php
index b6e9819..7542927 100644
--- a/vendor/composer/autoload_psr4.php
+++ b/vendor/composer/autoload_psr4.php
@@ -16,6 +16,11 @@ return array(
'yii\\codeception\\' => array($vendorDir . '/yiisoft/yii2-codeception'),
'yii\\bootstrap\\' => array($vendorDir . '/yiisoft/yii2-bootstrap'),
'yii\\' => array($vendorDir . '/yiisoft/yii2'),
+ 'kartik\\plugins\\dateformatter\\' => array($vendorDir . '/kartik-v/php-date-formatter'),
+ 'kartik\\field\\' => array($vendorDir . '/kartik-v/yii2-field-range'),
+ 'kartik\\datecontrol\\' => array($vendorDir . '/kartik-v/yii2-datecontrol'),
+ 'kartik\\date\\' => array($vendorDir . '/kartik-v/yii2-widget-datepicker'),
+ 'kartik\\base\\' => array($vendorDir . '/kartik-v/yii2-krajee-base'),
'cebe\\markdown\\' => array($vendorDir . '/cebe/markdown'),
'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'),
);
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 28ec5be..da660d5 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1090,5 +1090,253 @@
"xml",
"yii2"
]
+ },
+ {
+ "name": "kartik-v/yii2-krajee-base",
+ "version": "v1.7.7",
+ "version_normalized": "1.7.7.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-krajee-base.git",
+ "reference": "c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-krajee-base/zipball/c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19",
+ "reference": "c0adff9d9762f4fd3bf0e7cd0000fcab0bf00f19",
+ "shasum": ""
+ },
+ "require": {
+ "yiisoft/yii2-bootstrap": "@dev"
+ },
+ "time": "2015-06-16 05:19:57",
+ "type": "yii2-extension",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "kartik\\base\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Base library and foundation components for all Yii2 Krajee extensions.",
+ "homepage": "https://github.com/kartik-v/yii2-krajee-base",
+ "keywords": [
+ "base",
+ "extension",
+ "foundation",
+ "krajee",
+ "widget",
+ "yii2"
+ ]
+ },
+ {
+ "name": "kartik-v/yii2-widget-datepicker",
+ "version": "v1.3.3",
+ "version_normalized": "1.3.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-widget-datepicker.git",
+ "reference": "368b181ef658c05707fe41dd16eee4d9ffd9da38"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-widget-datepicker/zipball/368b181ef658c05707fe41dd16eee4d9ffd9da38",
+ "reference": "368b181ef658c05707fe41dd16eee4d9ffd9da38",
+ "shasum": ""
+ },
+ "require": {
+ "kartik-v/yii2-krajee-base": "~1.7"
+ },
+ "time": "2015-07-19 04:49:03",
+ "type": "yii2-extension",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "kartik\\date\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Enhanced Yii2 wrapper for the bootstrap datepicker plugin (sub repo split from yii2-widgets).",
+ "homepage": "https://github.com/kartik-v/yii2-widget-datepicker",
+ "keywords": [
+ "date",
+ "extension",
+ "form",
+ "jquery",
+ "picker",
+ "plugin",
+ "select2",
+ "widget",
+ "yii2"
+ ]
+ },
+ {
+ "name": "kartik-v/yii2-field-range",
+ "version": "v1.3.0",
+ "version_normalized": "1.3.0.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-field-range.git",
+ "reference": "095d260eecb86ff2e78a70775011cec00a75df98"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-field-range/zipball/095d260eecb86ff2e78a70775011cec00a75df98",
+ "reference": "095d260eecb86ff2e78a70775011cec00a75df98",
+ "shasum": ""
+ },
+ "require": {
+ "kartik-v/yii2-krajee-base": "*"
+ },
+ "time": "2014-11-25 08:52:00",
+ "type": "yii2-extension",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "kartik\\field\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD 3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Easily manage Yii 2 ActiveField ranges (from/to) with Bootstrap 3 addons markup and more",
+ "homepage": "https://github.com/kartik-v/yii2-field-range",
+ "keywords": [
+ "addon",
+ "bootstrap",
+ "bootstrap 3",
+ "date",
+ "extension",
+ "field-range",
+ "from",
+ "range",
+ "to",
+ "widget",
+ "yii2"
+ ]
+ },
+ {
+ "name": "kartik-v/php-date-formatter",
+ "version": "v1.3.1",
+ "version_normalized": "1.3.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/php-date-formatter.git",
+ "reference": "7d3dc3495dd10bd1909c0dfdecd673967019cc21"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/php-date-formatter/zipball/7d3dc3495dd10bd1909c0dfdecd673967019cc21",
+ "reference": "7d3dc3495dd10bd1909c0dfdecd673967019cc21",
+ "shasum": ""
+ },
+ "time": "2015-06-18 15:14:51",
+ "type": "library",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "kartik\\plugins\\dateformatter\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "A JQuery datetime formatting and manipulation library using PHP date-time formats in javascript.",
+ "homepage": "https://github.com/kartik-v/php-date-formatter",
+ "keywords": [
+ "date",
+ "datetime",
+ "formatter",
+ "javascript",
+ "jquery",
+ "php",
+ "php-date-formatter.js",
+ "time"
+ ]
+ },
+ {
+ "name": "kartik-v/yii2-datecontrol",
+ "version": "dev-master",
+ "version_normalized": "9999999-dev",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/kartik-v/yii2-datecontrol.git",
+ "reference": "4e858b5cd38130c37739b2f582b66a044f77c95c"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/kartik-v/yii2-datecontrol/zipball/4e858b5cd38130c37739b2f582b66a044f77c95c",
+ "reference": "4e858b5cd38130c37739b2f582b66a044f77c95c",
+ "shasum": ""
+ },
+ "require": {
+ "kartik-v/php-date-formatter": ">1.3",
+ "kartik-v/yii2-krajee-base": "~1.7"
+ },
+ "time": "2015-07-30 18:30:18",
+ "type": "yii2-extension",
+ "installation-source": "dist",
+ "autoload": {
+ "psr-4": {
+ "kartik\\datecontrol\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Kartik Visweswaran",
+ "email": "kartikv2@gmail.com",
+ "homepage": "http://www.krajee.com/"
+ }
+ ],
+ "description": "Date control module allowing separation of formats for View and Model for Yii Framework 2.0",
+ "homepage": "https://github.com/kartik-v/yii2-datecontrol",
+ "keywords": [
+ "control",
+ "date",
+ "extension",
+ "format",
+ "yii",
+ "yii2"
+ ]
}
]
diff --git a/vendor/yiisoft/extensions.php b/vendor/yiisoft/extensions.php
index d4aaf6a..6c4c485 100644
--- a/vendor/yiisoft/extensions.php
+++ b/vendor/yiisoft/extensions.php
@@ -75,4 +75,40 @@ return array (
'@yii/imagine' => $vendorDir . '/yiisoft/yii2-imagine',
),
),
+ 'kartik-v/yii2-krajee-base' =>
+ array (
+ 'name' => 'kartik-v/yii2-krajee-base',
+ 'version' => '1.7.7.0',
+ 'alias' =>
+ array (
+ '@kartik/base' => $vendorDir . '/kartik-v/yii2-krajee-base',
+ ),
+ ),
+ 'kartik-v/yii2-widget-datepicker' =>
+ array (
+ 'name' => 'kartik-v/yii2-widget-datepicker',
+ 'version' => '1.3.3.0',
+ 'alias' =>
+ array (
+ '@kartik/date' => $vendorDir . '/kartik-v/yii2-widget-datepicker',
+ ),
+ ),
+ 'kartik-v/yii2-field-range' =>
+ array (
+ 'name' => 'kartik-v/yii2-field-range',
+ 'version' => '1.3.0.0',
+ 'alias' =>
+ array (
+ '@kartik/field' => $vendorDir . '/kartik-v/yii2-field-range',
+ ),
+ ),
+ 'kartik-v/yii2-datecontrol' =>
+ array (
+ 'name' => 'kartik-v/yii2-datecontrol',
+ 'version' => '9999999-dev',
+ 'alias' =>
+ array (
+ '@kartik/datecontrol' => $vendorDir . '/kartik-v/yii2-datecontrol',
+ ),
+ ),
);
--
libgit2 0.21.4