add inventory item changes

This commit is contained in:
2016-09-07 07:42:43 +02:00
parent 59c8099530
commit 179b47c454
8 changed files with 181 additions and 30 deletions

View File

@@ -19,7 +19,7 @@ $options = [];
$options['products'] = $model->productOptions;
$options['url_product_find'] = Url::toRoute(['product/find']);
$this->registerJs('inventoryItemCreate.init( '. json_encode($options) .' );');
$this-> registerJs('inventoryItemCreate.init( '. json_encode($options) .' );');
?>
<div class="inventory-item-create">

View File

@@ -24,6 +24,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
?>
<!--suppress CssUnusedSymbol -->
<style>
.table th {
white-space: normal;
@@ -65,7 +66,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
}
?>
<?php echo $this->render('_search', ['model' => $searchModel]); ?>
<p>
<div>
Magyarázat:
<ul>
<li>
@@ -87,7 +88,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
Különbség: = "Leltározott mennyiség - ( "Előző leltár" + "Beszerzett mennyiség" - "Eladott mennyiség" )
</li>
</ul>
</p>
</div>
<p>
<?php echo Html::a("XLS letöltése", Url::current(['InventoryItemSearch[output]' => 'xls']), ['class' => 'btn btn-primary']) ?>
</p>
@@ -165,7 +166,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
'urlCreator' => function ($action, $model) {
$result = "";
if ($action == 'update') {
$result = Url::toRoute(['update-item', 'id' => $model['item_id_inventory_item']]);
$result = Url::toRoute(['update', 'id' => $model['item_id_inventory_item']]);
}
return $result;
}

View File

@@ -7,10 +7,11 @@ use yii\widgets\DetailView;
/* @var $model common\models\InventoryItem */
$this->title = Yii::t('common/inventory-item', 'Leltár termék');
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/inventory-item', 'Inventory Items'), 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => 'Leltár termékek', 'url' => ['index', 'id' => $model->id_inventory]];
$this->params['breadcrumbs'][] = ['label' => $model->id_inventory_item, 'url' => ['view', 'id' => $model->id_inventory_item]];
$this->params['breadcrumbs'][] = Yii::t('common/inventory-item', 'Update');
?>
<div class="inventory-item-update">
<h1><?= Html::encode($this->title) ?></h1>