<?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('common/product', 'Products'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="product-view">

    <h1><?= Html::encode($this->title) ?></h1>

    <p>
        <?= Html::a(Yii::t('common/product', 'Update'), ['update', 'id' => $model->id_product], ['class' => 'btn btn-primary']) ?>
        <?= Html::a(Yii::t('common/product', 'Új Termék'), ['create' ], ['class' => 'btn btn-primary']) ?>
    </p>

    <?= DetailView::widget([
        'model' => $model,
        'attributes' => [
            'productCategoryName',
            'accountName',
            'product_number',
            'barcode',
            'purchase_price',
            'sale_price',
            'profit_margins',
            'statusHuman',
            'stock',
        	[
            'attribute' => 'id_inventory_group',
        	'value' =>  $model->getInventoryGroupName(),
		    ],
        	[
            'attribute' => 'description',
        	'value' => nl2br($model->description),
        	'format' => 'raw'
		    ],
            'created_at:datetime',
            'updated_at:datetime',
        ],
    ]) ?>
    
    
    <?php 
    
    ?>

</div>
