diff --git a/backend/views/brands-replace/_form.php b/backend/views/brands-replace/_form.php
index c221e3c..b9ec510 100755
--- a/backend/views/brands-replace/_form.php
+++ b/backend/views/brands-replace/_form.php
@@ -16,12 +16,9 @@ use yii\widgets\ActiveForm;
= $form->field($model, 'to_brand')->textInput(['maxlength' => true]) ?>
- = $form->field($model, 'finish')->textInput() ?>
-
- = $form->field($model, 'timestamp')->textInput() ?>
- = Html::submitButton($model->isNewRecord ? 'Добавить' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
+ = Html::submitButton($model->isNewRecord ? 'Добавить' : 'Редактировать', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
diff --git a/backend/views/brands-replace/create.php b/backend/views/brands-replace/create.php
index 643723e..bce5ec6 100755
--- a/backend/views/brands-replace/create.php
+++ b/backend/views/brands-replace/create.php
@@ -6,7 +6,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\BrandsReplace */
-$this->title = 'Добавить Brands Replace';
+$this->title = 'Добавить';
$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
diff --git a/backend/views/brands-replace/index.php b/backend/views/brands-replace/index.php
index da371dc..3e8f46f 100755
--- a/backend/views/brands-replace/index.php
+++ b/backend/views/brands-replace/index.php
@@ -7,7 +7,7 @@ use yii\grid\GridView;
/* @var $searchModel common\models\BrandsReplaceSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
-$this->title = 'Brands Replaces';
+$this->title = 'Замена брендов';
$this->params['breadcrumbs'][] = $this->title;
?>
@@ -16,7 +16,7 @@ $this->params['breadcrumbs'][] = $this->title;
render('_search', ['model' => $searchModel]); ?>
- = Html::a('Добавить Brands Replace', ['create'], ['class' => 'btn btn-success']) ?>
+ = Html::a('Добавить', ['create'], ['class' => 'btn btn-success']) ?>
= GridView::widget([
@@ -28,7 +28,21 @@ $this->params['breadcrumbs'][] = $this->title;
'id',
'from_brand',
'to_brand',
- 'finish',
+ ['attribute' => 'finish',
+ 'format' => 'raw',
+ 'filter' => [
+ '1'=>'Закончена',
+ '0'=>'Не закончена',
+ ],
+ 'value' => function($data){
+ if($data->finish){
+ $status_img = '
';
+ } else {
+ $status_img = '
';
+ }
+ return $status_img;
+ },
+ ],
'timestamp',
['class' => 'yii\grid\ActionColumn'],
diff --git a/backend/views/brands-replace/update.php b/backend/views/brands-replace/update.php
index 7594cfa..ff34beb 100755
--- a/backend/views/brands-replace/update.php
+++ b/backend/views/brands-replace/update.php
@@ -5,7 +5,7 @@ use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model common\models\BrandsReplace */
-$this->title = 'Update Brands Replace: ' . ' ' . $model->from_brand;
+$this->title = 'Редактирование: ' . ' ' . $model->from_brand;
$this->params['breadcrumbs'][] = ['label' => 'Brands Replaces', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->from_brand, 'url' => ['view', 'from_brand' => $model->from_brand, 'to_brand' => $model->to_brand]];
$this->params['breadcrumbs'][] = 'Update';
diff --git a/backend/views/brands-replace/view.php b/backend/views/brands-replace/view.php
index 209e526..da594d2 100755
--- a/backend/views/brands-replace/view.php
+++ b/backend/views/brands-replace/view.php
@@ -15,8 +15,8 @@ $this->params['breadcrumbs'][] = $this->title;
= Html::encode($this->title) ?>
- = Html::a('Update', ['update', 'from_brand' => $model->from_brand, 'to_brand' => $model->to_brand], ['class' => 'btn btn-primary']) ?>
- = Html::a('Delete', ['delete', 'from_brand' => $model->from_brand, 'to_brand' => $model->to_brand], [
+ = Html::a('Редактировать', ['update', 'from_brand' => $model->from_brand, 'to_brand' => $model->to_brand], ['class' => 'btn btn-primary']) ?>
+ = Html::a('Удалить', ['delete', 'from_brand' => $model->from_brand, 'to_brand' => $model->to_brand], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => 'Are you sure you want to delete this item?',
diff --git a/backend/views/details/_form.php b/backend/views/details/_form.php
index 0a17187..a0d6474 100755
--- a/backend/views/details/_form.php
+++ b/backend/views/details/_form.php
@@ -12,9 +12,13 @@ use backend\models\Importers;
-
+ '' ];
+ $arr_importers = array_merge( $arr_importers, ArrayHelper::map( Importers::find()->orderBy('name')->all(), 'id','name' ) );
+ ?>
- = $form->field($model, 'IMPORT_ID')->dropDownList( ArrayHelper::map( Importers::find()->orderBy('name')->all(), 'id','name' ) ) ?>
+ = $form->field($model, 'IMPORT_ID')->dropDownList( $arr_importers ) ?>
= $form->field($model, 'BRAND')->textInput(['maxlength' => true]) ?>
diff --git a/backend/views/details/index.php b/backend/views/details/index.php
index 6649cb4..2960a7a 100755
--- a/backend/views/details/index.php
+++ b/backend/views/details/index.php
@@ -27,10 +27,12 @@ $this->params['breadcrumbs'][] = $this->title;
['class' => 'yii\grid\SerialColumn'],
'ARTICLE',
'BRAND',
-
['attribute' => 'IMPORT_ID',
- 'value' => function($model){return $model->importer;}],
-
+ 'value' => function($model)
+ {
+ return $model->importer;
+ }
+ ],
'DESCR',
'BOX',
'ADD_BOX',
diff --git a/common/components/parsers/Converter.php b/common/components/parsers/Converter.php
index ab6600a..b51cc06 100644
--- a/common/components/parsers/Converter.php
+++ b/common/components/parsers/Converter.php
@@ -44,7 +44,7 @@ class Converter implements ConverterInterface
if ($value == '') {
return '';
}
- $value = round((int)$value, 2);
+ $value = (int)$value;
return $value;
}
diff --git a/common/models/BrandsReplace.php b/common/models/BrandsReplace.php
index 79f0813..bdb29f1 100755
--- a/common/models/BrandsReplace.php
+++ b/common/models/BrandsReplace.php
@@ -43,10 +43,10 @@ class BrandsReplace extends \yii\db\ActiveRecord
{
return [
'id' => 'ID',
- 'from_brand' => 'From Brand',
- 'to_brand' => 'To Brand',
- 'finish' => 'Finish',
- 'timestamp' => 'Timestamp',
+ 'from_brand' => 'Не правильный бренд',
+ 'to_brand' => 'Правильный бренд',
+ 'finish' => 'Замена закончена',
+ 'timestamp' => 'Время',
];
}
}
diff --git a/common/models/BrandsReplaceSearch.php b/common/models/BrandsReplaceSearch.php
index 5c6ffc0..6394644 100755
--- a/common/models/BrandsReplaceSearch.php
+++ b/common/models/BrandsReplaceSearch.php
@@ -19,7 +19,7 @@ class BrandsReplaceSearch extends BrandsReplace
{
return [
[['id', 'finish'], 'integer'],
- [['from_brand', 'to_brand', 'timestamp'], 'safe'],
+ [['from_brand', 'to_brand'], 'safe'],
];
}
@@ -58,7 +58,6 @@ class BrandsReplaceSearch extends BrandsReplace
$query->andFilterWhere([
'id' => $this->id,
'finish' => $this->finish,
- 'timestamp' => $this->timestamp,
]);
$query->andFilterWhere(['like', 'from_brand', $this->from_brand])
diff --git a/common/models/Details.php b/common/models/Details.php
index 9fcece7..7521e3d 100644
--- a/common/models/Details.php
+++ b/common/models/Details.php
@@ -52,7 +52,13 @@ class Details extends BaseActiveRecord
public function getImporter ()
{
- return Importers::findOne(['id' => $this->IMPORT_ID])->name;
+ $importer = Importers::findOne(['id' => $this->IMPORT_ID]);
+ if ($importer) {
+ return $importer->name;
+ } else {
+ return null;
+ }
+
}
/**
@@ -83,7 +89,7 @@ class Details extends BaseActiveRecord
'Importer' => Yii::t('app', 'ПОСТАВЩИК'),
'BRAND' => Yii::t('app', 'БРЕНД'),
'ARTICLE' => Yii::t('app', 'АРТИКУЛ'),
- 'FULL_ARTICLE' => Yii::t('app', 'Full Article'),
+ 'FULL_ARTICLE' => Yii::t('app', 'ПОЛНЫЙ АРТИКУЛ'),
'PRICE' => Yii::t('app', 'ЦЕНА'),
'DESCR' => Yii::t('app', 'ОПИСАНИЕ'),
'BOX' => Yii::t('app', 'НАЛИЧИЕ'),
diff --git a/frontend/tmp/sess_p4qt4plherihoah2i54pkdda02 b/frontend/tmp/sess_p4qt4plherihoah2i54pkdda02
new file mode 100644
index 0000000..a457851
--- /dev/null
+++ b/frontend/tmp/sess_p4qt4plherihoah2i54pkdda02
@@ -0,0 +1 @@
+__flash|a:0:{}__captcha/site/captcha|s:6:"jiwego";__captcha/site/captchacount|i:1;
\ No newline at end of file
--
libgit2 0.21.4