Add inventory changes ( tax, net purchase price
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -40,6 +40,8 @@ $inventory_groups = ['' => ''] + ArrayHelper::map($inventory_groups, "id_invent
|
||||
|
||||
<?= $form->field($model, 'profit_margins')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'tax')->textInput() ?>
|
||||
|
||||
<?= $form->field($model, 'status')->checkbox( ['value' => 10, 'label' => Yii::t('common/product', "Active") ]) ?>
|
||||
|
||||
<?= $form->field($model, 'description')->textarea(['maxlength' => true])->hint( Yii::t( 'common/product', "Max 255 character")) ?>
|
||||
|
||||
@@ -37,7 +37,8 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'product_number',
|
||||
'barcode',
|
||||
'sale_price',
|
||||
[
|
||||
'tax',
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => 'statusHuman',
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
||||
'purchase_price',
|
||||
'sale_price',
|
||||
'profit_margins',
|
||||
'tax',
|
||||
'statusHuman',
|
||||
'stock',
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user