add inventory admin fix, add procurement update
This commit is contained in:
34
backend/views/procurement/_form_update.php
Normal file
34
backend/views/procurement/_form_update.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\ActiveForm;
|
||||
use yii\helpers\ArrayHelper;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Procurement */
|
||||
/* @var $warehouses common\models\Warehouse[] */
|
||||
/* @var $form yii\widgets\ActiveForm */
|
||||
?>
|
||||
<?php
|
||||
|
||||
|
||||
?>
|
||||
<div class="procurement-form">
|
||||
|
||||
<?php $form = ActiveForm::begin(); ?>
|
||||
|
||||
<?php // echo $form->field($model, 'id_account')->dropDownList($accountsOptions)->label('Kassza') ?>
|
||||
|
||||
<?= $form->field($model, 'count')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'purchase_price')->textInput() ?>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<?= Html::submitButton($model->isNewRecord ? Yii::t('common/procurement', 'Create') : Yii::t('common/procurement', 'Update'), ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
|
||||
</div>
|
||||
|
||||
<?php ActiveForm::end(); ?>
|
||||
|
||||
</div>
|
||||
@@ -48,7 +48,15 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
|
||||
[
|
||||
'class' => 'yii\grid\ActionColumn',
|
||||
'template' => '{view}',
|
||||
'template' => '{view} {update}',
|
||||
'buttons' => [
|
||||
'update' => function ($url, $model, $key) {
|
||||
return Html::a('Módosít',$url, ['class' =>'btn btn-xs btn-primary' ]);
|
||||
},
|
||||
'view' => function ($url, $model, $key) {
|
||||
return Html::a('Részletek',$url, ['class' =>'btn btn-xs btn-primary' ]);
|
||||
}
|
||||
]
|
||||
],
|
||||
],
|
||||
]); ?>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Procurement */
|
||||
|
||||
$this->title = Yii::t('common/procurement', 'Update {modelClass}: ', [
|
||||
'modelClass' => 'Procurement',
|
||||
]) . ' ' . $model->id_procurement;
|
||||
$this->title = Yii::t('common/procurement', 'Beszerzés módosítása' );
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/procurement', 'Procurements'), 'url' => ['index']];
|
||||
$this->params['breadcrumbs'][] = ['label' => $model->id_procurement, 'url' => ['view', 'id' => $model->id_procurement]];
|
||||
$this->params['breadcrumbs'][] = Yii::t('common/procurement', 'Update');
|
||||
@@ -15,8 +14,40 @@ $this->params['breadcrumbs'][] = Yii::t('common/procurement', 'Update');
|
||||
<div class="procurement-update">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_procurement',
|
||||
[
|
||||
'attribute' => 'id_warehouse',
|
||||
'value' => $model->warehouseName,
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_user',
|
||||
'value' => $model->userName,
|
||||
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_product',
|
||||
'value' => $model->productName,
|
||||
|
||||
],
|
||||
'count',
|
||||
'stock',
|
||||
'purchase_price',
|
||||
[
|
||||
'attribute' => 'description',
|
||||
'value' => nl2br($model->description),
|
||||
'format' => 'raw'
|
||||
],
|
||||
'created_at:datetime',
|
||||
],
|
||||
]) ?>
|
||||
|
||||
<?= $this->render('_form', [
|
||||
<?= $this->render('_form_update', [
|
||||
'model' => $model,
|
||||
]) ?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user