Add inventory changes ( tax, net purchase price

This commit is contained in:
2017-01-06 18:24:43 +01:00
parent 6de07dac93
commit f3d00953c8
16 changed files with 547 additions and 287 deletions

View File

@@ -115,18 +115,24 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
[
'attribute' => 'inventory_prev_name',
'label' => 'Utolsó leltár',
'contentOptions' => ['class' => 'col-b']
'contentOptions' => ['class' => '']
],
[
'attribute' => 'item_count_system',
'label' => 'Rendszer szerinti mennyiség (db)',
'contentOptions' => ['class' => 'numeric']
],
[
'attribute' => 'item_purchase_price_net',
'label' => 'Nettó beszerezési ár',
'contentOptions' => ['class' => 'numeric']
],
[
'attribute' => 'item_count',
'label' => 'Leltározott mennyiség (db)',
'contentOptions' => ['class' => 'numeric col-b']
'contentOptions' => ['class' => 'numeric ']
],
[
@@ -138,7 +144,7 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
[
'attribute' => 'item_count_in',
'label' => 'Beszerzett mennyiség (db)',
'contentOptions' => ['class' => 'numeric col-b' ]
'contentOptions' => ['class' => 'numeric ' ]
],
[
@@ -148,9 +154,9 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
],
[
'attribute' => 'item_difference',
'attribute' => 'item_stock_missing_count',
'label' => 'Különbség (db)',
'contentOptions' => ['class' => 'numeric col-b']
'contentOptions' => ['class' => 'numeric ']
],
[
@@ -159,13 +165,12 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
'contentOptions' => ['class' => 'numeric']
],
[
'attribute' => 'item_total_price_brutto',
'label' => 'Összeg (Ft)',
'contentOptions' => ['class' => 'numeric col-b']
],
'attribute' => 'item_stock_missing_money',
'label' => 'Leltár hiány (Ft)',
'contentOptions' => ['class' => 'numeric ']
]
];
if ($model->isOpen()) {
$columns[] = ['class' => 'yii\grid\ActionColumn',
'template' => '{update}',
@@ -187,6 +192,28 @@ $this->registerJs('inventoryItemIndex.init( ' . json_encode($options) . ' );');
];
}
$i = 0;
foreach ($columns as $col){
$value = "";
if ( !isset($col["contentOptions"])){
$col["contentOptions"] = [];
}
if ( isset($col["contentOptions"]["class"])){
$value = $col["contentOptions"]["class"];
}
if ( $i % 2 == 1){
$columns[$i]["contentOptions"]["class"] = $value . " col-b";
}else{
$columns[$i]["contentOptions"]["class"] = $value . " col-a";
}
$i++;
}
echo GridView::widget([
'dataProvider' => $dataProvider,
'columns' => $columns