add reception customer update changes
This commit is contained in:
41
frontend/views/product/_form.php
Normal file
41
frontend/views/product/_form.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Product */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="product-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?= $form->field($model, 'id_product_category')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'id_account')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'product_number')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'barcode')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'purchase_price')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'sale_price')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'profit_margins')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'status')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'description')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('frontend/product', 'Create') : Yii::t('frontend/product', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
53
frontend/views/product/_search.php
Normal file
53
frontend/views/product/_search.php
Normal file
@@ -0,0 +1,53 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model frontend\models\ProductSearch */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
|
||||
<div class="product-search">
|
||||
|
||||
<?php $form = ActiveForm::begin([
|
||||
'action' => ['index'],
|
||||
'method' => 'get',
|
||||
]); ?>
|
||||
|
||||
<?= $form->field($model, 'id_product') ?>
|
||||
|
||||
<?= $form->field($model, 'id_product_category') ?>
|
||||
|
||||
<?= $form->field($model, 'id_account') ?>
|
||||
|
||||
<?= $form->field($model, 'product_number') ?>
|
||||
|
||||
<?= $form->field($model, 'barcode') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'purchase_price') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'sale_price') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'profit_margins') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'status') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'description') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'created_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'updated_at') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'stock') ?>
|
||||
|
||||
<?php // echo $form->field($model, 'name') ?>
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton(Yii::t('frontend/product', 'Search'), ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::resetButton(Yii::t('frontend/product', 'Reset'), ['class' => 'btn btn-default']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
21
frontend/views/product/create.php
Normal file
21
frontend/views/product/create.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Product */
|
||||
|
||||
$this->title = Yii::t('frontend/product', 'Create Product');
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/product', 'Products'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="product-create">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
47
frontend/views/product/index.php
Normal file
47
frontend/views/product/index.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\grid\GridView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $searchModel frontend\models\ProductSearch */
|
||||
/* @var $dataProvider yii\data\ActiveDataProvider */
|
||||
|
||||
$this->title = Yii::t('frontend/product', 'Products');
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="product-index">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
<?php // echo $this->render('_search', ['model' => $searchModel]); ?>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('frontend/product', 'Create Product'), ['create'], ['class' => 'btn btn-success']) ?>
|
||||
</p>
|
||||
|
||||
<?= GridView::widget([
|
||||
'dataProvider' => $dataProvider,
|
||||
'filterModel' => $searchModel,
|
||||
'columns' => [
|
||||
['class' => 'yii\grid\SerialColumn'],
|
||||
|
||||
'id_product',
|
||||
'id_product_category',
|
||||
'id_account',
|
||||
'product_number',
|
||||
'barcode',
|
||||
// 'purchase_price',
|
||||
// 'sale_price',
|
||||
// 'profit_margins',
|
||||
// 'status',
|
||||
// 'description',
|
||||
// 'created_at',
|
||||
// 'updated_at',
|
||||
// 'stock',
|
||||
// 'name',
|
||||
|
||||
['class' => 'yii\grid\ActionColumn'],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
</div>
|
||||
23
frontend/views/product/update.php
Normal file
23
frontend/views/product/update.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Product */
|
||||
|
||||
$this->title = Yii::t('frontend/product', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Product',
|
||||
]) . ' ' . $model->name;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/product', 'Products'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->name, 'url' => ['view', 'id' => $model->id_product]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('frontend/product', 'Update');
|
||||
?>
|
||||
<div class="product-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
48
frontend/views/product/view.php
Normal file
48
frontend/views/product/view.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Product */
|
||||
|
||||
$this->title = $model->name;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('frontend/product', 'Products'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="product-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
<p>
|
||||
<?= Html::a(Yii::t('frontend/product', 'Update'), ['update', 'id' => $model->id_product], ['class' => 'btn btn-primary']) ?>
|
||||
<?= Html::a(Yii::t('frontend/product', 'Delete'), ['delete', 'id' => $model->id_product], [
|
||||
'class' => 'btn btn-danger',
|
||||
'data' => [
|
||||
'confirm' => Yii::t('frontend/product', 'Are you sure you want to delete this item?'),
|
||||
'method' => 'post',
|
||||
],
|
||||
]) ?>
|
||||
</p>
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_product',
|
||||
'id_product_category',
|
||||
'id_account',
|
||||
'product_number',
|
||||
'barcode',
|
||||
'purchase_price',
|
||||
'sale_price',
|
||||
'profit_margins',
|
||||
'status',
|
||||
'description',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
'stock',
|
||||
'name',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user