42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
<?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
|
|
|
|
$warehouseOptions = ArrayHelper::map($warehouses, 'id_warehouse', 'name') ;
|
|
$accountsOptions = ArrayHelper::map($accounts, 'id_account', 'name') ;
|
|
|
|
?>
|
|
<div class="procurement-form">
|
|
|
|
<?php $form = ActiveForm::begin(); ?>
|
|
|
|
<?= $form->field($model, 'productIdentifier')->textInput()->hint(Yii::t('common/procurement', "Product name, product number or barcode"))->label('Vonalkód vagy termékszám') ?>
|
|
|
|
<?= $form->field($model, 'id_warehouse')->dropDownList($warehouseOptions) ?>
|
|
<?= $form->field($model, 'id_account')->dropDownList($accountsOptions)->label('Kassza') ?>
|
|
|
|
<?= $form->field($model, 'count')->textInput() ?>
|
|
|
|
<?= $form->field($model, 'purchase_price')->textInput() ?>
|
|
|
|
<?= $form->field($model, 'description')->textarea(['maxlength' => true]) ?>
|
|
|
|
|
|
<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']) ?>
|
|
<?= Html::submitButton( Yii::t('common/procurement', 'Save/Next'), [ 'class' => 'btn btn-primary' ,'name' => '_next']) ?>
|
|
</div>
|
|
|
|
<?php ActiveForm::end(); ?>
|
|
|
|
</div>
|